Welcome Guest Search | Active Topics | Sign In | Register

ConvertHtml OutputArea on multiple pages Options
Sara
Posted: Wednesday, June 6, 2012 1:05:56 PM
Rank: Member
Groups: Member

Joined: 6/22/2011
Posts: 22
I am wondering if it is possible to set the OutputArea to a different size on different pages when using ConvertHtml?

I have an html string. I use HtmlToPdf.ConvertHtml to convert this string to a pdf. I am using the BeforeRenderPage event to add a header and footer using Acm. I am building a different header (with a shorter height) when page index > 0. I'd like to have the html content rendered on every page after the first one start a little higher on the page so I don't have extra white space.

Is this possible? Can you provide an example if it is? Thank you!

Sara
eo_support
Posted: Wednesday, June 6, 2012 1:09:38 PM
Rank: Administration
Groups: Administration

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

If you are just looking for a different page header, then you can set the first page's StartPosition to move the contents down. That way the OutputArea does not change, however the first line on the first page will start from OutputArea.Top + StartPosition instead of OutputArea.Top. That can give you more space for the header on the first page.

This StartPosition is the only difference you can achieve between the first page and other pages. You can not set OutputArea for each page independently.

Hope this helps. Please feel free to let us know if you have any more questions.

Thanks!
Sara
Posted: Wednesday, June 6, 2012 1:43:09 PM
Rank: Member
Groups: Member

Joined: 6/22/2011
Posts: 22
Thank you! That is perfect, exactly what I need.
eo_support
Posted: Wednesday, June 6, 2012 1:48:55 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Glad to hear that it works for you. Please feel free to let us know if you have any more questions.

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.