pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1592629 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java
Date Mon, 05 May 2014 21:01:07 GMT
Author: lehmi
Date: Mon May  5 21:01:06 2014
New Revision: 1592629

URL: http://svn.apache.org/r1592629
Log:
PDFBOX-2058: added getCharacterForName

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java?rev=1592629&r1=1592628&r2=1592629&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java Mon
May  5 21:01:06 2014
@@ -246,6 +246,24 @@ public abstract class Encoding implement
     }
 
     /**
+     * This will take a name and get the character code for that name.
+     * 
+     * @param name The name.
+     * 
+     * @return The name of the character.
+     * 
+     */
+    public static String getCharacterForName(String name)
+    {
+        if (NAME_TO_CHARACTER.containsKey(name))
+        {
+            LOG.debug("No character for name " + name);
+            return NAME_TO_CHARACTER.get(name);
+        }
+        return null;
+    }
+
+    /**
      * This will take a character code and get the name from the code.
      *
      * @param c The character.



Mime
View raw message