DinkToPdf icon indicating copy to clipboard operation
DinkToPdf copied to clipboard

Table of contents is blank page

Open hungdn2703 opened this issue 3 years ago • 2 comments

Hi, I'm implementing functionality to export pdf file used ASP.Net core 2.2 and DinkToPdf 1.08. In the first time run project, i can export pdf with table of content as well. But in the next time, it's blank page. Below is my code: ` [Serializable] public class TableOfContentsSettings : ObjectSettings { public TableOfContentsSettings() { this.ProduceTableOfContents = true; }

[WkHtml("isTableOfContent")]
public bool ProduceTableOfContents { get; set; }

} var doc = new HtmlToPdfDocument() { GlobalSettings = { ColorMode = ColorMode.Color, Orientation = Orientation.Portrait, PaperSize = PaperKind.A4, Margins = new MarginSettings() { Top = 10 }, DocumentTitle = "PDF Report", },

Objects = {
        new ObjectSettings()
        {
            Page = Path.Combine(currentPath, FOLDER_APP_DATA, "topReport.html"),
        },
        new TableOfContentsSettings()
        {

        },
        new ObjectSettings()
        {
            Page = Path.Combine(currentPath, FOLDER_APP_DATA, "report_new.html"),
        }
}

}; var pdf = _converter.Convert(doc);`

hungdn2703 avatar Oct 05 '20 02:10 hungdn2703

Hello! 😎 Did you ever find a solution for this issue? I tried several things, but without success.

darkson95 avatar Jan 18 '23 07:01 darkson95

Same here i tried several things but no success, someone have a solution?

Recrox avatar Jan 24 '24 14:01 Recrox