Skip to content

Commit c95c3c6

Browse files
committed
PDFBOX-5930: add font name
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1922695 13f79535-47bb-0310-9956-ffa450edef68
1 parent 7dcf897 commit c95c3c6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

examples/src/main/java/org/apache/pdfbox/examples/util/DrawPrintTextLocations.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ protected void writeString(String string, List<TextPosition> textPositions) thro
272272
{
273273
for (TextPosition text : textPositions)
274274
{
275-
System.out.println("String[" + text.getXDirAdj() + ","
276-
+ text.getYDirAdj() + " fs=" + text.getFontSize() + " xscale="
275+
System.out.println("String[" + text.getXDirAdj() + "," + text.getYDirAdj()
276+
+ " font=" + text.getFont().getName() + ":" + text.getFontSize() + " xscale="
277277
+ text.getXScale() + " height=" + text.getHeightDir() + " space="
278278
+ text.getWidthOfSpace() + " width="
279279
+ text.getWidthDirAdj() + "]" + text.getUnicode());

examples/src/main/java/org/apache/pdfbox/examples/util/PrintTextLocations.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,10 @@ protected void writeString(String string, List<TextPosition> textPositions) thro
8080
{
8181
for (TextPosition text : textPositions)
8282
{
83-
System.out.println( "String[" + text.getXDirAdj() + "," +
84-
text.getYDirAdj() + " fs=" + text.getFontSize() + " xscale=" +
85-
text.getXScale() + " height=" + text.getHeightDir() + " space=" +
83+
System.out.println( "String[" +
84+
text.getXDirAdj() + "," + text.getYDirAdj() +
85+
" font=" + text.getFont().getName() + ":" + text.getFontSize() +
86+
" xscale=" + text.getXScale() + " height=" + text.getHeightDir() + " space=" +
8687
text.getWidthOfSpace() + " width=" +
8788
text.getWidthDirAdj() + "]" + text.getUnicode() );
8889
}

0 commit comments

Comments
 (0)