Description
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.
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
- Set button type:
- Image
- Text
- Image + Text
- 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:
- Left
- Right
- Top
- Bottom
- Customize document styles
- Create PDF that fully copies the page
- Add custom code via plugin settings 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)
- 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:
- Portrait
- Landscape
- Set custom images for buttons
- Disable PDF & Print buttons for certain pages and/or post types
- Change default PDF file name
- 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)
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
- [Doc] User Guide
- [Doc] Installation
- [Doc] Purchase
- [Video] User Guide
- [Video] Purchase, Installation, Configuration Tutorial
- [Video] Installation Instruction
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
- 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.
Screenshots
Installation
- Upload
pdf-print
folder to the/wp-content/plugins/
directory. - Activate the plugin via the ‘Plugins’ menu in WordPress.
- Plugin settings are located in “PDF & Print”.
View a Step-by-step Instruction on PDF & Print Installation
FAQ
-
Go to the Settings page and change value for the ‘Add Button to’ option.
-
- 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:
-
in the top of the post or page template
-
in the bottom of the post or page template
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()
andafterImageToPdf()
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.
Reviews
Contributors & Developers
“PDF & Print by BestWebSoft” is open source software. The following people have contributed to this plugin.
Contributors“PDF & Print by BestWebSoft” has been translated into 2 locales. Thank you to the translators for their contributions.
Translate “PDF & Print by BestWebSoft” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
V2.2.9 – 23.08.2021
- Update : All functionality was updated for WordPress 5.8.
- Bugfix: The bug with mPDF library loading has been fixed.
- Pro : Ability to add shortcodes to the PDF file name.
- Pro : Ability to remove “written by” in the author output.
- Pro : Added drag and drop function to change the order of the additional elements.
V2.2.8 – 06.07.2021
- Bugfix : The issue with generate templates has been fixed.
- Update : BWS Panel section was updated.
- Update : Video Guide has been added.
V2.2.7 – 11.06.2021
- Pro : The bug with field type Group with Advanced Custom Fields has been fixed.
- Pro : The bug with a large number of pages in the site tree was fixed.
- Bugfix : The bug with mPDF library update to version 8.0.8. has been fixed.
- Update : All functionality was updated for WordPress 5.7.2.
V2.2.6 – 14.05.2021
- Bugfix : The compatibility with Divi builder was improved.
- Update : The mPDF library has been updated to version 8.0.8.
- Pro : The bug with Print button has been fixed.
V2.2.5 – 13.04.2021
- Bugfix : JS errors were fixed.
- Update : Functionality of plugin’s scripts adding has been changed so that they will be added only on pages where the PDF & Print buttons will be displayed.
V2.2.4 – 31.03.2021
- Bugfix : The bug with incorrect definition of post types on the search page has been fixed.
- Bugfix : The bug with generating pdf file in Gutenberg editor has been fixed.
- Bugfix : The bug with generating pdf file with the Default CSS option enabled has been fixed.
- Bugfix : The bug with PDF button for widget has been fixed.
- Bugfix : The bug with pdf file generation when the “Full Page PDF” option is enabled has been fixed.
- NEW : Ability to add PDF & Print buttons to the home page is enabled.
- NEW : An ability to show/hide author and date for post in the pdf/print document was added.
- Update : BWS Panel section was updated.
- Update : All functionality was updated for WordPress 5.7.
- Pro : The bug with Compatibility with Advanced Custom Fields has been fixed.
- Pro : Ability to add headers and footers to the contents of a PDF & Print document when the “Full Page PDF” option is enabled.
V2.2.3 – 30.09.2020
- NEW : Shortcode to force a page break.
- NEW : Ability to generate a PDF without links (ability to remove links from document).
- Update : BWS Panel section was updated.
- Update : All functionality was updated for WordPress 5.5.1.
V2.2.2 – 17.08.2020
- NEW : Ability to change PDF & Print document’s content when “Full Page PDF” option is enabled.
- Update : All functionality was updated for WordPress 5.5.
- Update : BWS Panel section was updated.
- Bugfix : The bug with hiding PDF & Print buttons for all users has been fixed.
- Pro : Ability to add the title of a post to Headers & Footers.
- Pro : Ability to place Custom Fields Data before page/post title.
V2.2.1 – 27.02.2020
- Update : All functionality was updated for WordPress 5.3.2.
- Update : BWS menu has been updated.
V2.2.0 – 15.10.2019
- Bugfix : The bug with mPDF library update to version 7.1.5 has been fixed.
- Update : BWS menu has been updated.
V2.1.9 – 04.09.2019
- Update: The deactivation feedback has been changed. Misleading buttons have been removed.
V2.1.8 – 02.07.2019
- Bugfix : Bug related with “Search Engine Visibility” option has been fixed.
- Bugfix : Bug with displaying buttons on archive page has been fixed.
V2.1.7 – 23.05.2019
- NEW : Ability to create PDF document that mirrors what is shown on screen has been added.
V2.1.6 – 03.04.2019
- Bugfix : Warnings and errors in the debug mode has been fixed.
V2.1.5 – 26.02.2019
- Pro : Compatibility with Advanced Custom Fields has been added.
V2.1.4 – 08.01.2019
- Update : The mPDF library has been updated to version 7.1.5.
V2.0.4 – 24.12.2018
- Update : All functionality was updated for WordPress 5.0.2.
V2.0.3 – 13.09.2018
- Pro : Ability to disable content from coping has been added.
- Bugfix : Multiple Cross-Site Scripting (XSS) vulnerability was fixed.
V2.0.2 – 07.05.2018
- Bugfix: The bug with fonts loading has been fixed.
- Update : All functionality has been updated for WordPress 4.9.5.
V2.0.1 – 20.03.2018
- Pro : Ability to set custom fields for single posts has been added.
V2.0.0 – 16.02.2018
- Bugfix : The bug with pdf file generation has been fixed.
V1.9.9 – 09.02.2018
- NEW : Ability to select whether to open or download PDF file has been added.
- NEW : Ability to select the user role PDF & Print buttons will be displayed for has been added.
- Update : All functionality has been updated for WordPress 4.9.4.
V1.9.8 – 05.12.2017
- NEW : An ability to set custom PDF document size has been added.
- NEW : An ability to set custom featured image size has been added.
- NEW : An ability to set custom watermark opacity has been added.
- Update : All functionality has been updated for WordPress 4.9.1.
V1.9.7 – 16.11.2017
- Update : All functionality has been updated for WordPress 4.8.3.
V1.9.6 – 14.09.2017
- Update : MPDF library has been updated to version 6.1.4.
- Bugfix : The bug with pdf file generation has been fixed.
- Bugfix : The bug with pdf file title has been fixed.
V1.9.5 – 27.06.2017
- Bugfix : The bug with displaying PDF & Print pages via the shortcode has been fixed.
- Bugfix : The bug with removing Visual Composer shortcodes has been fixed.
- Update : The plugin settings page has been updated.
V1.9.4 – 14.04.2017
- Bugfix : Multiple Cross-Site Scripting (XSS) vulnerability was fixed.
V1.9.3 – 15.12.2016
- Update : Visual Composer shortcodes have been removed for PDF&Print pages.
V1.9.2 – 06.10.2016
- NEW : Widget PDF&Print Buttons has been added.
- NEW : Titles were added to the buttons.
- NEW : An ability to add PDF&Print buttons via shortcode has been added.
- NEW : An ability to hide button images has been added.
- NEW : An ability to set margins for PDF document has been added.
V1.9.1 – 12.08.2016
- Update : All functionality for WordPress 4.6 was updated.
V1.9.0 – 29.07.2016
- Update : We updated all functionality for wordpress 4.5.3.
- Update : ‘pdfprntpr_options_array’ option was renamed into ‘pdfprnt_options’.
- Pro : The ability to add watermark has been added.
- Pro : ‘pdfprntpr_options’ option was renamed into ‘pdfprnt_options’.
- Pro : Template running titles overlay was fixed.
- Pro : We fixed the bug with pdf and print buttons positions for archive and search pages.
- Pro : We fixed the bug with pdf and print buttons output for custom post types.
V1.8.9 – 13.07.2016
- Bugfix : Custom styles saving is updated.
- Update : BWS Panel section is updated.
V1.8.8 – 26.04.2016
- Bugfix : We fixed the bug with instalation of the additional fonts.
V1.8.7 – 21.03.2016
- Update : Styles for correct displaying of PDF and Print buttons with theme 2016 have been added.
- Bugfix : The bug with displaying of PDF and Print buttons in site RSS has been fixed.
V1.8.6 – 30.11.2015
- Bugfix : The bug with plugin menu duplicating was fixed.
- Bugfix : The bug with the function which is outputted using ‘the_content’ was fixed.
V1.8.5 – 18.11.2015
- NEW : An ability to add custom styles was added.
- NEW : An ability to show/hide title and featured image in the pdf/print document was added.
- Update : “Bwsplgns_get_pdf_print_content”-hook`s call was changed.
- Update : All functionality for wordpress 4.4-beta3 was updated.
V1.8.4 – 01.09.2015
- NEW : Added hooks for the possibility of changing the content of the pdf/print document.
- Update : We updated functionality for displaying pdf/print buttons via functions.
- Update : We updated all functionality for wordpress 4.3.
V1.8.3 – 15.07.2015
- NEW : We added Top & Bottom Position of buttons in the content.
V1.8.2 – 19.06.2015
- Bugfix : We fixed the bug with instalation of the additional fonts.
V1.8.1 – 17.06.2015
- Attention : We changed plugin settings structure. If you are experiencing problems with the plugin work, please contact us via https://support.bestwebsoft.com.
- Bugfix : We fixed the bug with displaying images in pdf-document.
- Bugfix : We fixed the bug with creation of rtl-oriented documents.
- NEW : Added ability to load additional fonts.
- Update : We updated styles for generate pdf/print page version with default stylesheet.
- Update : We updated functionality for displaying pdf/print buttons in any place of your site.
- Update : We updated MPDF library to version 6.0.
V1.8.0 – 18.05.2015
- Update : We updated all functionality for wordpress 4.2.2.
V1.7.9 – 24.04.2015
- Bugfix : We fixed the bug with placing buttons on custom post pages, search pages and archives.
- Update : We updated all functionality for wordpress 4.2.
V1.7.8 – 11.02.2015
- Update : We updated mPDF to 5.7.4 version.
V1.7.7 – 09.01.2015
- Update : BWS plugins section is updated.
- Update : We updated all functionality for wordpress 4.1.
V1.7.6 – 16.10.2014
- Bugfix : We fixed js errors.
V1.7.5 – 07.09.2014
- Bugfix : Security Exploit was fixed.
V1.7.4 – 06.08.2014
- Update : We updated all functionality for wordpress 4.0-beta2.
- Bugfix : Bug with Warning output in Dashboard was fixed.
V1.7.3 – 28.05.2014
- Update : We updated all functionality for wordpress 3.9.1.
- Update : The Ukrainian language is updated in the plugin.
- Bugfix : Bug with dispalying error while searching in admin area was fixed.
V1.7.2 – 14.04.2014
- Update : We updated all functionality for wordpress 3.8.2.
V1.7.1 – 05.03.2014
- Bugfix : Plugin optimization is done.
- Update : Plugin tabs is added.
V1.7 – 21.02.2014
- NEW : We added posibility to turn on showing of Printer choosing window.
- Update : Screenshots are updated.
- Update : We updated all functionality for wordpress 3.8.1.
V1.6 – 16.01.2014
- Update : BWS plugins section is updated.
- Update : We updated all functionality for wordpress 3.8.
- Bugfix : Problem with PDF and Print buttons on static homepage is fixed.
- Bugfix : Problem with Chinese, Japanese and rtl languages is fixed.
V1.5 – 01.11.2013
- Update : We updated all functionality for wordpress 3.7.1.
- Update : Activation of radio button or checkbox by clicking on its label.
- NEW : Add checking installed wordpress version.
V1.4 – 11.10.2013
- NEW: Added ability to switch on/off execution of shortcodes in pdf and printing output.
- NEW: Added new screenshots.
- Update : Updated code, changed some styles.
- Bugfix : Content on PDF preview now is shown.
- Bugfix : Fixed problems with styles of choosed template in admin bar.
V1.3 – 15.03.2012
- NEW : Added functionality for use with custom post type.
V1.2 – 12.03.2012
- NEW : Added functionality for use with Portfolio plugin for portfolio.
V1.1 – 10.03.2012
- NEW : Added functionality for use with Portfolio plugin for single portfolio.
V1.0 – 05.03.2012
- NEW : Added the ability to output PDF and Print buttons on the type of page.