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

Optional Content Groups with same names can't have different visibility

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.8
    • Fix Version/s: 2.0.9, 3.0.0 PDFBox
    • Component/s: PDModel
    • Labels:

      Description

      According to PDF specs, it is possible to create OC Groups with the same name. Their visibility should be determined using object references (object number and generation number). The current implementation of PDOptionalContentProperties does not allow to create and check visibility of two different groups with the same name because all checks are done using group name, not group object key.

      Provided PDF demonstrates this issue.

      The attached patch adds an ability to use PDOptionalContentGroup as key to check and set group visibility.

        Attachments

        1. layers.pdf
          54 kB
          Ivan Khaldeev
        2. check_group_by_object_ref.patch
          9 kB
          Ivan Khaldeev

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              ikhaldeev Ivan Khaldeev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: