Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
  • #26913

    Before phurcase this product I must know, if it is possible to convert string array to pdf. The string array contains the html source and every string is the array should be in a new page. Thanks in advance!


    There is an API method

    pd4ml.render(StringReader[] isrs, OutputStream os, URL base)

    which is more-less what you need.

    Alternatively I would recommend to merge the string array into a single string, delimited by tags, and to pass it to render() method as a StringReader.


    I try what you mention, but only one page were generated, maybe because I use the trial library. The other problem is that the generated page is a, A4 landscape but I set the page orientatio as it is mantioned is the cookbook


    A trial library has no such limitations.

    probably there are closing and tags somewhere in the middle of document. The tags implicitly stop further document parsing.


    you are right, iremove the close tags and I have the pages.


    But it still landscape I use the cookbook for try:


    Yes, the code
    forces landscape.

    For portrait use

    Also you may change the orientation for particular pages with a dedicated parameter of




    Just one last question. We have text in the html source like this:
    <font size="6" face="Arial">ŐŐŐŐŐőőőőőááéűúöüópőúéáűí </font>
    But in the pdf it is wrong. The size is good, but the font is wrond and of course the encoding also wrong (hungarian).
    I try to set :
    pd4ml.useTTF("c:/Windows/Fonts", true);

    in warious format (case sensitive, use java font etc), but nothing helps. Thanks!


    First you would need to index the fonts in /Windows/Fonts (to generate See

    A quick solution would be to place fonts.jar (i.e. from ) to WEB-INF/lib of your web app (or to a shared lib of your desktop application) and to refer to it with:

    pd4ml.useTTF(“java:fonts”, true);


    Is this generation also work with demo jar?


    Thanks for your patient! I forgot to tell that I want to use this generation for an applet. I ti add the jad to my project and in the builder it seems that it is succesful, the fonts.jar has been signed and added to the lib folder of the applet. But when I try to create a pdf with the applet the fonts are not used. The color the size and every formatting is good but the font is wrong. What shuold be wrong? Thanks in advance!


    Make sure you use PD4ML Pro. PD4ML Std does not support TTF embedding/national scripts.

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

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.