pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ernst Eibensteiner (JIRA)" <j...@apache.org>
Subject [jira] Updated: (PDFBOX-515) The handle is invalid when merging 2 pdfs from different pdf generators
Date Mon, 08 Mar 2010 11:29:27 GMT

     [ https://issues.apache.org/jira/browse/PDFBOX-515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ernst Eibensteiner updated PDFBOX-515:
--------------------------------------

    Attachment: invalid handle.patch

Please find attached  patch as mentioned above.

> The handle is invalid when merging 2 pdfs from different pdf generators
> -----------------------------------------------------------------------
>
>                 Key: PDFBOX-515
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-515
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 0.7.3
>         Environment: Windows 2003 SP2; X86; java version 1.6.0_13
>            Reporter: Ernst Eibensteiner
>         Attachments: invalid handle.patch, pdfboxpdfs.zip
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> If I try to merge 2 PDFs using PDFMerger.java, that have been created with 2 different
pdf generators an exception is thrown:
> Exception in thread "main" org.pdfbox.exceptions.COSVisitorException: The handle
>  is invalid
>         at org.pdfbox.pdfwriter.COSWriter.visitFromStream(COSWriter.java:953)
>         at org.pdfbox.cos.COSStream.accept(COSStream.java:215)
>         at org.pdfbox.cos.COSObject.accept(COSObject.java:220)
>         at org.pdfbox.pdfwriter.COSWriter.doWriteObject(COSWriter.java:444)
>         at org.pdfbox.pdfwriter.COSWriter.doWriteBody(COSWriter.java:375)
>         at org.pdfbox.pdfwriter.COSWriter.visitFromDocument(COSWriter.java:782)
>         at org.pdfbox.cos.COSDocument.accept(COSDocument.java:388)
>         at org.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1084)
>         at org.pdfbox.pdmodel.PDDocument.save(PDDocument.java:740)
>         at org.pdfbox.pdmodel.PDDocument.save(PDDocument.java:721)
>         at org.pdfbox.util.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:158)
>         at org.pdfbox.PDFMerger.merge(PDFMerger.java:78)
>         at org.pdfbox.PDFMerger.main(PDFMerger.java:54)
> java.io.IOException: The handle is invalid
>         at java.io.RandomAccessFile.seek(Native Method)
>         at org.pdfbox.io.RandomAccessFile.seek(RandomAccessFile.java:73)
>         at org.pdfbox.io.RandomAccessFileInputStream.read(RandomAccessFileInputStream.java:110)
>         at java.io.BufferedInputStream.fill(Unknown Source)
>         at java.io.BufferedInputStream.read1(Unknown Source)
>         at java.io.BufferedInputStream.read(Unknown Source)
>         at org.pdfbox.pdfwriter.COSWriter.visitFromStream(COSWriter.java:940)
>         at org.pdfbox.cos.COSStream.accept(COSStream.java:215)
>         at org.pdfbox.cos.COSObject.accept(COSObject.java:220)
>         at org.pdfbox.pdfwriter.COSWriter.doWriteObject(COSWriter.java:444)
>         at org.pdfbox.pdfwriter.COSWriter.doWriteBody(COSWriter.java:375)
>         at org.pdfbox.pdfwriter.COSWriter.visitFromDocument(COSWriter.java:782)
>         at org.pdfbox.cos.COSDocument.accept(COSDocument.java:388)
>         at org.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1084)
>         at org.pdfbox.pdmodel.PDDocument.save(PDDocument.java:740)
>         at org.pdfbox.pdmodel.PDDocument.save(PDDocument.java:721)
>         at org.pdfbox.util.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:158)
>         at org.pdfbox.PDFMerger.merge(PDFMerger.java:78)
>         at org.pdfbox.PDFMerger.main(PDFMerger.java:54)
> But if I merge PDFs from the same generator everything works fine.
> I have uploaded 4 PDFs for testing purpose on: http://servicedesk.fabasoft.com/download/pdfboxpdfs.zip
> PDFMerger C:\Ghostscript1.pdf C:\Ghostscript2.pdf result.pdf ....works fine
> PDFMerger C:\ComSquare1.pdf C:\ComSquare2.pdf result.pdf ....works fine
> -----------------
> PDFMerger C:\Ghostscript1.pdf C:\ComSquare1.pdf result.pdf ....does not work
> PDFMerger C:\Ghostscript2.pdf C:\ComSquare2.pdf result.pdf ....does not work
> PDFMerger C:\Ghostscript1.pdf C:\ComSquare2.pdf result.pdf ....does not work
> PDFMerger C:\Ghostscript2.pdf C:\ComSquare1.pdf result.pdf ....does not work

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message