Please upload 2 files to a sharehoster and the post code you used, I'll
then investigate. It should take the highest version, here's an excerpt
of our source code:
// use the highest version number for the resulting pdf
float destVersion = destination.getVersion();
float srcVersion = source.getVersion();
if (destVersion < srcVersion)
{
destination.setVersion(srcVersion);
}
Tilman
On 12.06.2024 12:34, Suryavanshi, Sajal wrote:
Hi,
We tried below solution:
use CompressParameters.NO_COMPRESSION as second parameter. For the first
parameter, use IOUtils.createMemoryOnlyStreamCache()
But this now geenrates the pdf in version 1.4, our expectation is that the
version of pdf should remain 1.5 which is original version of input pdf.
Could you please suggest on this?
Thanks,
Sajal
From: Suryavanshi, Sajal
Sent: Thursday, June 6, 2024 5:28 PM
To: users@pdfbox.apache.org
Cc: Pradhan, Kartik <kartik.prad...@fisglobal.com>
Subject: PDFMergerUtility creating PDFs with incorrect version
Need help with below issue:
PDFBox :- version 3.0.2
Input PDFs :- version 1.5
When using method PDFMergerUtility.mergeDocuments for merging input pdfs , it
creates output PDFs having version 1.6
Tried other method PDFMergerUtility.appendDocument and set version of
destination PDF document to 1.5 using method PDDocument.setVersion , still the
output PDF is version 1.6
When checked version with method PDDocument.getVersion , it shows correct
version 1.5 but the PDF version under the document properties still shows
version 1.6, that is why all the other tools are considering the version as 1.6
Thanks in advance.
Thanks,
Sajal
The information contained in this message is proprietary and/or confidential.
If you are not the intended recipient, please: (i) delete the message and all
copies; (ii) do not disclose, distribute or use the message in any manner; and
(iii) notify the sender immediately. In addition, please be aware that any
message addressed to our domain is subject to archiving and review by persons
other than the intended recipient. Thank you. Message Encrypted via TLS
connection
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org