MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
czarbal
Post subject: PDF printing from java  PostPosted: Mar 14, 2006 - 10:24 PM
Registered Member
Registered Member


Joined: Sep 17, 2005
Posts: 7

Folks,
Has anybody tried printing PDF Files from Java without using acrobat or 3rd party commercial APIs please? Current Java print API doesn't work.

Cheers,
Chris
:(
 
 View user's profile Send private message  
Reply with quote Back to top
nabil
Post subject:   PostPosted: Mar 15, 2006 - 12:27 AM
Quality Board
Quality Board


Joined: Feb 01, 2004
Posts: 303

I use iText for my PDF generation needs.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
czarbal
Post subject:   PostPosted: Mar 15, 2006 - 08:18 PM
Registered Member
Registered Member


Joined: Sep 17, 2005
Posts: 7

Thank you Nabil. I also use iText to create the PDF File, but my problem is sending the PDF document to the printer. Latest java print API does not work with PDF. To overcome this problem, I spawn a process to invoke acrobat to print the pdf file. This works fine, but causes various problems especially in the old Windows 98 PCs. Yep, some of my clients still use Windows98 PCs!

So has anybody else been down this route before please?

Thank you,
Chris
 
 View user's profile Send private message  
Reply with quote Back to top
robvarga
Post subject:   PostPosted: Mar 17, 2006 - 02:52 PM
Quality Board
Quality Board


Joined: May 23, 2003
Posts: 351

Wasn't there a separate Acrobat Reader binary Win9x?

Best regards,

Robert
 
 View user's profile Send private message  
Reply with quote Back to top
robvarga
Post subject:   PostPosted: Mar 17, 2006 - 02:53 PM
Quality Board
Quality Board


Joined: May 23, 2003
Posts: 351

I mean:
... for Win9x?
 
 View user's profile Send private message  
Reply with quote Back to top
czarbal
Post subject:   PostPosted: Mar 17, 2006 - 10:25 PM
Registered Member
Registered Member


Joined: Sep 17, 2005
Posts: 7

Rob,
You are correct, there is a binary Acrobat reader for Win9x, acrobat 5.x to be precise. The problem is sometimes when you change the default printer in Windows, acrobat doesn't pick it up and still points to the old printer. I am forever having to instruct the clients to invoke Acrobat and print a test file manually to show/approve that the problem is with acrobat and not the application. In most cases, I get them to specifically change the printer from acrobat, then invoke the application. This is obviously time consuming and by removing acrobat out of the equation, I will have one less thing to worry about etc.

I am now changing the code to generate a postscript file to see if it works. If it does, then we are in business.

The moral of the story my friends is, stay away from PDF flles if the requirement is to print them from Java, unless of course you buy commercial PDF printing APIs from 3rd part suppliers.

Cheers,
Chris
 
 View user's profile Send private message  
Reply with quote Back to top
czarbal
Post subject:   PostPosted: May 29, 2006 - 02:36 PM
Registered Member
Registered Member


Joined: Sep 17, 2005
Posts: 7

The solution is ..... PDFBox

www.pdfbox.com

Long live OpenSource!

Good Luck
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits