I am starting with an interactive form, adding content, and then adding a table with interactive text fields to the starting document. Since this table needs to be placed dynamically in the page dependant upon the CurrentY position, I am using the ImportedPageArea class to add the table.
When I do this, the text fields are not imported along with the static text content. I applied this to the PlacePDFs sample as well and had the same issue. The fields are displayed but text cannot be inputted into the field. It's almost as if it's a screen shot of the imported PDF being added.
ImportedPageArea not Importing Fields
Re: ImportedPageArea not Importing Fields
Support · Jul 24, 2006Hello,
The reason you see this behavior is because when using ImportedPageArea to import a PDF, it will only bring the original PDF document without any data and also won't allow you to input any text in the form fields. As you mentioned, ImportedPageArea will only bring the snapshot of the PDF which can be added to the new PDF page.
Thanks,
ceTe Software Support Team
Re: ImportedPageArea not Importing Fields
Forum member · Jul 24, 2006I have 2 PDF documents that are only a half page of content and need to merge them onto the same page. Is this possible without using the Import Page area?
Re: ImportedPageArea not Importing Fields
Support · Jul 24, 2006Hello,
This is a limitation of using ImportedPageArea or ImportedPagaData. There is no other way you can preserve the form fields and place two PDF documents on one page.
Thanks,
ceTe Software Support Team
Re: ImportedPageArea not Importing Fields
Forum member · Mar 8, 2007I purchased dynamicPDF for the ability to take 2 pdfs which had form fields on them and then merge them onto one PDF and then access the form fields. Very disappointing because you say this on your web page and it is very confusing:
"
DynamicPDF™ Merger for .NET also includes an ImportedPage object that can be used to add content to an imported page using the Generator for .NET object model. This object inherits from the Generator for .NET's Page object and can have Page Elements or Custom Page Elements added to it. ***This is ideal for form filling or using an existing PDF document as a template.***
"
Actually, it is not, as you can't do any form filling.
Re: ImportedPageArea not Importing Fields
Support · Mar 8, 2007Hello,
You can merge multiple PDF documents and perform form filling without any problem. You can use the MergeDocument objects Append method to append multiple PDF documents and then reference the form fields with them name. You can refer to the AcroFormFill example downloaded with the product download.
If you use ImportedPageArea to import a PDF page, then the form fields or any existing annotations will not be preserved when adding the page because it only adds the contents of the page.
Thanks,
ceTe Software Support Team
Re: ImportedPageArea not Importing Fields
Forum member · Mar 8, 2007Thanks. But using the Append method, I will always end up with a 2 page PDF document right? I'd like to take a small section of one PDF and a small section of another PDF and make a one page PDF. (with the ability to fill in the forms fields as I mentioned above)
Here is the work around I came up with:
PdfDocument pdfDocA = new PdfDocument(@"DocumentA.pdf");
MergeDocument mergDocA = new MergeDocument(pdfDocA);
Page paged = mergDocA.Pages[0];
pdfDocA.Form.Fields["f1-1"].CreateLabel(paged, "Acme Corp #1", ceTe.DynamicPDF.Font.Courier, 12);
pdfDocA.Draw(@"MyDocumentPartA.pdf");
PdfDocument pdfDocB = new PdfDocument(@"DocumentB.pdf");
MergeDocument mergDocB = new MergeDocument(pdfDocB);
Page paged = mergDoc.Pages[0];
pdfDocB.Form.Fields["f1-2"].CreateLabel(paged, "Bob Jones", ceTe.DynamicPDF.Font.Courier, 12);
pdfDocB.Draw(@"MyDocumentPartB.pdf");
--Forms Fields are gone and have been replaced by Labels
--so when ImportedPageData runs the labels will carry over to the
--new PDF
Document documentC = new Document();
Page pageC = new Page(PageSize.Tabloid, PageOrientation.Portrait); pageC.Elements.Add(new ImportedPageData(@"DocumentA.pdf", 1, 0, 0));
pageC.Elements.Add(new ImportedPageData(@"DocumentB.pdf", 1, 0, 100));
documentC.Pages.Add(pageC);
documentC.Draw("FinalPDF.pdf");
Re: ImportedPageArea not Importing Fields
Forum member · Mar 8, 2007sorry - lots of errors in that last post. This is the code:
PdfDocument pdfDocA = new PdfDocument(rootpath + @"DocumentA.pdf");
MergeDocument mergDocA = new MergeDocument(pdfDocA);
Page pageA = mergDocA.Pages[0];
pdfDocA.Form.Fields["f1-1"].CreateLabel(pageA, "Acme Corp #1", ceTe.DynamicPDF.Font.Courier, 12);
mergDocA.Draw(rootpath + @"MyDocumentPartA.pdf");
PdfDocument pdfDocB = new PdfDocument(rootpath + @"DocumentB.pdf");
MergeDocument mergDocB = new MergeDocument(pdfDocB);
Page pageB = mergDocB.Pages[0];
pdfDocB.Form.Fields["f1-2"].CreateLabel(pageB, "Bob Jones", ceTe.DynamicPDF.Font.Courier, 12);
mergDocB.Draw(rootpath + @"MyDocumentPartB.pdf");
//Forms Fields are gone and have been replaced by Labels
//so when ImportedPageData runs the labels will carry over to the
//new PDF
Document documentC = new Document();
Page pageC = new Page(PageSize.Tabloid, PageOrientation.Portrait);
pageC.Elements.Add(new ImportedPageData(rootpath + @"MyDocumentPartA.pdf", 1, 0, 0));
pageC.Elements.Add(new ImportedPageData(rootpath + @"MyDocumentPartB.pdf", 1, 0, 100));
documentC.Pages.Add(pageC);
documentC.Draw(rootpath + "FinalPDF.pdf");
Re: ImportedPageArea not Importing Fields
Support · Mar 8, 2007Hello,
Yes, using the Append method will result in a two page PDF.
The method you have used is the only workaround that can be used to preserve form fields from two PDF documents and add them using ImportedPageArea and add them to one PDF page.
Thanks,
ceTe Software Support Team