You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Maruan Sahyoun <sa...@fileaffairs.de> on 2010/03/29 11:27:39 UTC

Windows Printing with PDFBox using Java 1.5

Hi,

there are several cases where printing a PDF file using PDFBox with Java 1.5. fails whereas printing the same file using JAVA 1.6 works fine (e.g. raw.pdf in PDFBOX-667). I'm currently trying to get an understanding why that happens but I'm a little puzzled understanding the ColorMapping etc. in PDFBox. 

Some of the strange bits I get are (using raw.pdf):

using JAVA 1.5. this.getGraphicsState().getNonStrokingColor().getJavaColor()  from PageDrawer returns r0,g0,b1 where the same call using Java 1.6 returns r0,g0,b0
this.getGraphicsStates().size() from PageDrawer results  in a NPE
this.getColorSpaces().size() from PageDrawer results in a NPE

etc.

Maybe someone can help me understand how the color handling works. 


Maruan Sahyoun




Re: Windows Printing with PDFBox using Java 1.5

Posted by Jin Mingjian <ji...@gmail.com>.
JDK 1.5.0_22 seems no problem.


2010/3/29 Maruan Sahyoun <sa...@fileaffairs.de>

> Hi,
>
> there are several cases where printing a PDF file using PDFBox with Java
> 1.5. fails whereas printing the same file using JAVA 1.6 works fine (e.g.
> raw.pdf in PDFBOX-667). I'm currently trying to get an understanding why
> that happens but I'm a little puzzled understanding the ColorMapping etc. in
> PDFBox.
>
> Some of the strange bits I get are (using raw.pdf):
>
> using JAVA 1.5.
> this.getGraphicsState().getNonStrokingColor().getJavaColor()  from
> PageDrawer returns r0,g0,b1 where the same call using Java 1.6 returns
> r0,g0,b0
> this.getGraphicsStates().size() from PageDrawer results  in a NPE
> this.getColorSpaces().size() from PageDrawer results in a NPE
>
> etc.
>
> Maybe someone can help me understand how the color handling works.
>
>
> Maruan Sahyoun
>
>
>
>