Hello,
I'm trying to combine multiple PDFs (each containing fields) into a
single PDF. I've been working with the code from Chapter 2 of "iText in
Action" and it's all very straightforward. Except I want to avoid the
page-breaks between the PDFs.
I assume this is because I'm using addDocument() and it's doing what it
should - add the document, end-of-page included.
Is there some way to suppress the breaks between addDocument()s, or
should I be going about this another way? Combining them into a single
PDF is problematic because eventually there will be logic that controls
which 'PDF fragments' get combined into the output PDF.
thanks for your time,
Steve
Code fragment:
...
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PdfCopyFields copy = new PdfCopyFields(baos);
copy.addDocument(new PdfReader("PDF_frag1.pdf"));
copy.addDocument(new PdfReader("PDF_frag2.pdf"));
copy.close();
PdfReader reader = new PdfReader(baos.toByteArray());
ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
PdfStamper stamper = new PdfStamper(reader, baosOut);
AcroFields form = stamper.getAcroFields();
form.setField("Header_Name", sName);
form.setField("Header_PrintDate", sdf.format(new java.util.Date()));
form.setField("ID_DOB", sBirthDate);
<snip>
stamper.close();
...
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php