We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Merging documents

Thread ID:

Created:

Updated:

Platform:

Replies:

54755 Jan 17,2007 04:58 AM UTC Jan 17,2007 12:52 PM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: PDF
Chad Dunham
Asked On January 17, 2007 04:58 AM UTC

I am trying to import multiple existing PDFs with forms. I am able to attach as many pdfs as I want however, the form filling is not working. Below is my code that I am using.

Thanks
Chad

//////////////////
//Code starts here
//////////////////
PDFDocument doc = new PDFDocument();
doc.Pages.Remove(doc.Pages[0]);

Stream s = File.Open("form.pdf", FileMode.Open);
PDFDocument ldoc = new PDFDocument(s);
s.Close();

IPDFPage lPage; IPDFForm form;
for (int i = 0; i < 2; i++)
{
form = ldoc.Form;
form.Fields["field"].Value = "Form " + i;
form.Flatten();

for (int docPage = 0; docPage < ldoc.Pages.Count; docPage++)
{
lPage = ldoc.Pages[docPage];
doc.Pages.Add(lPage);
}
}
doc.Save("sample.pdf", Response, HttpReadType.Open);
//////////////////
//Code ends here
//////////////////

Dhivya K [Syncfusion]
Replied On January 17, 2007 12:52 PM UTC

Hi Chad,

Thank you for your interest in Essential PDF.

Currently we do not have support for merging multiple forms. However, we can flatten multiple forms after filling them and the merge them all. Or we can flatten them and add pages as you have done.

I am unable to reproduce the issue with your code.

Here is a sample for your reference.
Sample:http://www.syncfusion.com/Support/user/uploads/MergeForms_2003_cf9f67a6.zip

Please take a look into it and let me know if you have any queries. Could you please provide me your sample PDF forms that you are trying to fill. This will help me investigating further on this issue.

Regards,
Dhivya.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;