Culture Names is not supported

Hi,

I'm trying to create a com.aspose.pdf.Document from a stream containing a valid PDF document as follows:
com.aspose.pdf.Document pdfDocument1 = new com.aspose.pdf.Document( stream1 );

and I get the following Exception:

Caused by: class com.aspose.ms.System.f: Culture Name: en-NL is not a supported culture
com.aspose.ms.System.Globalization.i.a(Unknown Source)
com.aspose.ms.System.Globalization.i.(Unknown Source)
com.aspose.ms.System.Globalization.i.b(Unknown Source)
com.aspose.ms.System.l.w.beY(Unknown Source)
com.aspose.g.i.r.(Unknown Source)
com.aspose.g.m.h.bfO(Unknown Source)
com.aspose.g.m.h.reset(Unknown Source)
com.aspose.g.m.h.(Unknown Source)
com.aspose.g.m.h.(Unknown Source)
com.aspose.pdf.Document.(Unknown Source)

We are well aware of the fact that, in our JDK, the language is set to English while the country is set to Netherlands, resulting in a somewhat strange culture name: en-NL. (This is as intended: English collation order and Dutch regional settings).

Is there a way to get around this error?

Best regards,

Wim Roeling,
ADP,
Amsterdam, The Netherlands

Hi Wim,


Thanks for your inquiry. Please set Locale value as following before instantiating any PDF document. Hopefully it will help you to resolve the issue. If issue persist then please share your sample PDF document here, we will test the scenario and will guide you accordingly.


Locale locale = new Locale(“en”, “NL”);
Locale.setDefault(locale);

Document doc=new Document(“test.pdf”);

Please feel free to contact us for any further assistance.

Best Regards,