
Add PDF and Print button to your WordPress website.
With this plugin you can create PDF files and print pages quickly. Add PDF & print buttons to WordPress website pages, posts, and widgets.
Generate documents with custom styles and useful data for archiving, sharing, or saving.
View Demo
Free Features
- Automatically add PDF & Print buttons to:
- Pages
- Posts
- Search results
- Archives
- Custom post types
- Select position of the buttons in content:
- Top left
- Top right
- Bottom left
- Bottom right
- Top & Bottom Right
- Top & Bottom Left
- Add buttons to widget area
- Add buttons via shortcode
- Display count of PDF/Print generation
- Set button type:
- Change PDF button action:
- Download PDF
- Open PDF in a new window
- Display PDF & Print buttons for certain user roles
- Display data generated by shortcodes in document
- Add title and featured image to the document
- Set custom featured image size
- Set PDF document size
- Set custom margins for PDF document:
- Customize document styles
- Change the Print button action
- Create PDF that fully copies the page
- Compatible with latest WordPress version
- Incredibly simple settings for fast setup without modifying code
- Detailed step-by-step documentation and videos
- RTL ready
Pro Features
All features from Free version included plus:
- Add text or image watermark
- Prevent copying of PDF file content
- Customize watermark opacity
- Create custom document header and footer templates with:
- Images
- Text
- Date created
- Source page URL
- Post date (current date for search and archive pages)
- Current page number (for PDF only)
- Total pages count in document (for PDF only)
- Post author (for single posts or pages only)
- Create custom document first and last pages with:
- Compatibility with Advanced Custom Fields
- Set custom top and bottom margins for running title
- Add and manage:
- Custom fields
- Custom data
- Add custom fields/custom data:
- Before content
- After content
- WooCommerce compatibility
- Set PDF layout:
- Display featured image with shortcode
- Display count of PDF/Print generation in admin posts table
- Set custom images for buttons
- Disable PDF & Print buttons for certain pages and/or post types
- Disable PDF & Print buttons for certain users and/or roles types
- Additional Elements to single post type [NEW]
- Dinamic URI for PDF document [NEW]
- Change default PDF file name
- Send PDF as email
- Add custom code via plugin settings page
- Prevent search engines from indexing links in documents
- Configure all subsites on the network
- Get answer to your support question within one business day (Support Policy)
Upgrade to Pro Now
If you have a feature suggestion or idea you’d like to see in the plugin, we’d love to hear about it! Suggest a Feature
Documentation & Videos
Help & Support
Visit our Help Center if you have any questions, our friendly Support Team is happy to help – https://support.bestwebsoft.com/
Affiliate Program
Earn 20% commission by selling the premium WordPress plugins and themes by BestWebSoft — https://bestwebsoft.com/affiliate/
Translation
- German (de_DE)
- French (fr_FR)
- Japan (ja)
- Portugese (pt_BR)
- Spanish (es_ES)
- Italian (it_IT)
- Swedish (sv_SE)
- Norwegian (no)
- Danish (da)
- Russian (ru_RU)
- Ukrainian (uk)
Some of these translations are not complete. We are constantly adding new features which should be translated. If you would like to create your own language pack or update the existing one, you can send the text of PO and MO files to BestWebSoft and we’ll add it to the plugin. You can download the latest version of the program for work with PO and MO files Poedit.
Recommended Plugins
- Updater – Automatically check and update WordPress website core with all installed plugins and themes to the latest versions.
- Multilanguage – Translate WordPress website content to other languages manually. Create multilingual pages, posts, widgets, menus, etc.
Credits
Screenshots

Displaying PDF&Print buttons in the post on your WordPress website.

Displaying PDF&Print buttons on archive page of your WordPress website.

Displaying PDF&Print buttons in widget.

Printing output page example.

PDF output page example.

Settings page (Settings tab) for the PDF&Print in admin panel.

