Do the same on the second pdf and then use PdfCopy to merge both. You can do all that in memory.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of jeph luna > Sent: Tuesday, February 21, 2006 7:13 AM > To: [email protected] > Subject: [iText-questions] help regarding filling multiple > Acroforms and combining/flattening them > > hi all, > > i'm a newbie java programmer and i'm also new in using iText. > i have this problem : > > I have 2 pdf's namely (1) SMR.pdf and (2) HasWaste.pdf > > SMR.pdf has the following fields : > facility_name and street > > HasWaste.pdf has the following fields : > hw_no > > what i want to achieve is to fill-up SMR.pdf and HasWaste.pdf > and flatten them and then merge the two files together( > without using any temporary files, since i'll be using the > code in a servlet..). > > so far i was able to do the the first part, the filling up of > SMR.pdf and flattening it : > > ByteArrayOutputStream baos = new ByteArrayOutputStream(); > PdfWriter writer = PdfWriter.getInstance(document, baos); > > String facility_name = (String) > request.getParameter("facility_name"); > String street = (String) request.getParameter("street"); > > PdfReader reader = new PdfReader("../pdfs/SMR.pdf"); > > PdfStamper stamp = new PdfStamper(reader, baos); > AcroFields form = reader.getAcroFields(); > form.setField("facility_name", facility_name); > form.setField("street", street); > stamp.setFormFlattening(true); > stamp.close(); > > basically, i just copied the code in the tutorial and made > some minor changes..i used a ByteArrayOutputStream object as > my destination since i'm goal is to display the resulting pdf > in a web browser. > > i'm having difficulties doing the filling up of HasWaste.pdf > and flattening it and merging the result with the flattened > version of SMR.pdf..i hope you can help me on this. thanks in > advance.. > > ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
