[
https://issues.apache.org/jira/browse/PDFBOX-3795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16016391#comment-16016391
]
Tilman Hausherr edited comment on PDFBOX-3795 at 5/18/17 8:13 PM:
------------------------------------------------------------------
This fixes the bug, which has existed at least since 2008. I'll do more
tomorrow. My current idea is to deprecate {{mergeInto}} and remove it in 3.0,
and do something local instead. It is used only for merging and the usage for a
COSStream is dangerous.
To repair existing *result* files merged this way - just get the metadata
object, then do this:
{code}
document.getDocumentCatalog().getMetadata().getCOSObject().removeItem(COSName.FILTER);
{code}
was (Author: tilman):
This fixes the bug, which has existed at least since 2008. I'll do more
tomorrow. My current idea is to deprecate {{mergeInto}} and remove it in 3.0,
and do something local instead. It is used only for merging and the usage for a
COSStream is dangerous.
For existing result files merged this way - just get the metadata object, then
do this:
{code}
document.getDocumentCatalog().getMetadata().getCOSObject().removeItem(COSName.FILTER);
{code}
> PDFMergeUtility error invalid stored block lengths
> --------------------------------------------------
>
> Key: PDFBOX-3795
> URL: https://issues.apache.org/jira/browse/PDFBOX-3795
> Project: PDFBox
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 2.0.6
> Reporter: Julian Cowan
> Labels: metadata, xmp
> Attachments: pdf-01.pdf, pdf-02.pdf, pdf-03.pdf
>
>
> PDFMergeUtility fails with a DataFormatException when trying to merge PDF
> documents.
> Caused by: java.util.zip.DataFormatException: invalid stored block lengths
> I have attached 3 PDF documents
> * pdf-01.pdf
> * pdf-02.pdf
> * pdf-03.pdf
> The first two PDF documents are good. They can be merged. In fact they were
> used to create the third document (pdf-03.pdf).
> When trying to merge another PDF with the third document, the PDF merge
> utility throws the error.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]