I got an 'System.InvalidOperationException' and message 'Cannot save a PDF document with no pages.'
See original GitHub issueI generate a PdfDocument with TheArtOfDev.HtmlRenderer.PdfSharp.PdfGenerator.GeneratePdf(html, PdfSharp.PageSize.Letter)
, and the html has contents, but the PdfDocument is empty and cause a ‘System.InvalidOperationException’ when i save the document by pdf.Save(memoryStream)
Issue Analytics
- State:
- Created 6 years ago
- Comments:9
Top Results From Across the Web
View topic - Cannot save a PDF document with no pages
However, this fails with the error message "Cannot save a PDF document with no pages". But if I add one line to the...
Read more >Sending a PDFsharp document to WCF service and saving ...
Creates a new PDF document using the specified stream. The stream won't be used until the document is closed, at that time the...
Read more >I got an 'System.InvalidOperationException' and message ' ...
I got an 'System.InvalidOperationException' and message 'Cannot save a PDF document with no pages.'
Read more >How to save a PDF when "Save as" is not working
Open the file in Acrobat. · Click Acrobat and choose Preferences at the bottom of the dropdown menu. · In the Preferences panel,...
Read more >I suddenly can't save a Word file as a PDF. I get the message
Open the document, go to File>Printer, select Microsoft Printer to PDF as printer, then click print button and check if you can export...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Same for me when using in a Azure Function
@benj2240 Ok thank for your time