FOP
  1. FOP
  2. FOP-1913

[PATCH] Acessibility: Invalid PDF page content

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: unqualified
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • External issue ID:
      50986

      Description

      FOP uses an incorrect order of ET/EMC operands in some cases:
      BCD
      BT
      [...]
      EMC
      ET
      Correct would be:
      BCD
      BT
      [...]
      ET
      EMC
      [The last open element must be closed first]

      diff --git a/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java b/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
      — a/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
      +++ b/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
      @@ -270,10 +270,10 @@ public class PDFContentGenerator {
      /** Indicates the end of a text object. */
      protected void endTextObject() {
      if (textutil.isInTextObject()) {
      + textutil.endTextObject();
      if (this.inMarkedContentSequence)

      { endMarkedContentSequence(); }
      • textutil.endTextObject();
        }
        }

        Activity

          People

          • Assignee:
            fop-dev
            Reporter:
            Martin K
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development