Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Overview

Adds a new PDF file to repository with html content and returns created file info

FileInfo 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>
Usage
`
var html = '<html><body>Hello!</body></html>';       
var pdfFile = $Files.AddPDF(html, 'sample.pdf');
return pdfFile.Id;
  • No labels