Hi All,

I am facing some issue related with PDFBox 1.4. I am not able to create PDF
to image through standard API of PDFBox.

Please find attachment of PDF2Img.java which I am using to convert PDF to
Image and PDF file which I want to convert into Image.

I got below error when I convert :

*java.lang.IllegalArgumentException: Width (1224) and height (-1584) cannot
be <= 0*
at
java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1031)
 at java.awt.image.BufferedImage.<init>(BufferedImage.java:507)
at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:716)
 at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:693)
at PDF2Img.createImage(PDF2Img.java:51)
 at PDF2Img.main(PDF2Img.java:28)

Please let me know if you have any idea like why this happens with my PDF
and what should the solution for this situation ?

Thanks,
Amit Nagar

Reply via email to