47min

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.

Document image



Properties 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.

Document image

Exposed states:

  • HTML Output - stores HTML code of printed things.

Actions

1) Print Elements a PrintToolkit

Document image
Document image
Document image



Proprieties fields:

  • Page Title - Title of the printed page. This text will be displayed at top of the page.
Document image



  • 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.

Document image



Proprieties fields:

  • custom HTML Template - HTML code for print.
  • Timeout - Waiting time before printing starts.
  • Output the template but don't 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

Document image



Document image
Document image



Proprieties fields:

  • Custom CSS - Custom internal CSS code. Tags <style></style> should be used.

Example:

JS
|

Example:

JS
|
  • Custom Head Javascript - Custom JavaScript code. Tags <script></script> should be used.

Example:

JS
|
  • Custom Head Javascript URL - Custom script from the source.

Example:

JS
|
  • Custom Body Javascript - Custom JavaScript code. Tags <script></script> should be used.

Example:

JS
|
  • Custom Body Javascript URL - Custom script from the source.

Example:

JS
|
  • 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:

JS
|
  • Custom Body HTML (remove tags!) - Main HTML content of your page. Tags <body></body> enabled by default.

Example:

JS
|
  • Custom HTML Header - This HTML content will be displayed at the top of the page, before body content.

Example:

JS
|
  • Custom Footer HTML - This HTML content will be displayed at the bottom of the page, after body content.

Example:

JS
|
  • 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

JS
|

4) Print Whole Page a PrintToolkit

This action prints the current page using Styles of them.

5) Invoice Builder a PrintToolkit

Document image
Document image
Document image
Document image



6) Print Another Page a Print Toolkit

This action creates an iframe and prints its contents.

Document image



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.

Document image



Property fields:

  • Element ID - id of the element to print.

3) Print Pro Viewer

This element makes a preview for input HTML code.​

Document image



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



Updated 18 Apr 2022
Did this page help?
Yes
No