fpanaccia / Wkhtmltopdf.NetCore.Example-deprecated

Implementation of Wkhtmltopdf.NetCore
81 stars 33 forks source link

How to pass a string argument to wkhtmltopdf? #24

Closed AndySchmitt closed 2 years ago

AndySchmitt commented 2 years ago

I'm trying to convert another package to Wkthmltopdf, but I could not find a way to pass a string argument to wkthmltopdf executable.

In my conversion, I have an argument "--disable-smart-shrinking -T 30 -B 35 --footer-right \"page [page] / [topage]\" --footer-font-size 9"

I just like to send this exact string to the executable. How can I do this?

Jefferycheng commented 2 years ago

You could reference my article to add a new custom ConvertOptions.cs to pass the option to wkhtmltopdf tool.

https://medium.com/@lovemath288772/how-to-add-page-number-header-footer-with-wkhtmltopdf-in-dotnet-e0f2531118c0

AndySchmitt commented 2 years ago

Thank you @Jefferycheng . This solves my problem.