facebook

PDF printing from java

  1. MyEclipse Archived
  2.  > 
  3. General
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #248585 Reply

    czarbal
    Member

    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
    🙁

    #248588 Reply

    Nabil Suleiman
    Participant

    I use iText for my PDF generation needs.

    #248670 Reply

    czarbal
    Member

    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

    #248814 Reply

    Robert Varga
    Participant

    Wasn’t there a separate Acrobat Reader binary Win9x?

    Best regards,

    Robert

    #248815 Reply

    Robert Varga
    Participant

    I mean:
    … for Win9x?

    #248845 Reply

    czarbal
    Member

    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

    #252729 Reply

    czarbal
    Member

    The solution is ….. PDFBox

    http://www.pdfbox.com

    Long live OpenSource!

    Good Luck

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: PDF printing from java

You must be logged in to post in the forum log in