Forum Replies Created

Viewing 15 posts - 2,596 through 2,610 (of 4,243 total)
  • Author
    Posts
  • in reply to: General questions / FAQ
    #26905

    Hello People,

    I have downloaded a trial version demonstrating documents to PDF. Which contains ss_css2.jar file, but this is throwing error org.w3c.css.sac.CSSException & at com.steadystate.css.parser.SACParser.parseStyleSheet……. One of my friend told me that its because ss_css2.jar i am using is not updated one. We have licenced users of pd4ml. What should we do now..??

    Regards,
    Mohit

    in reply to: where do i find updated ss_css2.jar file
    #29482

    The most recent PD4ML versions include the most actual ss_css2.jar we have. if you experience troubles with CSS parsing it would make sense to analyze the problem reason and to adjust CSS stylesheet correspondingly. Unfortunately ss_css2.jar “understands” not all CSS3 syntax constructs may appear in stylesheets.

    in reply to: Possible memory leak in finalizers
    #29494

    PD4ML caches objects using soft references in a static hash table. As soon as there is a shortage of RAM, JVM must automatically release such objects and deallocate consumed RAM. If there is no allocation requests, it is up to JVM either to keep the objects cached or garbage-collect them.

    There is an API call pd4ml.clearCache() forces to clean cache (and consumed RAM). The JVM setting -Dpd4ml.cache.enable=false disables caching at all.

    After a particular image is loaded by PD4ML it is also instantiated as Imager object. If AWT also caches images of not – depends on a particular JVM implementation.

    As for me it is suspicious, that the data is accumulated somewhere in the internals sun.awt.image.ToolkitImage.

    in reply to: HTML/CSS rendering issues
    #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

    in reply to: Convert html source to pdf
    #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.

    in reply to: Convert html source to pdf
    #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

    in reply to: Convert html source to pdf
    #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.

    in reply to: Convert html source to pdf
    #29511

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

    in reply to: Convert html source to pdf
    #29512

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

    in reply to: Convert html source to pdf
    #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

    in reply to: Convert html source to pdf
    #29514

    sorry

    in reply to: Convert html source to pdf
    #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!

    in reply to: Convert html source to pdf
    #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);

    in reply to: Convert html source to pdf
    #29517

    Is this generation also work with demo jar?

    in reply to: Convert html source to pdf
    #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!

Viewing 15 posts - 2,596 through 2,610 (of 4,243 total)