Hi,
I’m allowing users to concatenate several pages from a few PDFs. Sometimes these PDFs have form fields that the user edit in free text within Adobe. Say a form like 1040 EZ. Sometimes after the user edits and merges these type of documents, the values in the text fields gets lost and is replaced with a line.
Here is the code we are using
PdfFileEditor editor = new PdfFileEditor();
pageStreams = new Stream[pageNos.Length];:
for (int count = 0; count < pageNos.Length; count++)
{
string tempFileName = System.IO.Path.GetTempFileName();
pageStreams[count] = utils.ExtractPage(inStream, tempFileName, pageNos[count]);
pageStreams[count].Position = 0;
}
using (outStream = new FileStream(outFile, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite))
{
editor.Concatenate(pageStreams, outStream);
}