PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) Troubleshooting Trouble with server encoding (ISO-8859-15)

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

    Hi,
    our server has ISO-8859-15 encoding (-Dfile.encoding=ISO-8859-15) but PD4ML only supports ISO-8859-1 so it is generating empty PDFs.

    Is there any solution?

    Thank you.

    (P.D.: I’m the same person who posted this other topic and contacted with Igor Repinetski via e-mail some months ago. This time is not the same project/server.)

    #28716

    The server log says:
    new parse attempt with: ISO8859_1

    #28717

    That is a clear sign, that the source HTML has a directive with ISO-8859-1. Try to change it to ISO-8859-15 and make sure you also utilize TTF embedding feature of PD4ML.

    pd4ml-html-css-pdf-tips-tricks-f7/ttf-embedding-t42.html

    #28718

    I changed the page encoding and now it is not returning this line in log.

    I tried specifying the encoding in the render method, but it doesn’t work.

    <br /> StringReader input = new StringReader(content);<br /> <br /> HashMap map = new HashMap();<br /> map.put( "pd4ml.extra.resource.loaders", "package.CustomFileResourceProvider" );<br /> pd4ml.setDynamicParams(map);<br /> pd4ml.render(input,fos);<br />

    I removed all page content and only printing “HELLO” and then I tried printing the “content” value:
    <br /> <?xml version="1.0" encoding="ISO-8859-15"?><html xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/1999/xhtml"><br /> <head><br /> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" /><br /> </head><br /> <body><br /> HELLO<br /> <br /> </body><br /> </html><br />

    I also tried by specifying TTF with these lines:
    <br /> pd4ml.useTTF( "java:fonts", true );<br /> pd4ml.setDefaultTTFs("Times New Roman", "Arial", "Courier New");<br />

    It continues returning an empty PDF as the one I attach.

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

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