PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) Troubleshooting pdf’s Table right margin and the content is missing

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • pd4
    #27125

    By using pd4ml, I have converted the html to pdf.

    The issue is the right side margin and the content from right side margin for few points are missing.

    I have converted that to” A4″ paper size.

    Page orientation used is “portrait”.

    Please help me to figure out what could be the possible causes for the issue and how to solve the issue.

    #29991

    The table is wider than htmlWidth conversion parameter, so it does not fit a frame of a virtual HTML renderer.

    Just increase the param.

    But take into account: htmlWidth value impacts content scaling factor.

    #29992

    We are using an application which automatically creates the html, based on the inputs we provide(same as the message body(text area) where we post a reply/query to any forum. for example the same pd4ml support forum page).Which is a standard functionality of that particular application.

    we are converting this auto generated html to pdf. So we can only work with the java code for this auto adjustment of the content of pdf document to fit to html width.
    we are facing this right margin and some content from right margin missing issue,specifically when the content of the html includes tables and multi level bulleted list.

    Can i auto adjust the table width to automatically adjust according to the html width?
    is there any java code phrase available for,auto page break option, when the text exceeds the html width limit?

    pd4
    #29993

    We are using an application which automatically creates the html, based on the inputs we provide(same as the message body(text area) where we post a reply/query to any forum. for example the same pd4ml support forum page).Which is a standard functionality of that particular application.

    we are converting this auto generated html to pdf. So we can only work with the java code for this auto adjustment of the content of pdf document to fit to html width.
    we are facing this right margin and some content from right margin missing issue,specifically when the content of the html includes tables and multi level bulleted list.

    Can i auto adjust the table width to automatically adjust according to the html width?
    is there any java code phrase available for,auto page break option, when the text exceeds the html width limit?

    #29994

    The content is cut right side as it does not fit given horizontal space, defined by htmlWidth parameter.
    htmlWidth can be seen as a frame width of a virtual web browser.

    The simplest solution is to scale down the content to match the space.
    It can be done by an increasing of htmlWidth conversion parameter value.

    Alternatively you may rotate particular pages from portrait to landscape orientation to win some extra horizontal space.

    See http://pd4ml.com/cookbook/pdf_dynamic_format_change.htm
    and
    http://pd4ml.com/cookbook/pdf_page_formatting.htm

    Also there is a method adjustHtmlWidth() http://pd4ml.com/api/org/zefer/pd4ml/PD4ML.html#adjustHtmlWidth()
    It tries to dynamically determine htmlWidth parameter value to let the content fit. But it is not efficient in all the cases. And by really wide content it may lead to tiny unreadable font sizes.

    #29995

    Thank you for the reply!

    I was not able to use the option you suggested,Since we are using the lanscape orientation already.

    I am using the below code, in pd4ml probe and it works fine.

    pd4ml.addStyle(“table { word-wrap: break-word;font-style: italic;width: auto !important }”, true);

    But I used the same code in our application but it is not working for the same HTML,
    we are using the below jars,
    pd4ml-3.9.5.jar.
    ss_css2.jar

    Please suggest,if any other version is required.How to check whether the jar is of pro or demo version?

    #29996

    PD4ML Probe is usually bundled with one of the recent versions of PD4ML.

    PD4ML v3.9.5 is more than 2 years old and based on older CSS runtime.
    I would recommend to try the newest PD4ML version.

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

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