wp-mpdf

wp-mpdf

Print Wordpress posts as PDF. Optional with Geshi highlighting.

  • Frequently updated
    Very good! This plugin is actively maintained and the last update was released 76 days ago.
  • This plugin is tested with the last major release of WordPress
    Content for list item
  • There is no information available which PHP version this plugin requires
    The latest stable PHP 8.5.0 was released on 20 November 2025
  • No unfixed plugin vulnerabilities
    Content for list item

Ratings

18

Active installs

1K

Total Downloads

50K

Support Threads

0

Last updated

21 September 2025

Added

29 June 2009

Versions

5.34%14.23%63.97%16.46%
  • Version 3.4
  • Version 3.7
  • Version 3.9
  • Version other

About wp-mpdf

Changelog

3.9.2

3.9.1

3.9

3.8.3

3.8.2

3.8.1

3.8

3.7.1

3.7

3.6.1

3.6

Earlier versions

For the changelog of earlier versions, please refer to the separate changelog.txt file.

How to install wp-mpdf

  1. Upload the whole plugin folder to your /wp-content/plugins/ folder.
  2. Set write permission (777) to the plugin dir folder => /wp-content/plugins/wp-mpdf/cache
  3. Go to the plugins page and activate the plugin.
  4. Add to your template
    php
    if( function_exists( 'mpdf_pdfbutton' ) ) {
    mpdf_pdfbutton();
    }

    or as a small button
    php
    if( function_exists( 'mpdf_pdfbutton' ) ) {
    mpdf_pdfbutton( false, 'my link', 'my login text' );
    }

    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:
php
function mpdf_pdfbutton( $opennewtab = false, $buttontext = '', $logintext = 'Login!', $print_button = true, $nofollow = false, $options = array() )

The options array supports
php
'pdf_lock_image' => '/my/image/path/relative/to/wordpress/route'

and
php
'pdf_image' => '/my/image/path/relative/to/wordpress/route'

to overwrite which icon should be used.