Plugins
Templates
Print Pro

Introduction

Print Pro gives apps the ability to print the current page, Print based on a custom stylesheet, skip elements, print an element, create a HTML template to insert dynamic data into or create a template with custom HTML, JavaScript, CSS & dynamic data all in one. This means no more APIs or 5 second+ wait times for an invoice, receipt, flyer or anything else you create.
The entire plugin is wrapped up into just a few actions. Everything is fairly easy to understand although should you require support please let us know.

How to setup

The plugin has 3 elements: PDF Viewer, Print Toolkit, and Print Pro Viewer. You just need to place each of them on the page and get started.

Plugin Element proprieties

1) PDF Viewer

Display content of a pdf file from the given URL.
Proprieties fields:
  • PDF URL - Link to the pdf file you want to view.
Exposed states:
  • Viewer ID - return ID of the viewer. Need to print this viewer by ID.

2) Print Toolkit

This element is a powerful tool to print different things.
Exposed states:
  • HTML Output - stores HTML code of printed things.

Actions

1) Print Elements a PrintToolkit
Action fields
Action fields
Action result
Proprieties fields:
  • Page Title - Title of the printed page. This text will be displayed at top of the page.
  • ID of Elements to Print - Print an element by it's Id. The value should look like this "elementid" without #.
  • Import Pages's CSS? - Use .css files included on current page.
  • Import Page's Style? - Use styles from <style></style> tags of current page
  • External CSS Files URL - Import style from custom .css. Example of input value: https://www.w3schools.com/w3css/4/w3.css
  • Remove Inline Styles From Page? - Remove inline styles from print elements. Example of inline style: style="color:red;font-size:16px;" .
  • Set Print Delay (ms, More you print the longer this need's to be!) - Waiting time before printing starts.
  • Add HTML Header to Document? - This HTML content will be printed before the element.
  • Add HTML Footer to Document? - This HTML content will be printed after the element.
  • Copy Form Values? (Enhances the look of input fields) - Preserve input/form values.
  • Print Canvas Elements? - Copy canvas content
  • HTML Doc Type - Enter a different doctype for older markup
  • Debug Mode - Show the iframe for debugging
2) Print HTML Template a PrintToolkit
Print HTML content from the field.
Action fields
Proprieties fields:
  • custom HTML Template - HTML code for print.
  • Timeout- Waiting time before printing starts.
  • Output the template but dont Print - Yes or No. If No Output the template but don't Print.
This action writes in "HTML Output" state the HTML code for printing.
3) Print HTML Template (Advanced) a PrintToolkit
Action fileds
Action fields
Action fields
Proprieties fields:
  • Custom CSS - Custom internal CSS code. Tags <style></style> should be used. Example:
    1
    <style>
    2
    body {
    3
    background-color: yellow;
    4
    }
    5
    </style>
    Copied!
  • custom CSS URL - Custom external .css file. Example:
    1
    <link rel="stylesheet" href="https://your.url/filename.css">
    Copied!
  • Custom Head Javascript - Custom JavaScript code. Tags <script></script> should be used. Example:
    1
    <script type="text/javascript">
    2
    console.log('Hello from ZQ!');
    3
    </script>
    Copied!
  • Custom Head Javascript URL - Custom script from the source. Example:
    1
    <script src="https://your.url/filename.js"></script>
    Copied!
  • Custom Body Javascript - Custom JavaScript code. Tags <script></script> should be used. Example:
    1
    <script>
    2
    let custom_script = 'Hello';
    3
    </script>
    Copied!
  • Custom Body Javascript URL - Custom script from the source. Example:
    1
    <script src="https://your-another.url/filename.js"></script>
    Copied!
  • Custom Head HTML (remove tags!) - This HTML code will be written in the head of your HTML document. Tags <head></head> enabled by default. Example:
    1
    <meta charset="utf-8">
    2
    <title>Example</title>
    Copied!
  • Custom Body HTML (remove tags!) - Main HTML content of your page. Tags <body></body> enabled by default. Example:
    1
    <div class="main">
    2
    <div class="content">
    3
    Content of page
    4
    </div>
    5
    </div>
    Copied!
  • Custom HTML Header - This HTML content will be displayed at the top of the page, before body content. Example:
    1
    <header>
    2
    <div>
    3
    <span>Your custom header text</span>
    4
    </div>
    5
    </header>
    Copied!
  • Custom Footer HTML - This HTML content will be displayed at the bottom of the page, after body content. Example:
    1
    <footer>
    2
    <div class="custom">
    3
    Footer content here
    4
    </div>
    5
    </footer>
    Copied!
  • Timeout- Waiting time before printing starts.
  • Output the template but dont Print - Yes or No. If No Output the template but don't Print.
Resulting HTML
1
<!DOCTYPE html>
2
<html lang="en" dir="ltr">
3
<head>
4
<!-- Custom CSS -->
5
<style>
6
body {
7
background-color: yellow;
8
}
9
</style>
10
<!-- Custom CSS End -->
11
12
<!-- Custom CSS URL -->
13
<link rel="stylesheet" href="https://your.url/filename.css">
14
<!-- Custom CSS URL End -->
15
16
<!-- Custom Head Javascript -->
17
<script type="text/javascript">
18
console.log('Hello from ZQ!');
19
</script>
20
<!-- Custom Head Javascript End -->
21
22
<!-- Custom Head Javascript URL -->
23
<script src="https://your.url/filename.js"></script>
24
<!-- Custom Head Javascript URL End -->
25
26
<!-- Custom Head HTML (remove tags!) -->
27
<meta charset="utf-8">
28
<title>Example</title>
29
<!-- Custom Head HTML (remove tags!) End -->
30
</head>
31
<body>
32
<!-- Custom HTML Header -->
33
<header>
34
<div>
35
<span>Your custom header text</span>
36
</div>
37
</header>
38
<!-- Custom HTML Header End -->
39
40
<!-- Custom Body Javascript -->
41
<script>
42
let custom_script = 'Hello';
43
</script>
44
<!-- Custom Body Javascript End -->
45
46
<!-- Custom Body Javascript URL -->
47
<script src="https://your-another.url/filename.js"></script>
48
<!-- Custom Body Javascript URL End -->
49
50
<!-- Custom Body HTML (remove tags!) -->
51
<div class="main">
52
<div class="content">
53
Content of page
54
</div>
55
</div>
56
<!-- Custom Body HTML (remove tags!) End -->
57
58
<!-- Custom Footer HTML -->
59
<footer>
60
<div class="custom">
61
Footer content here
62
</div>
63
</footer>
64
<!-- Custom Footer HTML End -->
65
</body>
66
</html>
67
Copied!
4) Print Whole Page a PrintToolkit
This action prints the current page using Styles of them.
5) Invoice Builder a PrintToolkit
Action fields
Action fields
Action fields
Result
6) Print Another Page a Print Toolkit
This action creates an iframe and prints its contents.
Property fields:
  • Time to Allow Loading - Waiting time before printing. It needs to wait while the page is not loaded fully.
  • Print Page Named - URL of page.
7) Print Element Inline styles Print Toolkit
Print an element by ID.
Action fields
Property fields:
  • Element ID - id of the element to print.

3) Print Pro Viewer

This element makes a preview for input HTML code.
Property fields:
  • HTML - HTML Code.

ChangeLogs

Update 26/07/21 Version 1.20.0

  • improve invoices template

Update 06/05/21

  • fixed issue with HTML display in Print Pro Viewer

Demo to preview the settings

Last modified 4mo ago