Hi Paulo,

Thanks for prompt response.

PageSize.A4.rotate() will change size of the paper. But I want to rotate content of the page as well.

The original document has wide tables.

The only way that I see for now is:
1) produce original document as an external file
2) read it via PdfReader and put each page as template with rotation on 90 degrees.


This way should work. But the beauty of in-memory document generation will be lost.

P.S. PDF has rich legacy of PostScript language. Is not it simple to add analogs of "rotate" and "transfer" commands to vocabulary of iText?

I have chacked "rotated PDF" and found one little difference with "original" counterpart.

Each page in "rotated" file has:
/Type/Page/MediaBox [0 0 612 792]
/Rotate 90/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 11 0 R
/Font 12 0 R

/Contents 6 0 R

instead of:
/Type/Page
/Parent 1 0 R
/Resources 9 0 R
/MediaBox[0 0 612 792]
/Contents[5 0 R ]


As you see it is just one simple command "Rotate 90" after description of *SAME* MedaiBox.
Is not this neat?!


Best regards,
Boris


From: Paulo Soares <[EMAIL PROTECTED]>
To: 'Boris X' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: RE: [iText-questions] Turning whole page output 90 degrees
Date: Tue, 16 Sep 2003 16:18:33 +0100


Using PageSize.A4.rotate() should work. If Hylafax doesn't care about the
rotation it will show as portrait and print correctly.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Boris X [SMTP:[EMAIL PROTECTED]
> Sent: Monday, September 15, 2003 21:14
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] Turning whole page output 90 degrees
>
> Hello,
>
> It seems to be very popular question with no answer in tutorial.
>
> Our troubles come from Hylafax (fax server) behaviour for landscape
> documents. It tries to send it as regular portrait document and crops off
> almost half of the page making it useless on other side. I tried different
>
> PDF-converters (eg, ImageMagic) but quality of output is very low. So, the
>
> target is to generate proper (rotated) document.
>
> The question is:
> Is it possible to set some page attributes to output everything rotated 90
>
> degrees clockwise?
>
> The only solution for now is templates. But it seems ugly to put all
> information as template. Most of PDF generators have feature like "rotate
> /
> transform".
>
> As an example here is PHP/PDFlib snippet:
>
> if ($do_rotate) {
> PDF_begin_page ($pdf, $page_height, $page_width);
>
> // Translate the origin of the coordinate system.
> PDF_translate ($pdf, 0, $page_width);
>
> // Rotate the user coordinate system.
> PDF_rotate ($pdf, 270);
> } else {
> PDF_begin_page ($pdf, $page_width, $page_height);
> }
>
> This is all it takes to rotate whole output on page.
>
> Any ideas how to do same trick in iText?
>
> Best regards,
> Boris
>
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to