Print-Pro-Matic | Documentation
Print-Pro-Matic uses the
[print-me] shortcode to place the print trigger on any post or page. The following shortcode attributes controls the look and the function of the print trigger.
By default the target element to be printed is
article. This can be changed by assigning a valid HTML Element, Class, or ID.
Multiple targets can be assigned using a comma to separate each target element. For example, let’s say we wanted to target two elements, one with an ID of
elem1 and another element with a class of
[print-me target="#elem1, .elem2"/]
The url attribute is used to print an external page
The Title attribute is used to modify the print trigger text link. Also, if no alt attribute is assigned, the title attribute value will be also be used as the rollover text of the printer-icon (if used).
[print-me title="Print Form"/]
The ID attribute will assign the print trigger a specific ID.
If no ID attribute is defined, a random, unique ID will be automatically assigned.
By default a print icon will be displayed. A text-only link may be used by setting the
printicon attribute to false.
Defines which print icon should be used. If the printicon attribute is not set to false, a default print icon will be used. The following alternative printer icons may be assigned:
[print-me printstyle="pom-small"/] [print-me printstyle="pom-small-black"/] [print-me printstyle="pom-small-grey"/] [print-me printstyle="pom-small-white"/]
if inserting the shortcode for an external trigger:
The optional class attribute is used to add a specific class to the print-me trigger element.
Placeholders allow for targets to be defined dynamically based on post id or position in the DOM.
%ID% may be used to automatically insert the post ID to be used in the target
%next% to print elements immediately preceding or following the print-me shortcode.
Values can assigned to the print_view query var using:
A sample_print-template.php file has been included in the Print-Pro-Matic folder for reference.
The optional tag attribute is used to change the html element that wraps the print-me trigger element.
If no tag attribute is defined, a DIV element is used by default.
The Alt attribute will override any rollover text for both the printer-icon and the title link.
[print-me alt="Click me to print"/]
Use the do_not_print attribute to prevent content elements inside the target container from being printed. The following code would display but not print any elements assigned a class of “noprint”.
Custom HTML to be added to the top of the print page.
[print-me html_top="<p>HTML content to be placed at the <em>top</em> of the printed page</p>"/]
Custom HTML to be added to the bottom of the print page.
[print-me html_bottom="<p>HTML content to be placed at the <em>bottom</em> of the printed page</p>"/]
The pause_before_print attribute will pause triggering the print dialogue, allowing time for the print-page to fully load. Simply set the amount of time in milliseconds.
The above code will cause the print page to wait 3 seconds (3000 milliseconds) before triggering the print dialogue box.
URL to an image that is to be use as a custom print icon.
Set the use_in_admin attribute to true to allow use of Print-Pro-Matic in the WordPress admin dashboard.
Print only the filled out form input elements contained within the print target.
css_url attribute to link an external css file to be included for use in the print page.
[print-me css_url="https://example.com/css/print.css" /]
print_only attribute may be used to assign content elements by element, id or class that are to be displayed only on the print page. Print Only content will be hidden until printed. The following code would not display but only print any content inside all elements assigned the class of “printonly”.
force_visible attribute is used to select elements by element, id or class that are to be printed even if hidden on the page. The following code would display and print any content inside all elements assigned the class of “printme” even if the elements are hidden.