HakanL / WkHtmlToPdf-DotNet

C# .NET Core wrapper for wkhtmltopdf library that uses Webkit engine to convert HTML pages to PDF.
GNU Lesser General Public License v3.0
366 stars 66 forks source link

How to directly pass parameters to wkhtmltopdf without using objects #118

Closed Tilation closed 10 months ago

Tilation commented 10 months ago

I have a class that generates the parameter string that gets passed to wkhtmltopdf, now we opted to migrate to this package, but I cant seem to find a way to directly pass this string to the package, it only lets me use the object oriented aproach.

How can I send a string that contains all convert-related parameters to wkhtmltopdf? For example: --print-media-type --enable-local-file-access --page-size * --footer-center "asd" --zoom 1 etc

HakanL commented 10 months ago

There no support since this project is not calling the command-line version of wkhtmltopdf, we're actually loading the DLL and making method calls into it. So you need to use the object oriented approach.