HtmlToPdfConverter Class

NReco.PdfGenerator Class Library Documentation
Html to PDF converter component (C# WkHtmlToPdf process wrapper).
Inheritance Hierarchy

SystemObject
  NReco.PdfGeneratorHtmlToPdfConverter

Namespace:  NReco.PdfGenerator
Assembly:  NReco.PdfGenerator (in NReco.PdfGenerator.dll) Version: 1.2.1
Syntax

public class HtmlToPdfConverter

The HtmlToPdfConverter type exposes the following members.

Constructors

  NameDescription
Public methodHtmlToPdfConverter
Create new instance of HtmlToPdfConverter
Top
Properties

  NameDescription
Public propertyCustomWkHtmlArgs
Custom WkHtmlToPdf global options
Public propertyCustomWkHtmlCoverArgs
Custom WkHtmlToPdf cover options (applied only if cover content is specified)
Public propertyCustomWkHtmlPageArgs
Custom WkHtmlToPdf page options
Public propertyCustomWkHtmlTocArgs
Custom WkHtmlToPdf toc options (applied only if GenerateToc is true)
Public propertyExecutionTimeout
Get or set maximum execution time for PDF generation process (by default is null that means no timeout)
Public propertyGenerateToc
Gets or sets TOC generation flag
Public propertyGrayscale
Gets or sets option to generate grayscale PDF
Public propertyLicense
Component commercial license information.
Public propertyLowQuality
Gets or sets option to generate low quality PDF (shrink the result document space)
Public propertyMargins
Gets or sets PDF page margins (in mm)
Public propertyOrientation
Get or set PDF page orientation
Public propertyPageFooterHtml
Get or set custom page footer HTML
Public propertyPageHeaderHtml
Get or set custom page header HTML
Public propertyPageHeight
Gets or sets PDF page height (in mm)
Public propertyPageWidth
Gets or sets PDF page width (in mm)
Public propertyPdfToolPath
Get or set path where WkHtmlToPdf tool is located
Public propertyProcessPriority
Gets or sets wkhtmltopdf process priority (Normal by default)
Public propertyProcessProcessorAffinity
Gets or sets wkhtmltopdf processor affinity (bitmask that represents the processors that may be used by the process threads).
Public propertyQuiet
Suppress wkhtmltopdf debug/info log messages (by default is true)
Public propertySize
Get or set PDF page orientation
Public propertyTempFilesPath
Get or set location for temp files (if not specified location returned by GetTempPath is used for temp files)
Public propertyTocHeaderText
Gets or sets custom TOC header text (default: "Table of Contents")
Public propertyWkHtmlToPdfExeName
Get or set WkHtmlToPdf tool EXE file name ('wkhtmltopdf.exe' by default)
Public propertyZoom
Gets or sets zoom factor
Top
Methods

  NameDescription
Public methodBeginBatch
Intiates PDF processing in the batch mode (generate several PDF documents using one wkhtmltopdf process)
Public methodEndBatch
Ends PDF processing in the batch mode.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGeneratePdf(String)
Generates PDF by specifed HTML content
Public methodGeneratePdf(String, String)
Generates PDF by specfied HTML content and prepend cover page (useful with GenerateToc option)
Public methodGeneratePdf(String, String, Stream)
Generates PDF by specfied HTML content (optionally with the cover page).
Public methodGeneratePdf(String, String, String)
Generates PDF by specfied HTML content (optionally with the cover page).
Public methodGeneratePdfFromFile(String, String)
Generate PDF by specfied HTML content and prepend cover page (useful with GenerateToc option)
Public methodGeneratePdfFromFile(String, String, Stream)
Generate PDF by specfied HTML content and prepend cover page (useful with GenerateToc option)
Public methodGeneratePdfFromFile(String, String, String)
Generate PDF by specfied HTML content and prepend cover page (useful with GenerateToc option)
Public methodGeneratePdfFromFiles(String, String, Stream)
Generate PDF into specified Stream by several HTML documents (local files or URLs)
Public methodGeneratePdfFromFiles(String, String, String)
Generate PDF into specified output file by several HTML documents (local files or URLs)
Public methodGeneratePdfFromFiles(WkHtmlInput, String, String)
Generate PDF into specified output file by several HTML documents (local files or URLs)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top
Events

  NameDescription
Public eventLogReceived
Occurs when log line is received from WkHtmlToPdf process
Top
See Also

Reference