Welcome Guest Search | Active Topics | Sign In | Register

Page size and page header Options
hui
Posted: Thursday, July 2, 2015 6:02:33 AM
Rank: Newbie
Groups: Member

Joined: 7/1/2015
Posts: 1
I'm doing investigation for HTML to Pdf .
I've a feature to implement, I can't find out clear demos or documentations for that.

In this case:

<html>
<table id="TableA"></table>
<table id="TableB"></table>
<table id="TableC"></table>
</html>

At beginning ,the page size is "A4" and page header of page is "A4 header";
But for "TableB", I want to new page and set different page size and page header.
To new page , I can use CSS "Page breaks" to do it.
But I don't how to know to set different page size and header for the table.
I tried to do it in "AfterRenderPage", but height of all tables are variable, so I can't get explicit page number of the table.


Is it possible to do it in EO. Pdf?

Thank you very much.
eo_support
Posted: Thursday, July 2, 2015 10:28:36 AM
Rank: Administration
Groups: Administration

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

You will not be able to have different page sizes in a single conversion. To use different sizes, you must call HtmlToPdf.ConvertUrl/ConvertHtml multiple times with HtmlToPdfOptions.PageSize setting to different values. You can convert into a PdfDocument object for every single conversion, then call PdfDocument.Merge to merge them together into a single PdfDocument object.

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.