Why does the customer care what the PDF version is? Does it matter? And for
that matter, are your PDF 1.4 files really 1.4 to start with??
Leonard
From: "chris.e...@depi.vic.gov.au<mailto:chris.e...@depi.vic.gov.au>"
<chris.e...@depi.vic.gov.au<mailto:chris.e...@depi.vic.gov.au>>
Reply-To: Post here
<itext-questions@lists.sourceforge.net<mailto:itext-questions@lists.sourceforge.net>>
Date: Wednesday, August 14, 2013 1:40 AM
To: Post here
<itext-questions@lists.sourceforge.net<mailto:itext-questions@lists.sourceforge.net>>
Subject: [iText-questions] PDF header changed from 1.6 to 1.4 when joining files
Hi
I have used the concatenation example to add a legend sheet to a map sheet.
Each of the two files has a %PDF-1.6 signature, but the combined file has
%PDF-1.4 as the signature.
String mapName = "map.pdf";
String legendName = "legend.pdf";
String newName = "combined.pdf";
String[] files = { mapName, legendName };
try
{
Document document = newDocument();
PdfCopy copy = newPdfCopy(document,
newFileOutputStream(newName));
document.open();
PdfReader reader;
for(inti = 0; i < files.length; i++)
{
reader = newPdfReader(files[i]);
int n = reader.getNumberOfPages();
for(intpage = 0; page < n; )
{
copy.addPage(copy.getImportedPage(reader, ++page));
}
copy.freeReader(reader);
reader.close();
}
document.close();
}
catch(Exception ex)
{
write_log("Error - "+ ex.getClass() + " " +
ex.getMessage() + " - merging " + fileName);
}
Why is this happening? It is confusing some of my customers who think the
document is version 1.4
I can add a version tag with
copy.setPdfVersion(PdfCopy.PDF_VERSION_1_6);
but this doesn't change the header.
.
Chris Egan
Notice:
This email and any attachments may contain information that is personal,
confidential,
legally privileged and/or copyright. No part of it should be reproduced,
adapted or communicated without the prior written consent of the copyright
owner.
It is the responsibility of the recipient to check for and remove viruses.
If you have received this email in error, please notify the sender by return
email, delete it from your system and destroy any copies. You are not
authorised to use, communicate or rely on the information contained in this
email.
Please consider the environment before printing this email.
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php