pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Wilson <williamstonconsult...@gmail.com>
Subject Re: Issue related with PDF to Image Conversion with PDFBox 1.4
Date Mon, 19 Mar 2012 19:49:54 GMT
Amit,

Rendering of PDF's as images has improved quite a bit since version 1.4 was
released.  Could you try it again using the latest release (1.6) or, if
you're comfortable building it yourself, the very latest code?

If it still fails, please submit an issue in JIRA -- along with the PDF
that fails if that is possible.

Many more PDF's are rendered properly now than were with 1.4, so hopefully
that update will be all you need.

Thanks.

Daniel

On Mon, Mar 19, 2012 at 6:02 AM, Amit Nagar <amitnagar21@gmail.com> wrote:

> 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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message