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
372 stars 67 forks source link

disable-smart-shrinking is not implemented #40

Closed mmuniesa closed 3 years ago

mmuniesa commented 3 years ago

Hello,

We are missing the disable-smart-shrinking setting. We have tested this using the wkthmltopdf library and it does work but there is no setting in the wrapper for this.

Could you advise on how to solve this problem please?

Thank you!

HakanL commented 3 years ago

You can probably just add the setting and submit a PR.

mmuniesa commented 3 years ago

Hi @HakanL,

We have tried adding the following setting to the ObjectSettings class but it doesn't seem to take affect.

    [WkHtml("disableSmartShrinking")]
    public bool? DisableSmartShrinking { get; set; }

Does it look correct?

Thank you

HakanL commented 3 years ago

What is the exact name in wkhtml for this setting? It has to be an exact match and on the correct settings object.

HakanL commented 3 years ago

A quick search seems to indicate that it's called "web.enableIntelligentShrinking" and it's on the page settings object. https://wkhtmltopdf.org/libwkhtmltox/pagesettings.html

HakanL commented 3 years ago

Oh, it's already there, hehe. Check out EnableIntelligentShrinking on the WebSettings.

mmuniesa commented 3 years ago

thanks @HakanL :) we have seen it as well and it works!!