Welcome Guest Search | Active Topics | Sign In | Register

Chopped PDF during HtmlToPdf.ConvertUrl Options
nbhor
Posted: Thursday, July 11, 2013 8:33:18 AM
Rank: Member
Groups: Member

Joined: 4/30/2013
Posts: 11
Hi we are trying to convert following page to pdf using HtmlToPdf.ConvertUrl. But if you look at the converted pdf, it is cutting half of the page. Any way to correct it?

http://cbplp-qa-legacy1.cn-qa-stage.catnav.us/printitems/all-categories-generic-items/all-categories-generic-items-itemsonly

Live Demo - http://essentialobjects.com/Products/EOPdf/UrlToPdf.aspx
You can verify the behavior by using your live demo and punching above mentioned url. If you need any additional info, please let me know.

Thanks -nilesh
eo_support
Posted: Thursday, July 11, 2013 9:20:24 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

You can set HtmlToPdf.Options.ZoomLevel to a small value such as 0.5. The reason that it gets chopped off is by default, a PDF "paper" is narrow than a browser window. The default PDF paper size is 8.5 inch wide, excluding margins its only 468 pixels. If you resize your browser window to that size, you will see it chops off the HTML as well. Setting ZoomLevel to a smaller value increases the pixel width of the "window" used by the converter. If you set it to 0.5, then the pixel size doubles as 936.

The converter is also able to automatically detects the minimum width of your page and adjust to it. So if you have something like this: <div style="width:1000px">&nbsp;</div>, then the converter will see it and automatically adjust zoom level so that a converter "window" is at least 1000 pixel wide.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.