You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2020/03/14 13:05:04 UTC

svn commit: r1875193 - in /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox: contentstream/PDFStreamEngine.java text/LegacyPDFStreamEngine.java

Author: tilman
Date: Sat Mar 14 13:05:04 2020
New Revision: 1875193

URL: http://svn.apache.org/viewvc?rev=1875193&view=rev
Log:
PDFBOX-4071: clarify javadoc, see https://mail-archives.apache.org/mod_mbox/pdfbox-users/202001.mbox/%3CCALLobQOLk5jzJigAAMJCFVWcc1Kg-B0SGRxCHqtM-RGKyR1xTQ%40mail.gmail.com%3E

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/LegacyPDFStreamEngine.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java?rev=1875193&r1=1875192&r2=1875193&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java Sat Mar 14 13:05:04 2020
@@ -764,7 +764,7 @@ public abstract class PDFStreamEngine
     }
 
     /**
-     * Called when a glyph is to be processed.This method is intended for overriding in subclasses,
+     * Called when a glyph is to be processed. This method is intended for overriding in subclasses,
      * the default implementation does nothing.
      *
      * @param textRenderingMatrix the current text rendering matrix, T<sub>rm</sub>
@@ -788,7 +788,7 @@ public abstract class PDFStreamEngine
     }
 
     /**
-     * Called when a glyph is to be processed.This method is intended for overriding in subclasses,
+     * Called when a glyph is to be processed. This method is intended for overriding in subclasses,
      * the default implementation does nothing.
      *
      * @param textRenderingMatrix the current text rendering matrix, T<sub>rm</sub>
@@ -805,7 +805,7 @@ public abstract class PDFStreamEngine
     }
 
     /**
-     * Called when a glyph is to be processed.This method is intended for overriding in subclasses,
+     * Called when a glyph is to be processed. This method is intended for overriding in subclasses,
      * the default implementation does nothing.
      *
      * @param textRenderingMatrix the current text rendering matrix, T<sub>rm</sub>

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/LegacyPDFStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/LegacyPDFStreamEngine.java?rev=1875193&r1=1875192&r2=1875193&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/LegacyPDFStreamEngine.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/LegacyPDFStreamEngine.java Sat Mar 14 13:05:04 2020
@@ -65,9 +65,9 @@ import org.apache.pdfbox.pdmodel.font.PD
 /**
  * LEGACY text calculations which are known to be incorrect but are depended on by PDFTextStripper.
  *
- * This class exists only so that we don't break the code of users who have their own subclasses
- * of PDFTextStripper. It replaces the good implementation of showGlyph in PDFStreamEngine, with
- * a bad implementation which is backwards compatible.
+ * This class exists only so that we don't break the code of users who have their own subclasses of
+ * PDFTextStripper. It replaces the mostly empty implementation of showGlyph() in PDFStreamEngine
+ * with a heuristic implementation which is backwards compatible.
  *
  * DO NOT USE THIS CODE UNLESS YOU ARE WORKING WITH PDFTextStripper.
  * THIS CODE IS DELIBERATELY INCORRECT, USE PDFStreamEngine INSTEAD.
@@ -140,7 +140,8 @@ class LegacyPDFStreamEngine extends PDFS
     }
 
     /**
-     * This method was originally written by Ben Litchfield for PDFStreamEngine.
+     * Called when a glyph is to be processed. The heuristic calculations here were originally
+     * written by Ben Litchfield for PDFStreamEngine.
      */
     @Override
     protected void showGlyph(Matrix textRenderingMatrix, PDFont font, int code, String unicode,