PeachPDF
PeachPDF.PdfGenerator
PdfGenerator.AddPdfPages Method
| Overloads | |
|---|---|
| AddPdfPages(PeachPdfDocument, string, PageSize, int, PeachPdfCssContent) | Create PDF pages from given HTML and appends them to the provided PDF document. |
| AddPdfPages(PeachPdfDocument, string, PdfGenerateConfig, PeachPdfCssContent) | Create PDF pages from given HTML and appends them to the provided PDF document. |
PdfGenerator.AddPdfPages(PeachPdfDocument, string, PageSize, int, PeachPdfCssContent) Method
Create PDF pages from given HTML and appends them to the provided PDF document.
public System.Threading.Tasks.Task AddPdfPages(PeachPDF.PeachPdfDocument document, string html, PeachPDF.PageSize pageSize, int margin=20, PeachPDF.PeachPdfCssContent? cssData=null);
Parameters
document PeachPdfDocument
PDF document to append pages to
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
the generated image of the html
PdfGenerator.AddPdfPages(PeachPdfDocument, string, PdfGenerateConfig, PeachPdfCssContent) Method
Create PDF pages from given HTML and appends them to the provided PDF document.
public System.Threading.Tasks.Task AddPdfPages(PeachPDF.PeachPdfDocument document, string? html, PeachPDF.PdfGenerateConfig config, PeachPDF.PeachPdfCssContent? cssData=null);
Parameters
document PeachPdfDocument
PDF document to append pages to
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
the generated image of the html