Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #26780

    My colleague wrote two JAVA programs, one is JAVA agent in Lotus Notes that will convert email into HTML. Another one is a web service, which will receive the HTML and convert it into PDF by pd4ml.
    When the email got a attachment which filename is non-English (In my test case, it is Traditional Chinese characters.), the PDF converted from it cannot show the correct filename of the attachment while the filenames as a text in the content of the email can be showed correctly.

    I have checked that the “description” of the attachment still got the correct filename and the HTML header had already specified the encoding in UTF-8. Also, the JAVA program for changing the HTML to PDF has set the TTF and the property file had been created for the fonts.

    I have also tried the latest version PD4ML Java v3.8.0fx7.

    What should I do?
    Thank you very much.

    #29118

    Here are more details of the problem.

    The original filenames of the attachments in the email:

    The filenames of the attachments in the rendered PDF, please note that the filenames in the content are correct:

    Thanks.

    #29119

    It looks like the file names are UTF-8-encoded, but treated as Latin by PD4ML.

    Please make sure you use the most recent dxl4pd4ml.xsl and pd4ml(_demo).jar. The actual stylesheet can be obtained from http://pd4ml.com/command-line-dxl-to-pdf-converter.htm

    Also it is a good idea to dump the document source as DXL and to try to convert it offline with the command line tool. It simplifies debug a lot. -dumphtml switch should help you to analyse if the names in HTML are correct, before the doc passed to PDF converter.

    #29120

    Thank you very much for the reply.
    I have downloaded the latest xsl file, pd4ml_demo.jar and ss_css2.jar.
    Then I have tried to convert the dxl file to a PDF file using the command line tool.

    Here is the HTML copied from the console by -dumphtml:

    The Chinese work are correct.

    And here is the console of using the command line tool:

    I have specified the fonts. I have tried specified the correct fonts and all fonts using the Chinese supported fonts. Both result still got the wrong characters of the filenames of the attachments in the PDF file.

    What should I do next?
    Thank a lot.

    #29121

    The problem is going to be solved with the forthcoming PD4ML maintenance release.

    #29122

    Thank you very much~

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

The forum ‘General questions / FAQ’ is closed to new topics and replies.