# Html to PDF

Use the PDF connector to create PDF files in your workflow. The connector uses Hypertext Markup Language (HTML) to define the layout of your PDF pages and fully supports using [FlowScript](https://help.novacuraflow.com/6.11/development/flow-studio/flowscript).

![](https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M01hPPNmTP-ZDB44fK4%2F-M01jzw9aBsnPNQaB4RP%2Fimage.png?alt=media\&token=d2ebdebd-d1f5-4ed6-a445-7bc497ef35fd)

## **Connector Output**

The output from the connector is a standard [file record](#file-record).

## **General Tips & Tricks**

* Write as simple [HTML](#html) as possible by hand: You will run into problems if you use code taken straight from WYSIWYG HTML editors. Gain some basic knowledge of how to code [HTML Tables](https://www.w3schools.com/tags/tag_table.asp) and using [CSS style sheets](https://www.w3schools.com/tags/tag_style.asp) and you will thank yourself later. Also it's great fun :slight\_smile:&#x20;
* In most use cases, you want to take control over the [page breaks](#page-breaks) in your document using the [page-break-inside](https://www.w3schools.com/cssref/pr_print_pagebi.asp) CSS property.
* In order to enable CSS for your document, head to the [CSS Section](#styling-css).
* Try to structure your workflow in a way so that you build your html document in modules. This is especially useful when you are designing complex documents with several parts. To achieve modularity, you can for example write your CSS code in a [script-step](https://help.novacuraflow.com/6.11/development/flow-studio/applications/workflow/script-item), your header code in another script-step and so on. Then in your connector HTML settings, you just end up with the document skeleton. An example of this can be found in the [Layout Examples section](#layout-examples).

{% hint style="info" %}
**Pro Tip:** Create a simple workflow with a PDF connector and a user step. In the user step, add a file gallery with the generated PDF document(s) and use the workflow for designing and debugging your page layouts.&#x20;

Another good practice is to use one machine step per distinct document section (if you build a complex document) and then supply the previous PDF document (file record) as input parameter for the next PDF task (see [Append to an existing PDF](#append-to-an-existing-pdf)).
{% endhint %}

## Settings

This chapter describes the available settings in the PDF connector.

### **File Name**

This string defines the filename-key value of the target [file record](#file-record).&#x20;

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M01hPPNmTP-ZDB44fK4%2F-M01kBmBRnHm7QVj45_z%2Fimage.png?alt=media&#x26;token=a9b2f3ac-4a4a-4fad-99f2-51ca8d57e203" alt=""></div>

### **Append to an existing PDF**

The connector optionally takes a file record containing a PDF file as an input variable. If suppied, the new page(s) created in the current machine step will be appended to the existing PDF file. The target variable will contain the merged PDF file as a standard [file record](#file-record).&#x20;

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M01hPPNmTP-ZDB44fK4%2F-M01kL5iS4nc5Q4ZymXw%2Fimage.png?alt=media&#x26;token=500fc98e-696d-4128-af29-fdcbc471f78d" alt=""></div>

To keep the file name from the previous PDF step, just re-use the filename value from the previous PDF [file record](#file-record):&#x20;

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M01hPPNmTP-ZDB44fK4%2F-M01kUjR_BDDjfny3Na4%2Fimage.png?alt=media&#x26;token=34901b61-2212-4551-85b2-774cb7f105a4" alt=""></div>

### **Margins**

The margin sizes in [DTP points](#dtp-point).&#x20;

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M01hPPNmTP-ZDB44fK4%2F-M01kkfv72nsfLb5wAga%2Fimage.png?alt=media&#x26;token=d6d5bd19-0c6f-4721-8a66-b144c817b09c" alt=""></div>

### **Page Size**

The default setting for page size is A4-format. The page size selector lets you choose from the most common page sizes. The page size can also be defined [manually](#manual-page-size).

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M-Prb53-Pbyqun4FETm%2F-M-PulhrqKspYfQNA7NQ%2Fimage.png?alt=media&#x26;token=13b89087-5e00-4116-bc98-219f972f94e5" alt=""></div>

### Manual Page Size

It's possible to set a manual page size in [DTP points](#dtp-point). This setting will override any selection made in the [Page Size](#page-size) selection drop down menu and you need to clear any values the Width (pts) and Height (pts) to revert back to using the [Page Size](#page-size) selection menu.

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M-Q1JuD4-Sa9nii2NV_%2F-M-Q1SYvSHzSJ3rZVKl2%2Fimage.png?alt=media&#x26;token=7a7f0fee-40d3-441a-995b-0f6273cb6ed9" alt=""></div>

{% hint style="info" %}
**Note:**&#x20;

The total page width in [DTP Points](#dtp-point) = the supplied width + [Margin](#margins) Left + [Margin](#margins) Right&#x20;

The total page height in [DTP Points](#dtp-point) (excluding the page contents) = the supplied height + [Margin](#margins) Top + [Margin](#margins) Bottom
{% endhint %}

### **Page Orientation**

Choose between Portrait and Landscape orientation. The default orientation is Portrait.

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M01hPPNmTP-ZDB44fK4%2F-M01l-e_ZFnFzSxybwC_%2Fimage.png?alt=media&#x26;token=ac9a7492-b891-41bb-b6a0-d15a950fbf0f" alt=""></div>

### **Images / Signatures**

If you need to insert images or [flow signatures](https://help.novacuraflow.com/6.11/development/flow-studio/applications/workflow/user-step/signature-capture-input) in your PDF document, you need to make sure to have them available in your workflow as [file records](#file-record).&#x20;

![](https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M-sM1PlfIM4qpuqyo8j%2F-M-sNFGLSuW_kO7mCZ5o%2Fhelp_root_connectors_printing_html2pdf_pdf_fileRecordFileNameOverride.png?alt=media\&token=0c6d7d90-e203-4c2a-8486-4355cebb6602)

Signatures from the [signature capture input](https://help.novacuraflow.com/6.11/development/flow-studio/applications/workflow/user-step/signature-capture-input) provider is by default a file record with some extra fields ("mimeType" and "size") and are supported by the PDF connector as is.&#x20;

The Images / Signatures field takes either a [file record](#file-record) or a [table ](https://help.novacuraflow.com/6.11/development/flowscript/variables#tables)of file records.&#x20;

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M01lCCsggwvPtBECPZS%2F-M01lnVp1cOBtVBcC1uL%2Fimage.png?alt=media&#x26;token=e0927d80-0582-4977-a10b-b9a9bd51df5d" alt="Adding a table containing images to the Images/signatures input box."></div>

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M-sM1PlfIM4qpuqyo8j%2F-M-sMnHZQUJzMPPrdh6f%2Fhelp_root_connectors_printing_html2pdf_pdf_connectorSettingsImagesSignatures.png?alt=media&#x26;token=fb3a3acb-f5ea-4d0a-9f9f-113b6d3e610d" alt="Combining several file records directly in the Images/signatures input box."></div>

#### Overriding file names

In order to be able to differentiate between the images/signatures in the HTML code, you might need to override the filename component of the file records and give them unique and identifiable file names prior to passing them to the PDF connector. The image below shows a file name being overridden in an assignment step.&#x20;

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M01nnHJhJmn02tbxp3A%2F-M01vkCjX0spLqCKo-c7%2Fimage.png?alt=media&#x26;token=14a4a927-8dac-4b29-abb2-eda7fff798c3" alt=""></div>

To position your image/signature in the document, the [HTML IMG](https://www.w3schools.com/tags/tag_img.asp) tag is used:

```
<img src=your_file_name.jpg height=40>
```

![](https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M-sM1PlfIM4qpuqyo8j%2F-M-sNL5Vc_aEHqrZM9u-%2Fhelp_root_connectors_printing_html2pdf_pdf_connectorSettingsHtml.png?alt=media\&token=44df2fec-e591-4b15-a2e2-c51635b79922)

#### Supported image formats

The following image formats are supported by the connector:

* **BMP**
* **GIF** (with optional transparency)
* **PNG** (with optional transparency)
* **JPEG**
* **TIFF** (with optional transparency)

### **HTML**

The connector supports the [HTML 4.01 specification](https://www.w3.org/TR/html401/).

The document layout is defined using HTML. It's recommended to keep the code as simple as possible and build the layout using a bottom-up approach. If you are new to HTML, visit [WordHtml](https://wordhtml.com/). However if you use the generated code directly you will get disappointed as there are some important aspects to keep in mind. Most importantly, you need to use percentages instead of absolute values for width. Keep the total width of your columns at about 95%.&#x20;

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M01nnHJhJmn02tbxp3A%2F-M01uh3Uu_rxK-NS4Ef2%2Fimage.png?alt=media&#x26;token=36f6b3c0-f5e9-4fa0-be73-39786cd1fcca" alt=""></div>

## Controlling the layout

### Styling / CSS

The connector supports the [CSS Level 2 Specification](https://www.w3.org/TR/2011/REC-CSS2-20110607/), so you can use cascading style sheets to format your PDF documents. Even if you are creating a simple page layout, you will probably still want to use CSS for [controlling page breaks](#page-breaks) inside your HTML elements (such as table rows and/or cells).&#x20;

In addition, there is also support for gradients on backgrounds and [rounded corners](https://www.w3schools.com/css/css3_borders.asp):

```markup
<!-- Example background gradient -->
<body style="background-color: #333; 
  background-gradient: #707; 
  background-gradient-angle: 60; 
  margin: 0;">
```

{% hint style="warning" %}
**Note:** Since both [FlowScript](https://help.novacuraflow.com/6.11/development/flow-studio/flowscript) and [CSS](https://www.w3schools.com/css/css_intro.asp) syntax uses [curly brackets](https://en.wikipedia.org/wiki/Bracket#Curly_brackets), the connector leverages a concept called [Magic Tags](#magic-tags) to distinguish CSS from FlowScript. Hence you need to get familiar with these tags in order to be able to use CSS in your layouts.
{% endhint %}

Learning HTML and CSS is out of scope of this documentation. However if you have issues getting your document layout look as you expect - the best bet is to simplify the code and make sure you are not using any syntax feature outside of the supported specifications (CSS Level 2 and HTML 4.01). Keep it simple.

### Page breaks

The CSS property [*page-break-inside*](https://www.w3schools.com/cssref/pr_print_pagebi.asp) is used by the connector to control how page breaks are rendered. Two values are supported: **auto** (default) and **avoid.**

With the default values there are no rules defined to transfer html-blocks or words to the next page. The page break will simply happen when the page runs out of space (which might result in text being cut through the middle):

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M02Ycjdfx7ZSDjobGMF%2F-M02_rkpWVlzlyXGlaTk%2Fimage.png?alt=media&#x26;token=0d6329db-d621-4b92-b528-2ac99dac0084" alt=""></div>

Using **td { page-break-inside: avoid; }** - words located on the bottom of a page will be transferred to the new page without getting split. The same goes for *th*, *p*, *span* and for any text in any other tags:

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M02Ycjdfx7ZSDjobGMF%2F-M02aSBfbB_IsOHuVk5i%2Fimage.png?alt=media&#x26;token=64288485-5ef7-444b-8382-406ca44e04c0" alt=""></div>

With **table { page-break-inside: avoid; }** - if a table row does not fit on the current page, then the whole row will be transferred to the next page.\
If the row height is larger than the whole page height, it doesn’t make sense to transfer it and the value of *page-break-inside* will be ignored.

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M02Ycjdfx7ZSDjobGMF%2F-M02albKn8fs8x6OOkyC%2Fimage.png?alt=media&#x26;token=964cd260-f2aa-4f53-9596-caf974853e86" alt=""></div>

#### Known cosmetic issues

If the *page-break-inside=auto* has been set on the **table** and *page-break-inside=avoid* has been set on the **cell**, then an empty part of table cell can be rendered at the end of page:

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M02Ycjdfx7ZSDjobGMF%2F-M02bLZaIVvz9zgvXeJ3%2Fimage.png?alt=media&#x26;token=e21d1be5-b37e-42ed-8ae4-1ca529695b63" alt=""></div>

If *page-break-inside=avoid* has been set on the table and the row is bigger than the rest of page but will fit on the next page - it will be transferred to the next page and a lot of space will be left empty on the previous one:

<div align="left"><img src="https://543770944-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M02Ycjdfx7ZSDjobGMF%2F-M02bg9XvpWfN7-53eFb%2Fimage.png?alt=media&#x26;token=19818ac8-339f-42d9-8a2e-cc65b8b65e61" alt=""></div>

### Headers, footers and watermarks

An HTML element with the CSS property **position: fixed** will be rendered on every page and can therefore be used as headers/footers or watermarks.

{% hint style="warning" %}
**Important:** These elements will ignore the page margins, so if you need to fit a 50px high header on your pages and want a 20px high margin to the page contents, you need to update the page top margin to 70px to make room for your page header.
{% endhint %}

Example header and footer CSS code:

```css
.header {
    position: fixed;
    left: 20px;
    top: 20px;
}

.footer {
    position: fixed;
    left: 20px;
    top: 750px;
}
```

{% hint style="warning" %}
**Note:** Plain CSS used for clarity. You will need to replace the curly brackets with [Magic Tags](#magic-tags) in your connector markup code.
{% endhint %}

Example HTML document using the header and footer:

```markup
<body>
    <div class="header">
        logo
    </div>
    <div class="footer">
        disclaimer
    </div>

    <p>
        page content...
...
```

### Magic tags

Magic Tags are a connector specific tag system which enables the usage of both [FlowScript](https://help.novacuraflow.com/6.11/development/flow-studio/flowscript) and CSS in the [HTML](#html) section of the connector settings. This section will walk you through how to enable Magic Tags parsing and how to use them with CSS in your page layouts.

#### Enabling magic tags

To enable parsing of the tags, you just need to add the line *\[\_ENABLE\_MAGIC\_TAGS\_]* in the HTML section of the connector settings:

```css
[_ENABLE_MAGIC_TAGS_]
<html>
<!-- Your page layout goes here -->
</html>
```

#### Using magic tags to write CSS code

In order to convert your CSS code to be usable by the connector:

1. Replace all left curly brackets "{" with "\[\_CBL\_]"
2. Replace all right curly brackets "}" with "\[\_CBR\_]"

This is how the converted CSS code from the header/footer example above will look like:

```css
.header [_CBL_]
    position: fixed;
    left: 20px;
    top: 20px;
[_CBR_]

.footer [_CBL_]
    position: fixed;
    left: 20px;
    top: 750px;
[_CBR_]
```

## Layout Examples

### Document Skeleton

Sample document skeleton including style sheet, header and footer which are defined in [script steps](https://help.novacuraflow.com/6.11/development/flow-studio/applications/workflow/script-item) in the workflow:

```markup
[_ENABLE_MAGIC_TAGS_]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us" dir="ltr">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    {pdf_stylesheet}
</head>
<body>
    {pdf_header}
    {pdf_footer}
    <h1>Heading</h1>
    <table class="ContentTable" id="1">
        {content_table_1}
    </table>
    <table class="ListTable" cellspacing="0" cellpadding="0">
        {list_table}
    </table>
    <table class="CheckListTable">
        {self_control_table_2}
    </table>
</body>
</html>
```

### Style Sheet

Sample [MagicTag](#magic-tags)-formatted CSS code defined in a [script step](https://help.novacuraflow.com/6.11/development/flow-studio/applications/workflow/script-item). The output variable name *pdf\_stylesheet* is used and then referred to in the [document skeleton](#document-skeleton) above. Note that here we include the \<style /> tags which were excluded in the document skeleton.

```javascript
return ''
&'    <style>'
&'      body [_CBL_]'
&'          font-size:12px;'
&'          color:#000000;'
&'          font-family: sans-serif;'
&'      [_CBR_]'

&'      h1 [_CBL_]'
&'          margin:0px;'
&'          padding-top:20px;'
&'          padding-bottom:0px;'
&'      [_CBR_]'

&'      div [_CBL_]'
&'          display:block;'
&'      [_CBR_]'

&'      td [_CBL_]'
&'          page-break-inside: avoid;'
&'      [_CBR_]'

&'      table [_CBL_]'
&'          page-break-inside: avoid;'
&'          border-collapse: collapse;'
&'      [_CBR_]'

&'      .header [_CBL_]'
&'          position:fixed;'
&'          height: 45px;'
&'          left: 50px;' 
&'          top: 30px;'
&'      [_CBR_]'

&'      .footer [_CBL_]'
&'          position: fixed;'
&'          left: 50px;'
&'          top: 800px;'
&'      [_CBR_]'

&'      #title [_CBL_]'
&'          font-size: 28px;'
&'      [_CBR_]'

&'      .ContentTable [_CBL_]'
&'          width:100%;'
&'      [_CBR_]'

&'      .ContentTable th [_CBL_]'
&'          text-align: left;'
&'          padding: 2px 2px 2px 2px;'
&'      [_CBR_]'

&'      .ContentTable td [_CBL_]'
&'          text-align: left;'
&'          padding: 2px 2px 2px 2px;'
&'      [_CBR_]'

&'      .ListTable [_CBL_]'
&'          width:100%;'
&'      [_CBR_]'

&'      .ListTable th [_CBL_]'
&'          border:1px solid #666666;'
&'          font-weight: bold;'
&'          font-style: normal;'
&'          text-decoration: none;'
&'          color: #ffffff;'
&'          background-color: #333333;'
&'      [_CBR_]'

&'      .ListTable td [_CBL_]'
&'          border:1px solid #666666;'
&'          font-style: normal;'
&'          text-decoration: none;'
&'          color: #000000;'
&'      [_CBR_]'

&'      .ListTable th, .listTable td [_CBL_]'
&'          margin: 0px;'
&'          padding: 5px 5px 5px 5px;'
&'      [_CBR_]'

&'      .ListTable th, .listTable tr.tableRowHead td [_CBL_]'
&'          text-align: left;'
&'          background-color: #333333;'
&'          color: #ffffff;'
&'      [_CBR_]'

&'      .ListTable td.empty_dataset [_CBL_]'
&'          padding-top: 40px;'
&'          padding-bottom: 40px;'
&'      [_CBR_]'

&'      tr.altrow td [_CBL_]'
&'          background-color: #FFFFFF;'
&'      [_CBR_]'

&'    </style>';
```

### Header and Footer

Header FlowScript code, referred to as *pdf\_header* in the [document skeleton](#document-skeleton):

```javascript
return '<div class="header"><img src="company_logo.png" alt="" /></div>';
```

Footer FlowScript code, referred to as *pdf\_footer* in the [document skeleton](#document-skeleton):

```javascript
return '<div class="footer">Sample footer text</div>';
```

### HTML table from flow record

Code referred to as *checklist\_table* in the [document skeleton](#document-skeleton):

```javascript
let infoRec = First(infoTable);
let html = ''
&'      <tr>'
&'          <th>Info 1:</th>'
&'          <th>Info 2:</th>'
&'          <th>Info 3:</th>'
&'          <th>Info 4:</th>'
&'      </tr>'
&'      <tr>'
&'          <td>'&infoRec.info1&'</td>'
&'          <td>'&infoRec.info2&'</td>'
&'          <td>'&infoRec.info3&'</td>'
&'          <td>'&infoRec.info4&'</td>'
&'      </tr>'
&'      <tr>'
&'          <th>Info 5:</th>'
&'          <th>Info 6:</th>'
&'          <th>Info 7:</th>'
&'          <td rowspan="2"></td>'
&'      </tr>'
&'      <tr>'
&'          <td>'&infoRec.info5&'</td>'
&'          <td>'&infoRec.info6&'</td>'
&'          <td>'&infoRec.info7&'</td>'
&'      </tr>';
return html;
```

### HTML table from flow table

Code referred to as *list\_table* in the document skeleton. Here we use checkbox symbols from the Wingdings font to render good looking checkboxes in the final PDF document.

```javascript
let html = '';
let cbSize = '20';

// Add the table header row:
set html = html
&'      <tr>'
&'          <th style="text-align: left; padding-top: 5px; padding-right: 0px; padding-left: 10px; padding-bottom: 5px;">Information:</th>'
&'          <th style="text-align: center; padding-top: 5px; padding-right: 5px; padding-left: 5px; padding-bottom: 5px;">Yes</th>'
&'          <th style="text-align: center; padding-top: 5px; padding-right: 5px; padding-left: 5px; padding-bottom: 5px;">No</th>'
&'          <th style="text-align: left; padding-top: 5px; padding-right: 0px; padding-left: 10px; padding-bottom: 5px;">Comment:</th>'
&'      </tr>';

// Iterate through the SQL table rows
let counter = 0;
for row in listTable {
   let cbYes = 'o';
   if row.yes = 1 {
       set cbYes = 'þ';
   }
   
   let cbNo = 'o';
   if row.no = 1 {
       set cbNo = 'þ';
   }
   
    counter = counter + 1;
    let evenRow = ' class="altrow"';
    if (Floor(counter/2) < counter/2) {
       set evenRow = '';
    }

   if row.header = 1 {
      set counter = 0;
      set html = html
      &'      <tr>'
      &'          <td style="text-align: left; font-weight: bold; padding-top: 15px; padding-right: 0px; padding-left: 10px; padding-bottom: 0px;">'
      &'              '&row.information&'</td>'
      &'          <td style="text-align: center; font-weight: bold; padding-top: 5px; padding-right: 5px; padding-left: 10px; padding-bottom: 5px;">'
      &'          </td>'
      &'          <td style="text-align: center; font-weight: bold; padding-top: 5px; padding-right: 5px; padding-left: 10px; padding-bottom: 5px;">'
      &'          </td>'
      &'          <td style="text-align: right; font-weight: normal; padding-top: 18px; padding-right: 5px; padding-left: 10px; padding-bottom: 0px;">'
      &'              '&row.comment&'</td>'
      &'      </tr>';
   }
   else {
      set html = html
      &'      <tr'&evenRow&'>'
      &'          <td style="text-align: left; font-weight: normal; padding-top: 5px; padding-right: 0px; padding-left: 10px; padding-bottom: 5px;">'
      &'              '&row.information&'</td>'
      &'          <td style="text-align: center; font-weight: normal; font-family: Wingdings; font-size: '&cbSize&'px; padding-top: 5px; padding-right: 5px; padding-left: 5px; padding-bottom: 5px;">'
      &'              '&cbYes&'</td>'
      &'          <td style="text-align: center; font-weight: normal; font-family: Wingdings; font-size: '&cbSize&'px; padding-top: 5px; padding-right: 5px; padding-left: 5px; padding-bottom: 5px;">'
      &'              '&cbNo&'</td>'
      &'          <td style="text-align: left; font-weight: normal; padding-top: 5px; padding-right: 0px; padding-left: 10px; padding-bottom: 5px;">'
      &'              '&row.comment&'</td>'
      &'      </tr>';
   }
}

return html;
```

### Adding Fonts

The connector will be able to use fonts installed on the machine hosting the connector.&#x20;

To install a font in Windows; right-click the .ttf-file and select "Install", then restart the Flow Server.

To specify the font face in HTML, add the font-family style attribute to your HTML element or CSS:

```css
font-family: 'DengXian Light';
```

## Reference

### DTP Point

[DTP points](https://en.wikipedia.org/wiki/Point_\(typography\)) on Wikipedia

{% hint style="success" %}
1 DTP Point = 1/72 inches = 25.4/72 mm = 0.3527 mm
{% endhint %}

### File Record

A file record is a [flow record](https://help.novacuraflow.com/6.11/development/flowscript/variables#records) with two fields: filename and data.

```css
/* FlowScript for a file record */
let fileRec = [filename: 'mySignature1.png', data: mySignatureRecord.data];
return fileRec;
```
