Open aammfe opened 4 years ago
Did you add the property "copy if newer" of the wkhtmlpdf.exe in csproj?
Like this:
<ItemGroup>
<None Update="Rotativa\Linux\wkhtmltopdf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Rotativa\Mac\wkhtmltopdf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Rotativa\Windows\wkhtmltopdf.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
Hello !! I'm flowing this blog But having issue bcs DI could not find
IGeneratePdf
System.InvalidOperationException: Unable to resolve service for type 'Wkhtmltopdf.NetCore.IGeneratePdf' while attempting to activate 'test.Controllers.WeatherForecastController'
here I have supplied .exe and register
Wkhtmltopdf
in servicesthis is controller code