createPdfFromHtml
@combeenation/custom-code-utils
Function: createPdfFromHtml()
createPdfFromHtml(
name,html,displayName?,pdfOptions?):Promise<string|undefined>
Converts a given HTML to PDF and uploads the resulting pdf to the given resource
Parameters
name
string
Name of the file to which the generated PDF should be uploaded.
Can be used in Hive with configuration.GetFile("")
html
string
The HTML itself which needs to be converted to a PDF
displayName?
string
Optional name which will be used when downloading the file
pdfOptions?
Html2PdfOptions
PDF generation options
Returns
Promise<string | undefined>
The url of the PDF if successful
Deprecated
Please use CfgnFiles.createPdfFromAsset and associated PDF Asset workflow instead.