Settings page (Output tab) for the PDF&Print in admin panel.
FAQ
Buttons for content do not appear on page
Go to the Settings page and change value for the ‘Add Button to’ option.
Why are PDF and Print buttons not displayed in the custom post type ?
- Please make sure that displaying of PDF/Print buttons is enabled for the necessary custom post type on the plugin settings page. If necessary, mark the checkboxes and save changes.
- Check displaying the buttons on the specified pages in the front end of your site.
If buttons are still not displayed, please complete the following:
- Try activating a standard WordPress theme for a while (Twenty Fifteen, Twenty Sixteen) and check if the problem remains.
- Try deactivating all of your plugins except PDF & Print by BestWebsoft and also check if the problem is still present. If it is not, activate the plugins one-by-one, meanwhile checking, after which plugin activation the problem appears again.
Also, if you are using custom template you should paste the following string to the custom post or page template in order to use PDF and Print buttons:
You can specify some query parameters for your post. For example:
<?php do_action( 'bwsplgns_display_pdf_print_buttons', 'bottom', 'post_type=gallery&orderby=post_date' ); ?>
or
<?php do_action( 'bwsplgns_display_pdf_print_buttons', 'bottom', array( 'post_type'=>'gallery', 'orderby'=>'post_date' ) ); ?>
For more information on the syntax for assigning parameters to function see here.
Why in pdf/print-document displayed not all information from page
For generating a pdf/print page version, PDF & Print plugin uses the content that is featured in the body of post/page before it is displayed by the browser (i.e. the data featured in the main block on this post/page in the edit mode).
If I have shortcode on the page, but I don’t want them to be printed (add to pdf)
Go to the Settings page and unmark checkbox ‘Print Shortcodes’.
How can I change the content pdf/print document?
You can use following filters if “Full Page PDF” option is disabled:
-
in order to change main content of pdf/print document
add_filter( ‘bwsplgns_get_pdf_print_content’, {your_function} );
-
in order to change top running title
add_filter( ‘bwsplgns_top_running_title’, {your_function} );
-
in order to change bottom running title
add_filter( ‘bwsplgns_bottom_running_title’, {your_function} );
-
in order to change the title of pdf/print document
add_filter( ‘bwsplgns_get_pdf_print_title’, {your_function}, 10, 2 );
For example, go to the plugin settings page -> “Custom Code” tab, mark “Activate custom PHP code.” checkbox in the “PHP” section and add the following code:
add_filter(
'bwsplgns_get_pdf_print_content',
function( $content ) {
$my_content = '<p>Lorem ipsum dolor sit amet</p>';
$more_content = '<p>Donec fringilla libero ac sapien</p>';
/* if you want add some data before to the main content */
return $my_content . $content;
/* if you want add some data after the main content */
return $content . $my_content;
/* if you want add some data both sides the main content */
return $my_content . $content . $more_content;
/* if you want add some data instead of the main content */
return $my_content;
}
);
For more information about WordPress filters see here.
If “Full Page PDF” option is enabled please use beforeImageToPdf() and afterImageToPdf() JavaScript functions for changing PDF document.
For example, go to the plugin settings page -> “Custom Code” tab, mark “Activate custom JavaScript code.” checkbox in the “JavaScript” section and add the following code:
function beforeImageToPdf() {
document.getElementById("site-header").style.display = "none";
}
function afterImageToPdf() {
document.getElementById("site-header").style.display = "block";
}
Replace “site-header” on the id of the element you need to hide.
How can I add different styles to PDF and Print pages?
To do that, go to Dashboard->PDF & Print->Output and mark “Custom CSS” checkbox. Enter the required styles in the “Custom CSS” field. You can use the class ‘pdfprnt_print’ in order to add some styles only for Print pages.
For example:
body p {
color: green;
}
.pdfprnt_print p {
color: red;
}
Also you can use filter ‘bwsplgns_add_pdf_print_styles’ to include additional css-files.
For example:
Let’s imagine that you have files style.css, style_print.css and style_pdf.css and you want include them to your PDF or Print pages.
- Upload these files to the folder ‘wp-content/uploads’ via FTP.
- Go to the plugin settings page and open “Custom Code” tab.
-
Mark “Activate custom PHP code” checkbox in “PHP” section and insert the following code:
add_filter(
‘bwsplgns_add_pdf_print_styles’,
function( $styles ) {
$styles[] = array( ‘wp-content/uploads/style_pdf.css’, ‘pdf’ ); /* file will be included to PDF pages /
$styles[] = array( ‘wp-content/uploads/style_print.css’, ‘print’ ); / file will be included only to Print pages /
$styles[] = array( ‘wp-content/uploads/style.css’ ); / file will be included to PDF and Print pages */
return $styles;
}
);
I get an error “Warning: file_put_contents(/public_html/wp-content/plugins/pdf-print/mpdf/ttfontdata/dejavusanscondensed.GSUBGPOStables.dat): failed to open stream: Permission denied in /***/wp-content/plugins/pdf-print/mpdf/classes/ttfontsuni.php on line 1145”. What can I do?
Probably, you don’t have sufficient access permissions to files and folders.
To solve this, please try the following:
- using FTP, please go to the folder “/public_html/wp-content/plugins/pdf-print”
- please check what permissions are set on the “mpdf” folder (755 must be set for the folder and 644 for files)
- if there are another permissions set, please change them
For more info see Changing File Permissions.
How can I load additional fonts for MPDF library?
Please follow the next steps:
- Go to the plugin settings page
- Switch to the “Output” tab
- Find “Additional Fonts” option and click “Load Fonts” button
or
- Download MPDF library by link https://github.com/lynxbee/mpdf
- Using FTP, load the file mpdf-master.zip to the folder “{your_site_home_folder}/wp-content/uploads”
- Go to the plugin settings page
- Switch to the “Output” tab
- Find “Additional Fonts” option and click “Load Fonts” button
I have some problems with the plugin’s work. What Information should I provide to receive proper support?
Please make sure that the problem hasn’t been discussed yet on our forum (https://support.bestwebsoft.com). If no, please provide the following data along with your problem’s description:
- the link to the page where the problem occurs
- the name of the plugin and its version. If you are using a pro version – your order number.
- the version of your WordPress installation
- copy and paste into the message your system status report. Please read more here: Instruction on System Status
Can I remove content added by shortcodes?
To remove the shortcode, please use ‘bwsplgns_pdf_print_remove_shortcodes’ hook:
- Go to the plugin settings page;
- Open “Custom Code” tab, mark “Activate custom PHP code.” checkbox in the “PHP” section;
-
Add the following code (as example):
function pdf_print_remove_shortcodes( $shortcodes_array ) {
$shortcodes_array[] = ‘bestwebsoft_contact_form’;
return $shortcodes_array;
}
add_filter( ‘bwsplgns_pdf_print_remove_shortcodes’, ‘pdf_print_remove_shortcodes’ );
Replace bestwebsoft_contact_form with your shortcode.
ChangeLog