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 2018/03/27 16:32:39 UTC
svn commit: r1827844 -
/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java
Author: tilman
Date: Tue Mar 27 16:32:39 2018
New Revision: 1827844
URL: http://svn.apache.org/viewvc?rev=1827844&view=rev
Log:
PDFBOX-4168: Add a setTextRise() method, as suggested by MatÃas Giovannini
Modified:
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java?rev=1827844&r1=1827843&r2=1827844&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java Tue Mar 27 16:32:39 2018
@@ -2599,4 +2599,18 @@ public final class PDPageContentStream i
writeOperand(scale);
writeOperator("Tz");
}
+
+ /**
+ * Set the text rise value, i.e. move the baseline up or down. This is useful for drawing
+ * superscripts or subscripts.
+ *
+ * @param rise Specifies the distance, in unscaled text space units, to move the baseline up or
+ * down from its default location. 0 restores the default location.
+ * @throws IOException
+ */
+ public void setTextRise(float rise) throws IOException
+ {
+ writeOperand(rise);
+ writeOperator("Ts");
+ }
}