.Net Pdf Generator

Configuration

Instances of the component can be configured in code or using sections in the web.config.

Each instance must be configured with the location of:

  1. WkHtmlToPdf.exe
  2. A temporary/working directory for PDF generation
  3. An output directory for PDF's

 

web.config


This method is optional and multiple named publisher sections can be added.

<configSections>
    <section name="AlanD-PDF" type="AlanD.wkhtmltopdf.Config.ConfigurationSectionHandler, AlanD.wkhtmltopdf" requirePermission="false" />
  </configSections>
<AlanD-PDF> <publisher name="default"> <add name="exeLocation" /> <add name="exeArguments" value="--javascript-delay 400" /> <add name="workingDirectory" /> <add name="outputDirectory" /> <add name="errorMode" value="verbose" /> </publisher> <publisher name="publisher1"> <add name="exeLocation" value="~/bin/wkhtmltopdf.exe"/> <add name="exeArguments" value=" -s A4 --background"/> <add name="workingDirectory" value="~/pdf-output/temp" /> <add name="outputDirectory" value="~/pdf-output"/> <add name="errorMode" /> </publisher> </AlanD-PDF>
comments powered by Disqus