PeachPDF

PeachPDF.PdfGenerator

PdfGenerator.GeneratePdf Method

Overloads  
GeneratePdf(string, PageSize, int, PeachPdfCssContent) Create PDF document from given HTML.
GeneratePdf(string, PdfGenerateConfig, PeachPdfCssContent) Create PDF document from given HTML.

PdfGenerator.GeneratePdf(string, PageSize, int, PeachPdfCssContent) Method

Create PDF document from given HTML.

public System.Threading.Tasks.Task<PeachPDF.PeachPdfDocument> GeneratePdf(string html, PeachPDF.PageSize pageSize, int margin=20, PeachPDF.PeachPdfCssContent? cssData=null);

Parameters

html System.String

HTML source to create PDF from

pageSize PageSize

the page size to use for each page in the generated pdf

margin System.Int32

the margin to use between the HTML and the edges of each page

cssData PeachPdfCssContent

optional: the style to use for html rendering (default - use W3 default style)

Returns

System.Threading.Tasks.Task<PeachPdfDocument>
the generated image of the html

PdfGenerator.GeneratePdf(string, PdfGenerateConfig, PeachPdfCssContent) Method

Create PDF document from given HTML.

public System.Threading.Tasks.Task<PeachPDF.PeachPdfDocument> GeneratePdf(string? html, PeachPDF.PdfGenerateConfig config, PeachPDF.PeachPdfCssContent? cssData=null);

Parameters

html System.String

HTML source to create PDF from

config PdfGenerateConfig

the configuration to use for the PDF generation (page size/page orientation/margins/etc.)

cssData PeachPdfCssContent

optional: the style to use for html rendering (default - use W3 default style)

Returns

System.Threading.Tasks.Task<PeachPdfDocument>
the generated image of the html