WordPress.org

Ready to get started?Download WordPress

Plugin Directory

wp-mpdf

Print WordPress posts as PDF. Optional with Geshi highlighting.

  1. Upload the whole plugin folder to your /wp-content/plugins/ folder.
  2. Set write permission (777) to the plugin dir folder => wp-mpdf/cache OR /wp-content/wp-mpdf-themes/cache
  3. Go to the plugins page and activate the plugin.
  4. Add to your template "<?php if(function_exists('mpdf_pdfbutton')) mpdf_pdfbutton(); ?>" as a small button or "<?php if(function_exists('mpdf_pdfbutton')) mpdf_pdfbutton(false, 'my link', 'my login text'); ?>" as a textlink. The second text specifies the text which should displayed if you have checked "needs login" and a user isn't logged in. (if you wish to open the pdf print in a new tab you may pass "true" for the first parameter)
  5. You can adjust some options: in your admin interface, click on plugins and then on wp-mpdf. For allowing or disabling pdf export you can use the checkbox when creating/editing a post or a page.
  6. Place your templates into /wp-content/wp-mpdf-themes

The mpdf_pdfbutton function signature: function mpdf_pdfbutton($opennewtab=false, $buttontext = '', $logintext = 'Login!', $print_button = true, $nofollow = false, $options = array())

The options array supports 'pdf_lock_image' => '/my/image/path/relative/to/wordpress/route' and 'pdf_image' => '/my/image/path/relative/to/wordpress/route' to overwrite which icon should be used.

Requires: 2.9 or higher
Compatible up to: 3.8.3
Last Updated: 2014-4-5
Downloads: 18,181

Ratings

4 stars
4.4 out of 5 stars

Support

0 of 1 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 0,1,0
100,1,1 100,1,1 67,3,2 100,1,1
100,1,1 100,1,1
0,1,0 100,1,1 100,1,1 100,1,1 100,1,1 100,2,2 0,1,0 100,1,1 50,2,1
100,2,2 100,2,2 100,2,2 100,1,1
100,1,1 100,1,1 50,2,1
100,3,3
0,1,0
100,1,1
100,1,1
100,1,1 100,1,1
100,1,1
100,1,1
50,2,1
100,1,1
100,1,1
0,1,0