Welcome Guest Search | Active Topics | Sign In | Register

EO.Pdf, display: table-header-group Options
Erisma
Posted: Wednesday, August 24, 2011 3:38:18 AM
Rank: Member
Groups: Member

Joined: 8/12/2011
Posts: 16
Hi,
We're trying out EO.Pdf, and in the HTML files we convert to PDF, it's quite usual to set style="display:table-header-group" on a <thead> element, and our users expect that <thead> to be repeated at the top of each page that the table is displayed on.
This doesn't seem to be the case with EO.Pdf, the <thead> element is only displayed once, even if the table is larger than one single page.
We've looked at using something like HeaderHtmlFormat or even the event AfterRenderPage, but the problem is that we don't know how long the table is, so we can't know on how many pages the <thead> element should be repeated on.
Do you have any suggestions for how we can solve this? Perhaps some way to trigger the browser engine in EO.Pdf to render the HTML as if it was to send it to the printer?

Thanks!
eo_support
Posted: Wednesday, August 24, 2011 8:10:03 AM
Rank: Administration
Groups: Administration

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

"table-header-group" is not supported by our HTML engine (it's supported by IE but we don't use IE). What you can do is to render the table through a separate run. For example, if the whole HTML contains paragraph P1, table T and paragraph P2, then you would need to render P1 first, then table T, then paragraph P2 through three separate ConvertHtml calls.

After each call, you will have an HtmlToPdfResult object. That object will tell you how long each element is. So for example, after converting P1, you will know how long P1 is, based on that information you can then set the start position of T1 (reserve header row if needed). When you convert T1, make sure you set your page's margins to reserve the space for table headers on new page. After you are done with T, you will again get another HtmlToPdfResult object that tells you the height (and how many pages it spans) for T. You can then fill your table header based on that information.

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

Thanks!
Erisma
Posted: Tuesday, October 25, 2011 5:31:06 AM
Rank: Member
Groups: Member

Joined: 8/12/2011
Posts: 16
Hi,
We see now that fix for <thead> is in the new build. It helped us alot.

Thanks alot!

eo_support
Posted: Tuesday, October 25, 2011 8:36:11 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Yes. That is now supported.

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.