pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1857072 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java
Date Sun, 07 Apr 2019 08:25:41 GMT
Author: tilman
Date: Sun Apr  7 08:25:40 2019
New Revision: 1857072

URL: http://svn.apache.org/viewvc?rev=1857072&view=rev
Log:
PDFBOX-4508: improve javadoc

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java?rev=1857072&r1=1857071&r2=1857072&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java
Sun Apr  7 08:25:40 2019
@@ -96,11 +96,21 @@ public abstract class PDVariableText ext
     /**
      * Set the default appearance.
      * 
-     * This will set the local default appearance for the variable text field only not 
+     * This will set the local default appearance for the variable text field only, not 
      * affecting a default appearance in the parent hierarchy.
      * 
      * Providing null as the value will remove the local default appearance.
-     * 
+     * <p>
+     * This method can also be used to change the font of a field, by replacing the font
name from
+     * this string with another font name found in the AcroForm default resources <u>before</u>
+     * calling {@link #setValue(java.lang.String) setValue(String)}, see also
+     * <a href="https://stackoverflow.com/questions/47995062/pdfbox-api-how-to-handle-cyrillic-values">this
+     * stackoverflow answer</a>. For example, "/Helv 10 Tf 0 g" can be replaced with
"/F1 10 Tf 0
+     * g". Performance may go down (see
+     * <a href="https://issues.apache.org/jira/browse/PDFBOX-4508">PDFBOX-4508)</a>
if this is done
+     * for many fields and with a very large font (e.g. ArialUni); to avoid this, save and
reload
+     * the file after changing all fields.
+     *
      * @param daValue a string describing the default appearance
      */
     public void setDefaultAppearance(String daValue)



Mime
View raw message