HTML page Download as PDF using WEB API
Every time Generate Pdf name different
like
1st time --- example.pdf
2nd time - example2.pdf
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Mukesh NailwalPosted Oct 13, 2022, 12:50 PM
wkhtmltopdf.HtmlToPdf("test", new string[] { "https://www.google.com" }, new string[] { "-s A5" });HTMLstring toPDF, the tweak the above method and replace theArgumentstoProcess StartInfoas$@"/C echo | set /p=""{htmlText}"" | ""{pdfHtmlToPdfExePath}"" {((options == null) ? "" : string.Join(" ", options))} - ""C:\Users\xxxx\Desktop\{outputFilename}""";Marvin ReidPosted Oct 10, 2022, 3:12 PM
You can take the HTML page and convert it to PDF through a backend service using the DocumentConverter. Here is an example you can leverage:
https://www.leadtools.com/help/sdk/tutorials/dotnet-core-convert-files-with-the-document-converter.html
https://www.leadtools.com/help/sdk/tutorials/dotnet-core-configure-and-run-the-document-service.html
Jose SaizPosted Sep 6, 2019, 12:35 PM