显示阿拉伯数字



我的问题是使用docx4j当我在本地中将docx转换为pdf时,它很好地显示了英语数字,例如" 0123456789",但是当我转换其他机器时,它会显示阿拉伯数字,例如"

非常感谢,我的代码是

    String regex = null;
    PhysicalFonts.setRegex(regex);
    FOSettings foSettings = Docx4J.createFOSettings();
    foSettings.setWmlPackage(wordMLPackage);
    Docx4J.toFO(foSettings, os, Docx4J.FLAG_NONE);
    logger.info(" Successfully Convert into PDF ");

检查docx4j.properties:

# These affect the output of numbers in Arabic; see further RunFontSelector
# For further discussion, please see http://www.docx4java.org/forums/pdf-output-f27/arabic-number-digits-in-pdf-output-t1826.html
# Value can be 'Context'|'National'
docx4j.MicrosoftWindows.Region.Format.Numbers.NativeDigits=National
# Value can be 'Hindi'|'Context'|'Arabic'|'System'; default is Arabic ie 1234
docx4j.MicrosoftWord.Numeral=Arabic

最新更新