Hi,
I'm trying to append one PDF file to another. The resulting output is
always PDF version 1.4.
For instance, if one is 1.6 and the other 1.4, the output is 1.4 (which
probably makes sense).
But if both PDF files are verision 1.6, the output is still 1.4. Why is
that?
I am using PdfReader, PdfCopy and PdfImportedPage when concatenating the
files (see example code below).
Thanks in advance
Marcus
Example code:
string outputName = ("c:\\temp\\output.pdf";
PdfReader orig_reader = new PdfReader("c:\\temp\\tmp.pdf");
Document document = new Document();
PdfCopy writer = new PdfCopy(document, new FileStream(outputName,
FileMode.Create));
document.Open();
PdfImportedPage page = writer.GetImportedPage(orig_reader, 1);
writer.AddPage(page);
PdfReader app_reader = null;
if (AppACheckBox.Checked)
{
app_reader = new PdfReader("c:\\temp\\appendix.pdf");
page = writer.GetImportedPage(app_reader, 1);
app_reader.Close();
writer.AddPage(page);
}
writer.Close();
FileInfo fi = new FileInfo("c:\\temp\\tmp.pdf");
fi.Delete();
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/