From PDF 32000-1:2008, section 12.7.7.3.1, table 243 (Entries in the FDF dictionary), on page 459:
Key: Encoding Type: name Value: (Optional; PDF 1.3) The encoding that shall be used for any FDF field value or option (V or Opt in the field dictionary; see Table 246) or field name that is a string and does not begin with the Unicode prefix U+FEFF. Default value: PDFDocEncoding. Other allowed values include Shift_JIS, BigFive, GBK, UHC, utf_8, utf_16 --- I posted a version of this patch to: https://sourceforge.net/p/itext/patches/101/ back in 2012-09-20, but I never heard back. The patch-submission interface on SF seems to be gone, so I'm mailing the patch to the list. It would be nice if itext was versioned in Git (to make it easier for me to maintain a patched version). It would be even nicer if there was an easy way to submit and browse issues/patches. Cheers, Trevor --- Index: itext/src/main/java/com/itextpdf/text/pdf/FdfReader.java =================================================================== --- itext/src/main/java/com/itextpdf/text/pdf/FdfReader.java (revision 5665) +++ itext/src/main/java/com/itextpdf/text/pdf/FdfReader.java (working copy) @@ -216,6 +216,8 @@ return new String(b, "GBK"); else if (encoding.equals(PdfName.BIGFIVE)) return new String(b, "Big5"); + else if (encoding.equals(PdfName.UTF_8)) + return new String(b, "UTF8"); } catch (Exception e) { } @@ -230,4 +232,4 @@ public String getFileSpec() { return fileSpec; } -} \ No newline at end of file +} Index: itext/src/main/java/com/itextpdf/text/pdf/PdfName.java =================================================================== --- itext/src/main/java/com/itextpdf/text/pdf/PdfName.java (revision 5665) +++ itext/src/main/java/com/itextpdf/text/pdf/PdfName.java (working copy) @@ -2012,6 +2012,8 @@ /** A name */ public static final PdfName USETHUMBS = new PdfName("UseThumbs"); /** A name */ + public static final PdfName UTF_8 = new PdfName("utf_8"); + /** A name */ public static final PdfName V = new PdfName("V"); /** A name */ public static final PdfName V2 = new PdfName("V2");
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d
_______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php