HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › Troubleshooting › pdf’s Table right margin and the content is missing
- This topic has 6 replies, 3 voices, and was last updated Mar 13, 2017
14:00:32 by PD4ML.
-
AuthorPosts
-
January 19, 2017 at 06:17#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.
February 13, 2017 at 14:55#29991The 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.
March 3, 2017 at 08:37#29992We 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?March 6, 2017 at 06:00#29993We 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?March 6, 2017 at 17:06#29994The 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.htmAlso 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.March 7, 2017 at 13:17#29995Thank 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.jarPlease suggest,if any other version is required.How to check whether the jar is of pro or demo version?
March 13, 2017 at 14:00#29996PD4ML 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. -
AuthorPosts
The forum ‘Troubleshooting’ is closed to new topics and replies.