Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.2.1
    • Fix Version/s: 4.2.2
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      -

      Description

      The text on the first page is displayed in reverse. No exceptions are thrown so likely a parsing issue.
      1. sc10067.PDF
        741 kB
        Tyler Johnson
      1. page1.jpg
        21 kB
      2. page2.jpg
        143 kB

        Activity

        Hide
        Patrick Corless added a comment -

        Definitely a layout issue. with the rendering core. I thought it might be parser change introduced in 4.2 for how text scaling is handled but test prove otherwise.

        Show
        Patrick Corless added a comment - Definitely a layout issue. with the rendering core. I thought it might be parser change introduced in 4.2 for how text scaling is handled but test prove otherwise.
        Hide
        Patrick Corless added a comment -

        It turns out this is the dreaded text scaling issue. After a lot of debugging, spec reading and pattern matching I think I've made some sense of the issue. The content parser was applying the text scaling value before each text positioning operator which cause the coordinate space to flip vertically if a negative text scaling value is encountered. I reworked the parser to only apply the text scalling after Tm as well as a Tz and Td. This fixed the PDF in question as it has a text scale of 1 and -1. However in other test PDF a layout issue start to show up. Closer inspectionshowed that scaling values of > or < 1 where causing the layout issue.

        In the PDF in question the content stream was very similar other than the text scale numbers. I added code that will round the scale factor to the nearest 1, that is 1 or -1. I still have to run this through qa but it looks to solve the issue, but no mention of the reason for this in the specification.

        Show
        Patrick Corless added a comment - It turns out this is the dreaded text scaling issue. After a lot of debugging, spec reading and pattern matching I think I've made some sense of the issue. The content parser was applying the text scaling value before each text positioning operator which cause the coordinate space to flip vertically if a negative text scaling value is encountered. I reworked the parser to only apply the text scalling after Tm as well as a Tz and Td. This fixed the PDF in question as it has a text scale of 1 and -1. However in other test PDF a layout issue start to show up. Closer inspectionshowed that scaling values of > or < 1 where causing the layout issue. In the PDF in question the content stream was very similar other than the text scale numbers. I added code that will round the scale factor to the nearest 1, that is 1 or -1. I still have to run this through qa but it looks to solve the issue, but no mention of the reason for this in the specification.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: