Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4711

java.lang.ClassCastException: org.apache.pdfbox.cos.COSDictionary cannot be cast to org.apache.pdfbox.cos.COSStream

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.17
    • Fix Version/s: 2.0.18, 3.0.0 PDFBox
    • Component/s: Utilities
    • Labels:
      None
    • Environment:
      ubuntu 18.04

      Description

      I get a ClassCastException to merge documents

      java.lang.ClassCastException: org.apache.pdfbox.cos.COSDictionary cannot be cast to org.apache.pdfbox.cos.COSStream
       at org.apache.pdfbox.multipdf.PDFMergerUtility.appendDocument(PDFMergerUtility.java:707) ~[pdfbox-2.0.17.jar:2.0.17]
       at org.apache.pdfbox.multipdf.PDFMergerUtility.legacyMergeDocuments(PDFMergerUtility.java:459) ~[pdfbox-2.0.17.jar:2.0.17]
       at org.apache.pdfbox.multipdf.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:346) ~[pdfbox-2.0.17.jar:2.0.17]
      

      Metada for problematic pdf:

      Version                   1.5                       
      Page Count                1                         
      Encrypted                 false                     
      Ascent                    null                      
      CapHeight                 null                      
      Descent                   null                      
      Flags                     null                      
      FontBBox                  null                      
      FontName                  null                      
      FontWeight                null                      
      ItalicAngle               null                      
      StemV                     null                      
      Type                      null   

      Fonts

      PDType0Font/PDCIDFontType2, PostScript name: EZPGML+¹ÙÅÁü-WinCharSetFFFF-H2
      PDType0Font/PDCIDFontType2, PostScript name: FPDSYI+±¼¸²-WinCharSetFFFF-H2
      PDType0Font/PDCIDFontType2, PostScript name: UTGYRD+±¼¸²Ã¼-WinCharSetFFFF-H2 

       

        Attachments

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              Giorgy Jorge Spinsanti
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: