Open daveaglick opened 9 years ago
Hi @daveaglick , which HTML files you want to convert?
The goal would be to convert HTML content stored in documents. The specific set of documents that get converted, how they’re aggregated into a single output PDF, and other details would need to be configurable.
As for use cases, I could see integrating this module into the docs pipelines to optionally produce a PDF of the documentation.
A word of caution - Wyam is no longer accepting PRs. If there’s interest in looking at this, head on over to Statiq Framework.
Could consider something like CefSharp which embeds the Chromium engine: https://github.com/cefsharp/CefSharp
Generating a PDF would be essentially one or two lines of code: https://stackoverflow.com/a/61723341/6287173
var success = await webBrowserObject.PrintToPdfAsync("filename.pdf", new PdfPrintSettings
{
MarginType = CefPdfPrintMarginType.Custom,
MarginBottom = 10,
MarginTop = 0,
MarginLeft = 20,
MarginRight = 10,
PageWidth = 210000,
PageHeight = 297000
});
Convert HTML content to PDF