File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Solution needed for billing and printing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Solution needed for billing and printing" Watch "Solution needed for billing and printing" New topic
Author

Solution needed for billing and printing

Bharvi Dixit
Greenhorn

Joined: Feb 14, 2013
Posts: 20
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
Marshal

Joined: Mar 22, 2005
Posts: 41127
    
  45
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).


Ping & DNS - my free Android networking tools app
Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 2173
    
  47
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

Joined: Feb 14, 2013
Posts: 20
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
Marshal

Joined: Mar 22, 2005
Posts: 41127
    
  45
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Solution needed for billing and printing
 
Similar Threads
How should we modulariz an application in OSGI
doubt about a part 1 question
EJB-QL question
using JBPM to integrate with Billing Application
How many @controller class use in my application