Create Pdf based on XML: hyphenation does not work

Hi,

I try to use hyphenation in combination with XML and Aspose.Pdf. In the attachments you’ll find the XML file with the text to hyphenate and the hyphenation XML file. With the following Java code I create the Pdf file:

Pdf pdf = new Pdf();
pdf.bindXML("/tmp/example_hyphenation2.xml", null);
pdf.setIsAutoHyphenated(true);
pdf.setHyphenationDictionaryPath("/tmp/example_hyphenationInfo2.xml");
pdf.setHyphenationZoneWidth(0);
pdf.setConsecutiveHyphensLimits(0);
pdf.save(“tmp/example_hyphenation_result.pdf”);

The result is a NullPointerException. What is wrong?

Hi Pascal,


Thanks
for using our products.

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as
PDFJAVA-33173. We
will investigate this issue in details and will keep you updated on the status
of a correction.

We
apologize for your inconvenience.