Overview
Adds a new PDF file to repository with html content and returns created file infoFileInfo Files.AddPDF(html: string, name: string, options: PDFOptions)
Arguments
string html
Content of file in HTML format.
string name
Name of file.
PDFOptions options
of pdf conversion
Example
Sample header html<table style="border-bottom: 1px solid black; width: 100%;"> <tr> <td style="width:20%;text-align:center;">[logo]</td> <td style="width:50%;text-align:center;font-size:1.3em;">[documentTitle]</td> <td style="width:30%"> Document Number : [documentNumber]<br /> Page : [page]/[topage] </td> </tr> </table>
Example
Usage` var html = '<html><body>Hello!</body></html>'; var pdfFile = $Files.AddPDF(html, 'sample.pdf'); return pdfFile.Id;
Examples
Sample header html<table style="border-bottom: 1px solid black; width: 100%;"> <tr> <td style="width:20%;text-align:center;">[logo]</td> <td style="width:50%;text-align:center;font-size:1.3em;">[documentTitle]</td> <td style="width:30%"> Document Number : [documentNumber]<br /> Page : [page]/[topage] </td> </tr> </table>
` var html = '<html><body>Hello!</body></html>'; var pdfFile = $Files.AddPDF(html, 'sample.pdf'); return pdfFile.Id;