PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) HTML/CSS rendering issues It seems adjustHtmlWidth doesn’t work

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26963

    I used Pd4ml pro trial version and want to fit to the page width when I convert a html to rtf.

    My code is as follow:

    pd4ml.setPageSize(pd4ml.changePageOrientation(PD4Constants.A4));
    //pd4ml.setHtmlWidth(1200);
    pd4ml.adjustHtmlWidth();
    pd4ml.setPageInsetsMM(new Insets(topValue, leftValue, bottomValue, rightValue));
    pd4ml.outputFormat(PD4Constants.RTF_WMF);
    pd4ml.render(isr, fos, base);
    fos.close();

    If I set HtmlWidth to a small value,the right side will be cut down.If I set HtmlWidth to a big value ,the font of the content will be very small. It seems ‘pd4ml.adjustHtmlWidth()’ doesn’t work effective.If I delete the statement ‘pd4ml.adjustHtmlWidth()’,the result is the same.

    I didn’t set width to 100% in the html souce.

    How can I fit content to the page width?

    #29592

    Please try your code with the just released v3.9.3

    #29593

    I’ve tried v3.9.3.
    But there is still a problem with converting html to rtf.
    I set the html width to a big value before I used pd4ml.adjustHtmlWidth(),the font size of the resulting rtf becomes very small.If I set the html width to a smaller value,the right margin will be cut.

    I am confused that it’s normal to convert html to pdf, the content will auto wrap to a new line,but when I convert to rtf,the font size will be very small or right margin is cut off.

    I hope it can auto wrap to a new line to fit to the page width when I convert a html to rtf , but the font size doesn’t become very small.

    How can I solve it?
    It’s urgent for us,please give us some advice.

    #29594

    The issue is going to be solved with the forthcoming v395.

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

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