Welcome Guest Search | Active Topics | Sign In | Register

Converted HTML is sometimes much smaller than other times Options
Brad Mathews
Posted: Tuesday, September 3, 2013 7:48:12 PM
Rank: Advanced Member
Groups: Member

Joined: 6/19/2013
Posts: 38
I have one example where the content in the PDF (created using ConvertHtml) looks shrunken. It is supposed to cover the entire page. I manually add headers and footers after converting and those show no problems at all.

Here is a picture:



I have many examples of very similar HTML that converts correctly. I can't find anything in the html that would cause this. I am using the same PageSize and OutputArea between the ones that work and the only example so far that does not.

Any ideas?

Thanks, Brad
eo_support
Posted: Tuesday, September 3, 2013 7:51:26 PM
Rank: Administration
Groups: Administration

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

This is normal. The converter automatically detects your minimum page width and scale the contents in order to fit in the full page automatically. See here for more details:

http://www.essentialobjects.com/doc/4/htmltopdf/auto_fit.aspx

Thanks!
Brad Mathews
Posted: Tuesday, September 3, 2013 8:28:23 PM
Rank: Advanced Member
Groups: Member

Joined: 6/19/2013
Posts: 38
Yeah, I assumed this, but the width of the HTML is exactly the same (at least according to the HTML...Layout tab in FireBug) so such an extreme difference in size was not expected. Could AutoFitY and page-break-inside:avoid work together to create a section of HTML that is too tall and thus cause the shrinkage?

I found the link you mention and I set AutoFitX to None and set an appropriate ZoomLevel. I also set AutoAdjustForDPI to False so I don't get any surprises later on.

That fixed it.

Have a good one!
Brad
eo_support
Posted: Tuesday, September 3, 2013 8:30:57 PM
Rank: Administration
Groups: Administration

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

I am glad that setting AutoFitX to None works for you.

page-break-inside:avoid affects page height. AutoFitX is based on page width. So they are unrelated.

Thanks!
Brad Mathews
Posted: Wednesday, September 4, 2013 12:41:16 PM
Rank: Advanced Member
Groups: Member

Joined: 6/19/2013
Posts: 38
I was wondering if AutoFitY and page-break-inside:avoid work together to create a section of HTML that is too tall and thus cause the shrinkage? I know I have solved my issue, but I was hoping for a more complete understanding for future reference and of course to help those reading this.

- Brad
eo_support
Posted: Wednesday, September 4, 2013 1:19:15 PM
Rank: Administration
Groups: Administration

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

I do not think you need to use them together. When you set AutoFitY to ShrinkToFit, it is automatically implied that the whole output would be placed on a single page, thus no paging would occur regardless. That also means AutoFitY alone is able to cause the shrink effects that you observed.

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.