PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: pdf's Table right margin and the content is missing
   PostPosted: 19 Jan 2017, 08:17 
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.


Attachments:
right margin miss.JPG
right margin miss.JPG [ 65.16 KiB | Viewed 202 times ]
  Subject: Re: pdf's Table right margin and the content is missing
   PostPosted: 13 Feb 2017, 16:55 
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.


  Subject: Re: pdf's Table right margin and the content is missing
   PostPosted: 03 Mar 2017, 10:37 
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?


  Subject: Re: pdf's Table right margin and the content is missing
   PostPosted: 06 Mar 2017, 08:00 
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?


  Subject: Re: pdf's Table right margin and the content is missing
   PostPosted: 06 Mar 2017, 19:06 
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/PD ... HtmlWidth()
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.


  Subject: Re: pdf's Table right margin and the content is missing
   PostPosted: 07 Mar 2017, 15:17 
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?


  Subject: Re: pdf's Table right margin and the content is missing
   PostPosted: 13 Mar 2017, 16:00 
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.



[Reply]     [ 7 posts ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share