>I'm trying to find a solution to the text rotation problems that  
>satisfy the current regression tests and that work on some files that  
>I found bugs with. I've a hit a point though where I need insight  
>from people who know more about the graphics and non-text part of  
>PDFBox.
> ..... snip

That's a good summary of the whole problem. Well done.

But first off all, I realized that there is perhaps a missunderstanding on my 
side.

There is one key question for me. What do I have to do to get a DINA4-page with 
a landscape orientation?
Do I have to rotate every element on the page, which has always the same 
dimension with portrait orientation?
Or do I just have to flip the x-y dimensions of the page and the every element 
is placed, as if the page has a portrait orientation?

For example:
1.
- PageSize = DINA4-PORTRAIT  = PDRectangle(PDPage.PAGE_SIZE_A4)
- rotation = 90
- element orientation = vertical??
- Textpositioning 0<x<596 and 0<y<843
2.
- PageSize = DINA4-LANDSCAPE = DINA4-PORTRAIT with flipped dimensions = 
PDRectangle(843,596)
- rotation = 0
- element orientation = horizontal
- Textpositioning 0<x<843 and 0<y<596

I fear the first case will be the right one. Especially if we talk about the 
NoRotate-flag, which is part of pdf since 1.3
I'm using the second one and it works, but it seems to be wrong. Your 
rotation.pdf has portrait-dimensions and a rotation of 90.

Back to our problem. Looking for answers about the rotation-behaviour of all 
non-text-elements, 
I realized that all these elements are drawn different from text-elements. I 
created a simple 
word-doc with two boxes and some text and generated a pdf-doc using Adobe 
PDFMaker. 
If you try to show the pdf with the PDFReader from pdfbox the boxes are rotated 
but not the text.

One conclusion seems to be: of course the whole coords-flipping and moving 
thing in the PDFStreamEngine doesn't rotate the text.
We have to find out how the rotation is handled by non-text-elements. After 
solving this puzzle, we perhaps know how to proceed.



----------------------------------------------------------------
- Geschaeftsfuehrung: Chittur Ramakrishnan (Vorsitzender),
Stefan Niehusmann -
- Sitz der Gesellschaft: Dortmund -
- Eingetragen beim Amtsgericht Dortmund -
- Handelsregister-Nr. HR B 21222 -
- USt.-IdNr. DE 2588 96 719 - 

Reply via email to