You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Dalibor Kalna <da...@bluewin.ch> on 2021/12/08 18:04:30 UTC

Fwd: rotating pages and setting origin

> 
> hi there
> 
> i'm trying to rotate every landscape page in document, so all pages are portrait orientation. i'm using apache pdfbox for that.
> 
> PDPage page = document.getPage(pageIndex);
> PDRectangle mediaBox = page.getMediaBox();
> if(mediaBox.getWidth() > mediaBox.getHeight()) {
>   page.setRotation(270);
> }
> 
> this works fine, page is rotated. now, the problem is, that after i send document to printer, it will put some marks on it (see image1).
> 
> 
> 
> 
> 
> on rotated page however marks appear on wrong position. like it would appear on landscape page (see image2).
> 
> 
> 
> i think it has something to do with origin. do you have any ideas how to set origin, so that printer mark appears on right place?
> 
> thank you and best regards
> Dalibor
> 


AW: Fwd: rotating pages and setting origin

Posted by da...@bluewin.ch.
Hallo Tilman

Vielen Dank, es funktioniert so, wie du geschrieben hast.

Liebe Grüsse
Dalibor

-----Ursprüngliche Nachricht-----
Von: Tilman Hausherr <TH...@t-online.de> 
Gesendet: Mittwoch, 8. Dezember 2021 19:47
An: users@pdfbox.apache.org
Betreff: Re: Fwd: rotating pages and setting origin

I've added a response to your SO question. Please mention if it doesn't help.

Tilman


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



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


Re: Fwd: rotating pages and setting origin

Posted by Tilman Hausherr <TH...@t-online.de>.
I've added a response to your SO question. Please mention if it doesn't 
help.

Tilman


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