Hello, All

   I hava some troubles with generating a pdf file with template, my program 
like as follow:
------------------------------------------------------------------------------  
   Document doc = new Document()
   PdfWriter pdfWriter = PdfWriter.getInstance(doc, new FileOutputStream
("resultPdf"));
  doc.open();
   PdfReader reader = new PdfReader("template.pdf");
   PdfContentByte cb = pdfWriter.getDirectConten();
   PdfImportedPage importedPage = pdfWriter.getImportedPage(reader,1);
   cb.addTemplate(importedPage,0,0);
   ......
-------------------------------------------------------------------------------
Now, i assume that the content in the "importedPage" covers only the up-half 
part of the total page, and it leaves the down-half part blank. However, if
we will continue to add some other content to this "doc" document later, and
we must use "doc.add(element)" to do so instead of a PdbContentByte Object,
Any one has some good suggestions how to add the content following the content 
added before from the "importedPage"  not to let the down-half part waste.


Best wishes
Liu



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to