We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Culture Name: en-CN is not a supported culture

my code is blow:

public void setAsposeLicense(String asposeLicense) {
    try {
        InputStream is = new ByteArrayInputStream(asposeLicense.getBytes());
        com.aspose.words.License wordAposeLic = new com.aspose.words.License();
    } catch (Exception e) {
        LoggerUtil.error(logger, "初始化words apose失败", e);
    try {
        InputStream is = new ByteArrayInputStream(asposeLicense.getBytes());
        com.aspose.pdf.License pdfLicense = new com.aspose.pdf.License();
    } catch (Exception e) {
        LoggerUtil.error(logger, "初始化pdf apose失败", e);
    this.asposeLicense = asposeLicense;

aspose.word is ok, but aspose.pdf can’t work, and get the following error

10:23:14,522 ERROR LoggerUtil : [1e323e131618539786121100118767]初始化pdf apose失败
com.aspose.pdf.internal.ms.System.lh: Culture Name: en-CN is not a supported culture
at com.aspose.pdf.internal.l55h.lh.lt(Unknown Source) ~[aspose-pdf-21.2.jar:21.2]
at com.aspose.pdf.internal.l55h.lh.(Unknown Source) ~[aspose-pdf-21.2.jar:21.2]
at com.aspose.pdf.internal.l55h.lh.lI(Unknown Source) ~[aspose-pdf-21.2.jar:21.2]
at com.aspose.pdf.internal.l57k.l1v.lh(Unknown Source) ~[aspose-pdf-21.2.jar:21.2]
at com.aspose.pdf.internal.l55h.lh.lu(Unknown Source) ~[aspose-pdf-21.2.jar:21.2]
at com.aspose.pdf.internal.ms.System.l10l.lu(Unknown Source) ~[aspose-pdf-21.2.jar:21.2]
at com.aspose.pdf.l9u.lI(Unknown Source) ~[aspose-pdf-21.2.jar:21.2]
at com.aspose.pdf.License.setLicense(Unknown Source) ~[aspose-pdf-21.2.jar:21.2]


We were able to notice the similar issue in our environment and have logged it as PDFJAVA-40394 in our issue tracking system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

which version should i download?

in Aspose.PDF for Java 21.4 Release Notes, i did not find changes relate to PDFJAVA-40394


Please use internal culture for Aspose.PDF to avoid unexpected results:

com.aspose.pdf.LocaleOptions.setLocale(new Locale("en", "US")); 

I’m afraid there’s something unexpected if i do this.

When will the problem be solved?


We have re-opened the earlier logged ticket as per your provided feedback. We will further check its details and let you know once we have some updates regarding issue fix. Please give us little time.

We apologize for the inconvenience.

The issues you have found earlier (filed as PDFJAVA-40394) have been fixed in Aspose.PDF for Java 21.5.

i have solve the problem with this code
"com.aspose.pdf.LocaleOptions.setLocale(new Locale(“en”, “US”)); "


It’s good to know that suggested option has proved to be working on your end.