Using iTextSharp, how can I merge multiple PDFs into one PDF without losing the Form Fields and their properties in each individual PDF?
(I would prefer
you can also use this code.... it will merge all the pdf file without losing field value..
Document document = new Document();
try
{
string destinationfile = desktopPath.Replace(@"d:\outputfile.pdf");
PdfCopyFields copier = new PdfCopyFields(new FileStream(destinationfile, FileMode.Create));
PdfImportedPage page;
//Loops for each file that has been listed
foreach (string filename in fileList)
{
flag++;
try
{
//The current file path
string filePath = sourcefolder + filename;
PdfReader reader = new PdfReader(filePath);
copier.AddDocument(reader);
}
catch
{
}
}
copier.Close();
}