PdfReader.removeFields() > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of "Sölter, Peter" > Sent: Tuesday, March 29, 2005 4:25 PM > To: itext-questions@lists.sourceforge.net > Subject: [iText-questions] Copying a PDF without form fields > > Hi everybody, > what is the recommended way to copy a PDF to another _without_ > copying form fields? > > PdfCopy (or ...tools/concat_pdf) copies the complete AcroForm and the > fields. > Is it possible to remove the fields afterwards and how can > this be done? > > I also tried PdfWriter with the following code, but some > dictionaries seem > to be missing after copying: > > int n = reader.getNumberOfPages(); > Rectangle psize = reader.getPageSize(1); > Document document = new Document(psize); > float width = psize.width(); > float height = psize.height(); > > // creation of the different writers > PdfWriter writer = PdfWriter.getInstance(document, new > FileOutputStream(strOutPDF)); > > document.open(); > PdfContentByte cb = writer.getDirectContent(); > > for (int i = 1; i <= n; i++) > { > PdfImportedPage page = writer.getImportedPage(reader, i); > document.newPage(); > cb.addTemplate(page, 0, 0); > System.out.println("Processed page " + i); > } > > document.close(); > > Any ideas? > > Thanks in advance, > Peter > > > ------------------------------------------------------- > 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 >
------------------------------------------------------- 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_ide95&alloc_id396&op=click _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions