|
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
|
|
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.aspxThanks!
|
|
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
|
|
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!
|
|
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
|
|
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!
|
|