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
|
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!
|
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
|
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!
|