Forum Replies Created

Viewing 15 posts - 76 through 90 (of 1,410 total)
  • Author
    Posts
  • in reply to: border-radius is supported in pd4ml ?
    #29363

    border-radius is not going to be supported in the current PD4ML v3.x

    It is a feature of forthcoming PD4ML v4, whose release is expected in ~ one month.

    in reply to: different result in PDM4 Probe
    #30094

    Unfortunately you did not provide an exact description what does not match in the layouts. I could see only a difference in font family used to display the text.

    It is caused by an unsupported (by current PD4ML v3) line height definition construct in CSS font property:
    font: 12px/18px Arial, Helvetica, sans-serif;
    As a workaround you can change the styles to something like that:
    font: 12px Arial, Helvetica, sans-serif; line-height: 18px;

    in reply to: OutOfMemoryError while converting html to pdf
    #30096

    Which PD4ML version do you use?
    On which platform?
    How big is source HTML?
    Are there any images in the doc with big dimensions?
    Did you override the default JVM memory heap size?

    in reply to: Rendering Chinese characters problem Question Mark
    #30060

    Take a look to the TTF fallback tables on the page:
    https://pd4ml.com/cookbook/pd4ml_pdf_true_type_fonts.htm

    In principle you may use the font names (ignoring their original meanings) to define a chain of CJK TTF fonts, to be used to find a particular glyph, missing in the main font:

    MS Gothic=cjk_font_option1.ttf
    MingLiU=cjk_font_option2.ttf
    SimSun=cjk_font_option3.ttf
    Mangal=cjk_font_option4.ttf
    David=cjk_font_option5.ttf
    Gulim=cjk_font_option6.ttf  

    in reply to: mathematical characters are not displaying correctly
    #30095

    Sounds like needed TTF fonts are not embedded to PDF or the TTFs do not define the mathematical character glyphs.
    Please send a sample HTML and its resulting PDF to support pd4ml com

    in reply to: Issues rendering Large Images from iPhone
    #30074

    With pageSize you specify target document (paper) format.
    With htmlWidth you define “virtual HTML browser” frame width to be mapped to the chosen paper Format width.

    So if your images are cut right side, try to increase htmlWidth parameter correspondingly (to scale down the content).

    If the image width is not known, there is a handy pd4ml.adjustHtmlWidth() API call (but in the case a document scale will depend on the content, which is not always desired)

    in reply to: pd4ml.useTTF() create (but not delete) temporary files
    #29522

    The temp files are implicitly created by JVM after each createFont(int, InputStream) call. After a font object is garbage collected, for some strange reason JVM does not delete its temp file. They are collectively deleted after JVM quits, but some of them are forgotten and remain in the temp directory until the host OS cleans up. We have found no way to force JVM to cleanup font temp files.

    The recent PD4ML versions try to workaround the issue by a copying of needed font files to TEMP dir and pointing to them with createFont(int, File) API call. In the case JVM does not create extra .TMP files by its own.

    Which PD4ML version do you use?

    #30061

    A page breaking logic for absolute positioned elements was too browser-specific the time we added it to PD4ML. So we implemented two (reasonable from our perspective) modes. There were also strange approaches: i.e. the absolute positioned elements are rendered only on the first page. We did not support that.

    So try the alternative mode:

    Map m = new HashMap();
    m.put(PD4Constants.PD4ML_ABSOLUTE_ADDRESS_SPACE, "document");
    pd4ml.setDynamicParams(m);

    Or switch the mode on by the JVM param:
    -Dpd4ml.absolute.address.space=document

    in reply to: Generated pdf with watermark file size is too big
    #30021

    Sorry for the confusing hint. My fault. Even if you use JPEG, it still adds a transparency info for watermarking and converts the image to a gzipped sequence of pixel colors (which can result the image data become huge if the image dimensions are big).

    Would it be a solution for you to define page background image instead of a watermark? There is setPageBackgroundImageUrl() API call for that.

    in reply to: Image size reducing after rendering into PDF
    #30044

    That depends on where the document volume comes from.

    If the document is bulky because of bulky images – it ok. PD4ML can temporarily unload static resources to cache and read them again at PDF writing phase.

    If it is bulky because of a lot of HTML content: it can be problematic. HTML rendering assumes a lot of overhead – even a single standalone whitespace is represented in RAM as a number of Java objects (content itself, HTML attributes, CSS properties, layout info etc). In the case RAM requirements can be too high.

    An experimenting with eval version can help a lot to estimate the max doc volume for your particular case.

    Also do not forget a possibility to split the the doc to multiple parts (it it is possible for your doc structure), to convert them separately and to finally merge to a single PDF doc from just generated pieces.

    in reply to: Image size reducing after rendering into PDF
    #30042

    There is no hardcoded limitations. The data volume PD4ML can process is only limited by JVM heap size.

    in reply to: Stack underflow in 3.10.0 pro demo
    #30023

    Can you please send a sample HTML (and accompanying CSS etc) to support pd4ml com?

    in reply to: Why is the HTML entity Α rendered as a ?.
    #30037

    Can you please send to support pd4ml com an HTML and resulting PDF samples?

    #30033

    > I don’t know where I got the idea that headers and footers had to begin with a <body> tag.

    PD4ML supports two ways to define headers/footers, and it can be confusing.

    Other approach allows you to define headers/footers inline with <pd4ml:page.header> tag. In this case a header or footer respects the main document stylesheets.

    in reply to: Image size reducing after rendering into PDF
    #30040

    PD4ML never downsamples images. It embeds images “as is” (JPEGs, some species of PNG, Fax TIFFs) or converts them to lossless internal PDF image format.

    If the same image appears on multiple pages, resulting PDF will include only one instance of the image, referenced from multiple places.

Viewing 15 posts - 76 through 90 (of 1,410 total)