Html2pdf - encoding problems

Hi,
if we try to convert attached htmlfile to pdf using aspose.pdf for java 19.4, we have problems with umlauts and special characters. On our windows server, words contains umlauts are not rendered at all. on our linux server, we get a placeholder.
original html:
grafik.png (4.5 KB)
d59cd505-cee2-453b-874f-e1a5c78ca443 beschlusstext.zip (726 Bytes)

rendered on windows:
grafik.png (7.8 KB)
rendered on linux:
grafik.png (15.7 KB)

HtmlLoadOptions htmlOptions = new HtmlLoadOptions();
htmlOptions.setInputEncoding(“UTF-8”);
htmlOptions.setWarningHandler(new HtmlPdfConverterWarnings());
Document pdfDocument = new Document(“c:/temp/input.html”,htmlOptions);
pdfDocument.save(“c:/temp/output.pdf”);

HtmlPdfConverterWarnings overrides warning. Within warning, we log the warningmessage and return continue.

Kind regards

@dvtdaten

We were able to observe the similar issue in our environment and for the sake of detailed investigation, we have logged it as PDFJAVA-38556 in our issue tracking system. We will further look into details of the issue and keep you posted with the status of its rectification. Please be patient and spare us little time.

We are sorry for the inconvenience.

Hi Asad,
Are there any update on this issue? I have similar problem explained in this ticket. Where can I check the status of PDFJAVA-38556.

Kind regards,

@fibabanka.corebanking

The logged ticket was already resolved.

The input html had Windows-1252 encoding (not UTF-8). So instead of:

htmlOptions.setInputEncoding(“UTF-8”);

below should have been used:

htmlOptions.setInputEncoding("Windows-1252");