3

I'm using EVO PDF auto generated table of contents.

HtmlToPdfConverter.TableOfContentsOptions.AutoTocItemsEnabled = true

The table of contents always appears as the first page of the document. I need to have the first page be a cover sheet, the second a title page, then the table of contents.

I am using a dynamically created HTML string and ConvertHtmlToPdfDocumentObject with EVO PDF version 6.8 for .Net

EDIT:

I figured out a workaround. I split my dynamic HTML string to pull out the cover and title pages and create a EvoPdf.Document with just those, then use AddStartDocument to prefix the document to the other that has the table of contents first. May not be the best, but it works.

EvoPdf.Document header = converter.ConvertHtmlToPdfDocumentObject(cover, stringUrl); HtmlToPdfConverter _pdfConverter = new HtmlToPdfConverter(); _pdfConverter.PdfDocumentOptions.AddStartDocument(header, true, true, true);

JEL
  • 31
  • 3
  • I figured out a workaround. I split my dynamic HTML string to pull out the cover and title pages and create a EvoPdf.Document with just those, then use AddStartDocument to prefix the document to the other that has the table of contents first. May not be the best, but it works. – JEL Oct 06 '15 at 22:43
  • EvoPdf.Document header = converter.ConvertHtmlToPdfDocumentObject(cover, stringUrl); HtmlToPdfConverter _pdfConverter = new HtmlToPdfConverter(); _pdfConverter.PdfDocumentOptions.AddStartDocument(header, true, true, true); – JEL Oct 06 '15 at 22:46

0 Answers0