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

Improve CodespaceRange to be in line with the spec

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.19, 3.0.0 PDFBox
    • 2.0.20, 3.0.0 PDFBox
    • FontBox
    • None

    Description

      While working on PDFBOX-4749 I've realized that the implementation of a CodespaceRange from a CMap isn't correct.

      For one byte ranges startBytes and endBytes define a linear range of values. Double byte values define a rectangular range not a linear range.
      Examples:

      • <00> <20> defines a linear range from 0x00 up to 0x20
      • <8140> to <9FFC> defines a rectangular range. The high byte has to be within 0x81 and 0x9F and the low byte has to be within 0x40 and 0xFC. The old implementation assumes the codespacerange ranges from <8140> to <9FFC>

      Attachments

        Activity

          People

            lehmi Andreas Lehmkühler
            lehmi Andreas Lehmkühler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: