PdfWriter.setStrictImageSequence(true).

Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Trevor Kramer
> Sent: Friday, March 09, 2007 4:49 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] adding imported pages
> 
> When adding imported pdf pages to a pdf they are sometimes placed on a
> new page while content added after will appear before it on the
> previous page. So with this code below the caption will appear before
> the imported page. Is there a way to ensure everything appears in the
> order added?
> 
> PdfReader reader = new PdfReader(getBytes());
>         for(int i = 0; i < reader.getNumberOfPages(); i++) {
>             Image pdf =
> Image.getInstance(writer.getImportedPage(reader, i + 1));
>             pdf.setAlignment(Image.MIDDLE);
>             document.add(pdf);
>         }
>         reader.close();
>         String caption = getCaption();
>         if(caption != null && caption.trim().length() > 0) {
>             document.add(new Paragraph(getCaption(),
> FontFactory.getFont(PDFGenerator.TIMES_ALIAS, BaseFont.CP1252, true,
> 10)));
>         }
> 
> Thanks,
> 
> Trevor
> 
> --------------------------------------------------------------
> -----------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the 
> chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge
> &CID=DEVDEV
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/
> 


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to