Welcome Guest Search | Active Topics | Sign In | Register

Content Table with Page Number Options
Alester Gómez
Posted: Monday, July 23, 2012 11:10:41 AM
Rank: Member
Groups: Member

Joined: 7/10/2012
Posts: 14
HI.
It is my second post and last thing I need to complete my evaluation of EO.Pdf for .Net.
As the title describe, I need a content table with page number.
I am using html to pdf (url).
Some thing like this:
Topic 1........................... 2
Topic detail......................3

Thank in advance
eo_support
Posted: Monday, July 23, 2012 11:24:34 AM
Rank: Administration
Groups: Administration

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

You will usually need to run the converter twice for that. The process will be like this:

1. Run the converter WITHOUT page number. For example, if you use an HTML table element to generate your table of content, you can leave the page number cell empty;

2. Use the returned HtmlToPdfResult object to get the HtmlDocument object, then use GetElementByXXX methods on that object to get the corresponding HtmlElement object for each chapter (or anything else you want to show up in your table of content). You can then use the HtmlElement's Location property get the page number for that content;

3. Use the page number information to reformat your table of content HTML. This time the HTML would have the page numger. Run the HTML to PDF converter again to create the final output;

You can also use A element in your table of contents so that they will be automatically converted into clickable links.

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

Thanks!
Alester Gómez
Posted: Monday, July 23, 2012 11:34:08 AM
Rank: Member
Groups: Member

Joined: 7/10/2012
Posts: 14
I am surprised by the speed of their response. I'll try this and let you know.
Many thanks
eo_support
Posted: Monday, July 23, 2012 11:43:43 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
You are very welcome. Please feel free to let us know if there is anything else.

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.