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 2024/12/26 11:38:06 UTC

svn commit: r1922694 - in /pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/util: DrawPrintTextLocations.java PrintTextLocations.java

Author: tilman
Date: Thu Dec 26 11:38:06 2024
New Revision: 1922694

URL: http://svn.apache.org/viewvc?rev=1922694&view=rev
Log:
PDFBOX-5930: add font name

Modified:
    pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/util/DrawPrintTextLocations.java
    pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/util/PrintTextLocations.java

Modified: pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/util/DrawPrintTextLocations.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/util/DrawPrintTextLocations.java?rev=1922694&r1=1922693&r2=1922694&view=diff
==============================================================================
--- pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/util/DrawPrintTextLocations.java (original)
+++ pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/util/DrawPrintTextLocations.java Thu Dec 26 11:38:06 2024
@@ -291,8 +291,8 @@ public class DrawPrintTextLocations exte
     {
         for (TextPosition text : textPositions)
         {
-            System.out.println("String[" + text.getXDirAdj() + ","
-                    + text.getYDirAdj() + " fs=" + text.getFontSize() + " xscale="
+            System.out.println("String[" + text.getXDirAdj() + "," + text.getYDirAdj()
+                    + " font=" + text.getFont().getName() + ":" + text.getFontSize() + " xscale="
                     + text.getXScale() + " height=" + text.getHeightDir() + " space="
                     + text.getWidthOfSpace() + " width="
                     + text.getWidthDirAdj() + "]" + text.getUnicode());

Modified: pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/util/PrintTextLocations.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/util/PrintTextLocations.java?rev=1922694&r1=1922693&r2=1922694&view=diff
==============================================================================
--- pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/util/PrintTextLocations.java (original)
+++ pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/util/PrintTextLocations.java Thu Dec 26 11:38:06 2024
@@ -88,9 +88,10 @@ public class PrintTextLocations extends
     {
         for (TextPosition text : textPositions)
         {
-            System.out.println( "String[" + text.getXDirAdj() + "," +
-                    text.getYDirAdj() + " fs=" + text.getFontSize() + " xscale=" +
-                    text.getXScale() + " height=" + text.getHeightDir() + " space=" +
+            System.out.println( "String[" + 
+                    text.getXDirAdj() + "," + text.getYDirAdj() + 
+                    " font=" + text.getFont().getName() + ":" + text.getFontSize() +
+                    " xscale=" + text.getXScale() + " height=" + text.getHeightDir() + " space=" +
                     text.getWidthOfSpace() + " width=" +
                     text.getWidthDirAdj() + "]" + text.getUnicode() );
         }