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"),
}
}
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; }
}
var doc = new HtmlToPdfDocument() { GlobalSettings = { ColorMode = ColorMode.Color, Orientation = Orientation.Portrait, PaperSize = PaperKind.A4, Margins = new MarginSettings() { Top = 10 }, DocumentTitle = "PDF Report", },
}; var pdf = _converter.Convert(doc);`