Rank: Advanced Member Groups: Member
Joined: 1/22/2014 Posts: 38
|
I am trying to get only the first page generated using HtmlToPdf.ConvertHtml to have a bottom margin in inches. This is not working
@page :first { margin-right: 2.5in; }
Question: Is there a way to set only the first page to have a bottom margin in inches when using HtmlToPdf.ConvertHtml.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, You won't be able to have different page settings for different pages because the first page's page style settings are used for all pages. One way you can work around this limitation is to set HtmlToPdf.Options.StartPosition to have extra margin at the top for the first page first. Then after you complete the conversion, you can use this method: https://www.essentialobjects.com/doc/eo.pdf.pdfpage.transform.aspxTo apply a transform on the entire first page to shift everything upwards. This way you will have extra margin at the bottom. Thanks!
|