File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes Print Pdf problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "Print Pdf problem" Watch "Print Pdf problem" New topic
Author

Print Pdf problem

Souvik Das
Greenhorn

Joined: Oct 11, 2007
Posts: 15
Hi,
I am facing problem to print pdfs through java code. I needs the functionality of silent printing so i am using pdfbox. But the problem is the pdfs are not getting printed and my code throws an error java.awt.print.PrinterIOException which is caused by
Caused by: java.util.zip.ZipException: unknown compression method
But i just want to print only one pdf at a time. Later, i have found out that my pdfs are restricted with 40bit Rc4 type security where only printing is allowed. Now i have also got the password with which the pdfs are encrypted. But now i am getting null pointer exception when i want to print the pdf after decryption.
My code is attached below.


Please help.
Souvik Das
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35232
    
    7
In which line of code are you getting a NullPointerException?


Android appsImageJ pluginsJava web charts
Souvik Das
Greenhorn

Joined: Oct 11, 2007
Posts: 15
Hi Mr. Ulf Dittmer,
I am getting the following error log.

java.lang.NullPointerException
at org.pdfbox.pdmodel.PDDocument.print(PDDocument.java:825)
at com.ITGI.Java.PDFBOXCode.createPDF(PDFBOXCode.java:66)// Method
at com.ITGI.Java.PDFBOXCode.main(PDFBOXCode.java:17)
Exception in thread "main"

Thanks & Regards,
Souvik Das
 
I agree. Here's the link: http://jrebel.com/download
 
subject: Print Pdf problem
 
Similar Threads
Java Print Service API!!!(File not printed)
Adding pdf to a XML file
PDF creation, disallow printing without setting permissions password
javax.print PDF problem / complex solution?
Direct Printing a text file by default printer without user interaction.