Hi all,
 
I'm new in this list, after searching a litle in archives I can't find anything about that.
 
I think this is a bug.
Here the code:
    
      Document document = new Document();
       
        try {
           
            // step 2:
            // we create a writer that listens to the document
            // and directs a PDF-stream to a file
           
            PdfWriter.getInstance(document, new FileOutputStream("c:\\testLib.pdf"));
           
            // step 3: we open the document
            document.open();
            document.setPageSize(PageSize.A4.rotate());
            document.newPage();
           
            // step 4: we add some content
            document.add(new Paragraph("To create a document in landscape format, just make the height smaller than the width. For instance by rotating the PageSize Rectangle: PageSize.A4.rotate()"));
            document.setPageSize(PageSize.A4);
            document.newPage();
            document.add(new Paragraph("This is portrait again"));        
        
       }
        catch(DocumentException de) {
            System.err.println(de.getMessage());
        }
        catch(IOException ioe) {
            System.err.println(ioe.getMessage());
        }
       
        // step 5: we close the document
        document.close();
The first page is not landscape, but portrait.
 
I know that you can do:
 
      Document document = new Document(PageSize.A4.rotate());
and then it works well. But in my case I can't use tha way.
 
Greetings
 
 
Josep Miquel García
CCS Investigación y desarrollo
Tel. +34 937 489 600  (ext. 2499) 
Fax +34 937 489 601
http://www.ccs.biz [EMAIL PROTECTED]
Web

Aquest missatge electrònic conté informació confidencial, en propietat o legalment protegida, i està adreçada únicament per a l"ús de la persona destinatària. Si no és vostè, no l"ha d"utilitzar, difondre, copiar de cap forma ni emprendre cap acció en relació a ella.
Si vostè ha rebut aquest missatge per error, li preguem si us plau que l"esborri, a l"igual que qualsevol còpia del mateix i notifiqui aquet fet al remitent.

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to