You have two cases: portrait rotated or landscape. Both look the same in the viewer but are described differently. In the case of portrait rotated the page dimensions are (8.26x11.69) and there's a "/Rotate 90" key in the page dictionary. In the other case the page dimensions are (11.69x8.26) and there's no page rotation indication or the rotation is zero. Does your target requires a rotation zero?
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Welch, Peter > Sent: Wednesday, July 13, 2005 3:32 PM > To: '[email protected]' > Subject: [iText-questions] Converting a landscape document > into a portrait document > > Hi, > > I'm in a situation where I need to read a landscape PDF, and produce a > portrait PDF that has the original landscape page > rotated by 90 degrees. In other words, a target system will > only accept A4 > pages ( 8.26 x 11.69 inches ), so I need to > take a landscape ( 11.69 x 8.26 ) page and present it as portrait. > > I'm experienced in using iText to split and append PDFs - ( > learning from > the concat_PDF example ) - so I'm > getting an imported page and adding it to the output document using > addTemplate. > > I've tried various transforms etc - with varying degrees of > success - but I > finally realised that my page size is > still landscape anyway as its coming from the imported page! > > So... how do I take a landscape page, rotate it by 90 counter > clockwise, and > have the resulting page > dimension as portait ? > > Any help appreciated. > > Pete Welch > > > > > > LEGAL NOTICE > > The information contained in this e-mail and any attachments > are private and > confidential. This message is solely intended for the named > addressee, if > you are not the intended addressee you are prohibited from > storing, copying, > disseminating or using the information in any way. If you > received this > e-mail in error please notify the sender immediately. E-mail > transmission > cannot be guaranteed to be secure or error-free as > information could be > intercepted, corrupted, lost, destroyed, arrive late or incomplete, or > contain viruses. The sender therefore does not accept > liability for any > errors, viruses or omissions in the contents of this message, > which arise as > a result of transmission. This e-mail is not intended to > create legally > binding commitments on behalf of Northern Rock plc, nor do > its contents > reflect the corporate views or policies of Northern Rock plc. > > Northern Rock plc, Registered Office Northern Rock House > Gosforth Newcastle > upon Tyne NE3 4PL. Registered in England, number 3273685. > Telephone No: 0191 > 2857191 > > Northern Rock is authorised and regulated by the Financial Services > Authority. Representative only of the Legal & General marketing group, > members of which are authorised and regulated by the > Financial Services > Authority, for the purpose of making introductions to other > representatives > for advising on life assurance and investment products bearing Legal & > General's name. Signatory to the Banking Code > > > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' > webinar happening > July 14 at 8am PDT/11am EDT. We invite you to explore the > latest in dual > core and dual graphics technology at this free one hour event > hosted by HP, > AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
