Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Solution needed for billing and printing

 
Bharvi Dixit
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I am making an application, in which some billing work is required. The bills are to be created using this software and to be printed also by clicking the print button.
Now i have no clue that how to do it. The bill format must be pre-defined.
I am ,making this application using swing in eclipse IDE.

Please guide me that what should i study and how to do it.. as it is too urgent.

Thanks in advance
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would probably create a PDF file, since that has the advantage that you can also store it as a file, and thus make available to the user later for reference. You could use a library like PDFRenderer to print it (assuming that no printer is available that can print PDFs natively).
 
Tony Docherty
Bartender
Posts: 2942
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would probably create a PDF file, since that has the advantage that you can also store it as a file, and thus make available to the user later for reference.

And/or it allows you to email a PDF of the bill directly to a customer rather than having to print and send it.
 
Bharvi Dixit
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. I want it too to create the pdf file.
But, i have no idea that how will i create it. I want it to be in the same way as Ms-Word, so that the user fills all the details in the frame.. some values will be retrieved from database like bill no, client name, client address etc.. and gives the print command and a pdf is generated which has a pre-specified format.
Please let me know the steps i have to follow to get the desired results.. as i have know knowledge at all.

Some days ago i wrote this code to print the frame's component data. But as of now, it won't work..



Please do reply..

Thanks
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you taken a look at the iText library, including getting some example code to run? If not, start here: https://www.coderanch.com/how-to/java/ItextExample, and make sure you understand the different licenses used for iText 2 and iText 5.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic