Hi Bruno !

There is no problem when the whole document will be set to Landscape
orientation.  The problem is when you want change the orientation when you
have already opened and written contents to the document.

The way to change the orientation to Landscape is by the rotate() method.
     Document doc = new Document(PageSize.LETTER.rotate(),40,40,30,30);

For example,  we have a document consist of 2 pages.  Page 1 will be
portrait.  So we make an instance of the document object

 Document doc = new Document(PageSize.LETTER,40,40,30,30);
 try {
    PdfWriter.getInstance(document, new FileOutputStream("Chap0103.pdf"));
     document.open();
     document.add(new Phrase("TESTING"));
     document.newPage()
 }
 catch(DocumentException de) {


for page 2,  we want to change the orientation to Landscape.  Is this
possible?

is this a method to change the orientation even if the document is already
opened?





[EMAIL PROTECTED]@lists.sourceforge.net on 03/07/2002 04:10:33 PM

Sent by:  [EMAIL PROTECTED]


To:   [EMAIL PROTECTED]
cc:   [EMAIL PROTECTED], Paulo Soares
      <[EMAIL PROTECTED]>, [EMAIL PROTECTED]'
Subject:  [iText-questions] Re: Landscape and Portrait Orientation in one
      Document


[EMAIL PROTECTED] writes:

>
>
>
> Hi !
>
> I would like to ask if there is a way for a document to have a landscape
> orientation and portrait orientation in one document.  For example,  the
> orientation for page 1 is portrait and the second landscape and the third
> one will revert back to portrait.

There is an example in Chapter 1 of the tutorial.
http://www.lowagie.com/iText/tutorial/ch01.html

_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------


_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to