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

COSName is not ascii

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.3
    • 2.0.6, 3.0.0 PDFBox
    • Parsing
    • None

    Description

      Trunk seems ok
      PDF is from PDFBOX-783

      public static void main( String[] args ) throws IOException {
          PDDocument doc = PDDocument.load(new File("A02Gj780LZ.pdf"));
          COSDictionary x = doc.getPage(0).getResources().getCOSObject();
              read(x);
          doc.close();
      }
      
      private static void read(COSBase b) {
          if (b instanceof COSObject) {
              read(((COSObject) b).getObject());
          } else if (b instanceof COSDictionary) {
              for (COSBase x : ((COSDictionary) b).getValues()) {
                  read(x);
              }
          } else if (b instanceof COSName) {
              if(((COSName) b).getName().charAt(0) > 256)
                  throw new RuntimeException(((COSName) b).getName());
          }
      }
      

      Attachments

        1. COSNameAcrobat.png
          2 kB
          Maruan Sahyoun

        Activity

          People

            lehmi Andreas Lehmkühler
            ssteiner Simon Steiner
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: