DinkToPdf
DinkToPdf copied to clipboard
Table of contents is blank page
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);`
Hello! 😎 Did you ever find a solution for this issue? I tried several things, but without success.
Same here i tried several things but no success, someone have a solution?