Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27202

    Hello,

    We are in the process of upgrading our system from JDK8 to JDK9 and have ran into a bit of a roadblock with our tests. A large part of our system are transformations of HTML to PDF and there are several tests failing for the following reason.

    We have a test that reads HTML-documents and makes sure that it generates proper PDF-data, basically by converting HTML -> PDF and then using a different PDF library to check that the generated bytes are indeed a PDF and check if the text extracted from it contains what we expect.

    This process gets stuck just at the beginning of the document. It seems like a UTF-8 “minus” character (U+2212) is used instead of a normal ascii minus sign (which is used in the rest of the coded document) and this causes the token to be read as a pdf string literal rather than a number, which in turn causes a class cast exception.

    Basically, this concerns the “% modifyCTM” section in the generated data. The two concerned rows used to look like this using PD4ML v.3.10.6 in JDK8:

    % modifyCTM
    0.8125 0 0 -0.8125 50 817 cm

    and now they look like this in JDK11:

    % modifyCTM
    0.8125 0 0 −0.8125 50 817 cm

    Notice the changed dash/minus character.

    It seems odd that the character is only changed in this section and not the rest of the file, as well as only seemingly being a problem with JDK8 -> 9 (changing JDK9 to JDK11 still causes the same error).

    Is there a bug in PD4ML that we have happened to stumble upon?

    The source html-file is available upon request.

    #30175

    We have, btw, updated our license and tried with v3.10.7 as well, but the same problem occurs.

    #30176

    Also, using:

    -Djava.locale.providers=COMPAT

    solves this issue, so it seems to be related to UTF-8 changes in JDK9:

    https://docs.oracle.com/javase/9/intl/internationalization-enhancements-jdk-9.htm#JSINT-GUID-5ED91AA9-B2E3-4E05-8E99-6A009D2B36AF

    #30177

    Sorry for the delay with the reply and thanks a lot for the very useful info you provided. Now we are trying to reproduce the issue to find a workaround (to avoid the need in the env setting)…

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘Troubleshooting’ is closed to new topics and replies.