HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › General questions / FAQ › Junk filenames of the attachments in PDF
- This topic has 5 replies, 2 voices, and was last updated Oct 09, 2012
00:51:38 byxadam.
-
AuthorPosts
-
September 18, 2012 at 05:59#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.September 20, 2012 at 12:12#29118Here 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.
September 24, 2012 at 17:28#29119It 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.
September 26, 2012 at 14:13#29120Thank 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.October 8, 2012 at 17:37#29121The problem is going to be solved with the forthcoming PD4ML maintenance release.
October 9, 2012 at 00:51#29122Thank you very much~
-
AuthorPosts
The forum ‘General questions / FAQ’ is closed to new topics and replies.
