|
Rank: Newbie Groups: Member
Joined: 10/15/2013 Posts: 2
|
How do I exclude the header and footer from the first page when converting from HTML to PDF? We need to create a title page, which does not have the header and footer on it
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, You would just use a loop to loop over other pages and add header/footer with code. See here for more details: https://www.essentialobjects.com/doc/pdf/htmltopdf/header.aspx#afterLook for "Adding Page Header/Footer After the Conversion". The sample code loops from 0 so the footer is added to all pages. If you want to skip the first page, you would just loop from 1. Please let us know if you still have any questions. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/15/2013 Posts: 2
|
Thanks for the quick reply. Ok, so there isn't a way to do this in the HtmlToPdf.Options? I'm worried about the performance when converting the header on every page. We have some documents that are rather long. However, we can make it work if that's the best way.
Thanks again
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, Thank you very much for your feedback. We have posted a new build that added this property for this purpose: https://www.essentialobjects.com/doc/eo.pdf.htmltopdfoptions.firstheaderfooterpageindex.aspxYou would set this property to the number of pages you want to skip. For example, if you want to skip the first two pages, then you would set this property to 2. You can download the new build from our download page. Please feel free to let us know if you have any questions. Thanks
|
|