Convert HTML to PDF

Converts HTML document to PDF document with the help of Make.

Note

There could be an issue converting certain symbols such as £. Add the following line in the HTML head element

<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8”>

Parameters

Output Parameters

Parameter

Description

Example

File Content

The content of the result PDF file.

It is the content of the result file.

Input Parameters

Parameter

Description

Example

Connection

To allow your scenarios to get information from and send it to Plumsail Documents, you need to create a connection.

For more information on how to create a connection to Plumsail Documents, see the online Help.

Input type

Defines the source of the HTML.

HTML File or Raw HTML

Source HTML

HTML content of a source template. The option depends on the Input type. You can specify raw HTML here or extract file content from other apps like:

  • SharePoint

  • Salesforce

  • Box

  • OneDrive

  • Google Drive

  • Dropbox

  • SFTP

  • File System

List of apps

<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>HTML to PDF example
    <style>
        div {
            border: 1px solid lightgray;
            padding: 5px;
            float: left;
        }
    </style>
</head>
<body>
    <div>
        Text in box1
    </div>
    <div>
        Text in box2
    </div>
</body>
</html>

Page margins

The page margins in millimeters. The syntax is the same as in CSS.

  • 25 50 75 100;

This will set top margin as 25mm, right margin as 50mm, bottom margin as 75mm, left margin ias 100mm.

Header HTML (Only for Classic engine)

HTML markup that should be added as a Header.

<!DOCTYPE html>
<html>
  <head>
    <title></title>
  </head>
<body>
This is header
</body>
</html>

Footer HTML (Only for Classic engine)

HTML markup that should be added as a Footer.

<!DOCTYPE html>
 <html>
   <head>
     <title></title>
   </head>
 <body>
 This is footer
 </body>
 </html>

Conversion engine

Defines what engine is used when converting the source HTML to PDF.

  • Modern - Chrome-based engine. It supports modern HTML and CSS standards.

  • Classic - Old Qt WebKit-based engine. It has more configuration, but it doesn’t support modern HTML and CSS standards.

Paper Size

Paper size for output PDF file.

  • A4

  • Letter

  • LetterSmall

  • Tabloid

  • Ledger

  • Legal

  • Statement

  • Executive

  • A2

  • A3

  • A4Small

  • A5

  • B4

  • B5

Orientation

Page orientation for output PDF file.

  • Portrait

  • Landscape

Example

Download a source HTML file and use the output in the Convert HTML to PDF action, or apply raw HTML.

Convert HTML document to PDF Example