You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Brian Carrier <ca...@digital-evidence.org> on 2008/11/07 22:19:22 UTC
Change of 0,0 reference on page
Hello,
I am trying to compare the different approaches to solving the page
rotation problems, but have a fundamental question that I cannot
figure out the answer to. I'm hoping someone here has more history
on it.
The code currently changes the Y-axis reference so that the 0,0
point is the upper left corner instead of the lower left corner.
This is done in PDFStreamEngine.showString(). The rest of the code in
the project seems to compensate for this, but why is this needed in
the first place?
thanks,
brian
Re: Change of 0,0 reference on page
Posted by Andreas Lehmkühler <an...@lehmi.de>.
> I am trying to compare the different approaches to solving the page
> rotation problems, but have a fundamental question that I cannot figure
> out the answer to. I'm hoping someone here has more history on it.
>
> The code currently changes the Y-axis reference so that the 0,0 point
> is the upper left corner instead of the lower left corner. This is done
> in PDFStreamEngine.showString(). The rest of the code in the project
> seems to compensate for this, but why is this needed in the first place?
As I understood the PDFStreamEngine is used in the first place to print
or display (same as PDPage.convertToImage) a pdf-document. This is done
by using java.awt.* A pdf has the 0,0 point in the lower left and java
graphic-stuff in the upper left. Consequently you have to do the changes
you described above. But showString() only compensates the textparts.
Everything else is handled by org.pdfbox.pdfviewer.Pagedrawer.fixY()
hth,
andreas
--
Auf der Verpackung stand "beno"tigt Windows 9x/2000/XP oder BESSER", also
habe ich Linux installiert.