Print-Pro-Matic: Add PDF to Print Page

The following is an example of how to add a pdf document to be printed along with a target using the new add_print_url attribute.

First, we need a simple target to print:

<div id="print_target">This is the simple print target for the page</div>

Now, we simply add our print-me shortcode and use the add_pdf_url attribute to include a pdf document to be printed:

[print-me target="#print_target" add_pdf_url="" pause_time="3000"/]

Direct PDF Print

As of version 1.2.6 we have introduced a new shortcode to print-pro-matic, just for printing PDFs.Note: the ability to print pdf files from javascript is currently not supported in FireFox.

[print-pdf pdf_url=""/]

This will produce a simple button that will print the pdf:

The optional attirbutes for the print-pdf shortcode are as follows:
The ID attribute will assign a custom ID to the button. If no ID is assigned a random id will be assigned.

The title attribute will assign the text of the print button. If no title is assigned, the button will have the tex of: ‘Print PDF’

The class attribute will assign the button a custom class.

The tag attribute will change the trigger element from the default button to, say a div. For example:

[print-pdf pdf_url="url_to_pdf" tag="div"/]

Leave a Reply

Your email address will not be published. Required fields are marked *