George, George Pearson wrote > We currently have a program that merges two sets of pdf using iTextSharp > to display to a user the entire set. > > This has been working great for that past few months however the client > now in the one set of pdf's have Adobe LiveCycle type forms, these forms > as you may know are pdf forms where user can fill in / complete fields in > the document on their computers. Like dynamic forms. > > The application now gives an error: > > "Please wait... > If this message is not eventually replaced by the proper contents of the > document, your PDF viewer may not be able to display this type of > document." > > [...] > page = writer.GetImportedPage(reader, i); > cb.AddTemplate(page, 1f, 0, 0, 1f, 0, 0); > > Could anyone plz point me in the right direction?
Templates retrieved via getImportedPage methods only contain the content stream data of those pages and data referenced from there, but no interactive features at all, e.g. links, AcroForm form fields, .... You may want to read chapter 6 of iText in Action, 2nd edition, to find out about ways to also copy all kinds of annotations. The very issue you present here is somewhat more complicated, though, as it seems to make use of the XFA form mechanism. In the case at hand, the page content streams actually do contain the warning text you see. A PDF viewer eventually replaces them when rendering the XFA forms contained separately in the document. The iText support for XFA is somewhat limitted. Especially I don't think iText contains code for merging XFA forms for the use case of merging documents. Therefore, to solve your problem you may write such code and, hopefully, present it to the community for general use. It's not easy, though. On the other hand you may want to try and use a feature currently in development (cf. http://lowagie.com/xfa2pdf XFA to PDF ) as a first step for documents with XFA form data before merging documents using the better mechanisms from chapter 6. Regards, Michael -- View this message in context: http://itext-general.2136553.n4.nabble.com/flatten-a-pdf-tp4277831p4281565.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php