Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.4, 3.0.0 PDFBox
    • Component/s: Parsing
    • Labels:
      None
    • Environment:
      Latest 2.0.x checked out the 22nd of November

      Description

      We have a document where the content stream contains a float with double negative so something like --242.0 and this result in a wrong operator:

        0 -242.0 72.08 TD
      

      while it should be

      -242.0 72.08 TD
      

      Compared to Acrobat Reader or pdf.js, this results in missing text when rendering the page. Here is a relevant section in pdf.js source code:

       if (ch === 0x2D) { // '-'
              sign = -1;
              ch = this.nextChar();
      
              if (ch === 0x2D) { // '-'
                // Ignore double negative (this is consistent with Adobe Reader).
                ch = this.nextChar();
              }
      } 
      

        Attachments

        1. PDFBOX-3589.pdf
          16 kB
          Tilman Hausherr
        2. PDFBOX-3589_float.pdf
          16 kB
          Andrea Vacondio

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              torakiki Andrea Vacondio
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: