You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2015/12/07 17:46:11 UTC

[jira] [Commented] (PDFBOX-3156) PDFPrintable generate a java.lang.NegativeArraySizeException error

    [ https://issues.apache.org/jira/browse/PDFBOX-3156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15045217#comment-15045217 ] 

Tilman Hausherr commented on PDFBOX-3156:
-----------------------------------------

I didn't look at your code, because the exception happens with normal rendering in PDFDebugger. The good news is that it does not happen with twelvemonkeys https://github.com/haraldk/TwelveMonkeys . The bug itself is a problem with java imaging, which isn't maintained by the current owner of Java.

So what can you do? The best would be (since you appear to generate the file) to replace the JPEG with a PNG, or with a different type of JPEG (maybe open and save it). The second best is to use twelvemonkeys (which is excellent, see PDFBOX-2694).

> PDFPrintable generate a java.lang.NegativeArraySizeException error
> ------------------------------------------------------------------
>
>                 Key: PDFBOX-3156
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3156
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Roydor Vincent
>         Attachments: AbstractImpression.java, Doc_1449500652819.pdf, IImpression.java, ImpressionPrinterJob.java, PDFBOX-3156.pdf-1.png, TravailImpression.java
>
>
> I use in pom  :
> <dependency>
> 			<groupId>org.apache.pdfbox</groupId>
> 			<artifactId>pdfbox</artifactId>
> 			<version>2.0.0-RC2</version>
> 		</dependency>
> And when I do :
> {code}PDFPrintable printable = new PDFPrintable(unDoc, Scaling.ACTUAL_SIZE);{code}
> I have the error.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org