Skip to main content

convertHtmlToPdf

@combeenation/custom-code-utils


Function: convertHtmlToPdf()

convertHtmlToPdf<T>(resourceCmp, resourceName, html, pdfOptions?): Promise<void>

Type Parameters

T

T extends string

Parameters

resourceCmp

ResourceComponent<T>

Component which contains the resource

resourceName

T extends T ? T : never

Name of the resource to which the generated PDF should be uploaded

html

string

The HTML itself which needs to be converted to a PDF

pdfOptions?

Html2PdfOptions

PDF generation options

Returns

Promise<void>

Deprecated

Please use CfgnFiles.createPdfFromHtml instead. Resource Components will be no longer supported in the future!

Converts a given HTML to PDF and uploads the resulting pdf to the given resource