Hello i'm trying to generate a pdf via html string passed by parameter, my problem is that when i want to save the PdfDocument returned by the function, it doesn't have any pages or content (image of the debug is attached), here are the versions that i use:
Here is the code of my function:
var config = new PdfGenerateConfig();config.PageOrientation = PageOrientation.Portrait;config.PageSize= PageSize.A4;PdfSharp.Pdf.PdfDocument pdf = PdfGenerator.GeneratePdf(html, config);pdf.Save(path);
And because it has no Pages and no content, i can't save it because it throws me the exception: 'Cannot save a PDF document with no pages'
Hello i'm trying to generate a pdf via html string passed by parameter, my problem is that when i want to save the PdfDocument returned by the function, it doesn't have any pages or content (image of the debug is attached), here are the versions that i use:
Versions HtmlRenderer.Core: 1.5.1-beta1 HtmlRenderer.PdfSharp: 1.5.1-beta1 PdfSharp: 1.51.5185-beta
Here is the code of my function:
var config = new PdfGenerateConfig();
config.PageOrientation = PageOrientation.Portrait;
config.PageSize= PageSize.A4;
PdfSharp.Pdf.PdfDocument pdf = PdfGenerator.GeneratePdf(html, config);
pdf.Save(path);
And because it has no Pages and no content, i can't save it because it throws me the exception: 'Cannot save a PDF document with no pages'
Thank you in advantage :)