We are using Aspose.PDF to merge pdf files. Attached are 2 sample documents that need to be merge, they are the same document, renamed.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Problem Statement: When documents with dynamic fields like drop downs and editable text fields are merged with other such documents, the result is losing these dynamic fields.
Expected Result: We want to preserve these dynamic fields even after the merge.
Aspose’s online example at - http://www.aspose.com/demos/.net-components/aspose.pdf/csharp/pdfdemos/General/Concatenate.aspx is able to do the merge correctly, but when write the same code in a standalone console or windows app, it is still losing these dynamic fields for the first document.
public partial class Form1 : Form
private void button1_Click(object sender, EventArgs e)
private void AsposeMerge()
string f1 = @"C:\Users\nbdelxy\Desktop\d0ae7428-4eb2-4c59-abd4-2b9fdb373baa.pdf";
string f2 = @"C:\Users\nbdelxy\Desktop\testmergepdfs.pdf";
string outFile = @"C:\Users\nbdelxy\Desktop\testing123.pdf";
Aspose.Pdf.License lic = new Aspose.Pdf.License();
Aspose.Pdf.Document doc1 = new Document(f1);
Aspose.Pdf.Document doc2 = new Document(f2);
MemoryStream outStream = new MemoryStream();
using (FileStream file = new FileStream(outFile, FileMode.Create, FileAccess.Write))
byte bytes = new byte[outStream.Length];
outStream.Read(bytes, 0, (int)outStream.Length);
file.Write(bytes, 0, bytes.Length);
catch (Exception ex)