You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "Suryavanshi, Sajal" <Sa...@fisglobal.com.INVALID> on 2024/06/06 11:58:21 UTC
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
Re: PDFMergerUtility creating PDFs with incorrect version
Posted by Tammy Savage <ta...@icloud.com.INVALID>.
> On 10 Jun 2024, at 18:10, Tilman Hausherr <TH...@t-online.de> wrote:
>
> Hi,
>
> Please try this: use CompressParameters.NO_COMPRESSION as second parameter. For the first parameter, use IOUtils.createMemoryOnlyStreamCache()
>
> Tilman
>
> On 06.06.2024 13:58, Suryavanshi, Sajal wrote:
>> 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-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: PDFMergerUtility creating PDFs with incorrect version
Posted by Tilman Hausherr <TH...@t-online.de>.
Hi,
Please try this: use CompressParameters.NO_COMPRESSION as second
parameter. For the first parameter, use
IOUtils.createMemoryOnlyStreamCache()
Tilman
On 06.06.2024 13:58, Suryavanshi, Sajal wrote:
> 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-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: PDFMergerUtility creating PDFs with incorrect version
Posted by Tilman Hausherr <TH...@t-online.de>.
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 <Ka...@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-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
RE: PDFMergerUtility creating PDFs with incorrect version
Posted by "Suryavanshi, Sajal" <Sa...@fisglobal.com.INVALID>.
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 <Ka...@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