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

    Hi!
    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!
    Virag

    #29508

    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.

    #29509

    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

    #29510

    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.

    #29511

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

    #29512

    But it still landscape I use the cookbook for try:
    pd4ml.setPageSize(pd4ml.changePageOrientation(PD4Constants.A4));

    #29513

    Yes, the code
    pd4ml.setPageSize(pd4ml.changePageOrientation(PD4Constants.A4));
    forces landscape.

    For portrait use
    pd4ml.setPageSize(PD4Constants.A4);

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

    #29514

    sorry

    #29515

    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!

    #29516

    First you would need to index the fonts in /Windows/Fonts (to generate pd4fonts.properties). See http://pd4ml.com/cookbook/pd4ml_pdf_true_type_fonts.htm

    A quick solution would be to place fonts.jar (i.e. from http://pd4ml.com/i/easyfonts/fonts.jar ) 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);

    #29517

    Is this generation also work with demo jar?

    #29518

    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!

    #29519

    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.