Support » Plugin: wp-mpdf » Uncaught MpdfException when $pdf_template_pdfpage is set

  • Resolved petrusmaximus

    (@petrusmaximus)


    Hey whenever I set a value for $pdf_template_pdfpage or $pdf_template_pdfdoc in the currently used theme PDF creation stops working and I find this error in debug.log:

    [14-Dec-2017 20:55:08 UTC] PHP Fatal error: Uncaught MpdfException: Class fpdi_pdf_parser not found. Please run composer update or require setasign/fpdi 1.6.* manually in /html/wordpress/wp-content/plugins/wp-mpdf/mpdf/mpdf.php:31048
    Stack trace:
    #0 /html/wordpress/wp-content/plugins/wp-mpdf/wp-mpdf.php(190): mPDF->SetImportUse()
    #1 /html/wordpress/wp-content/plugins/wp-mpdf/wp-mpdf.php(465): mpdf_output(‘<p><!DOCTYPE ht…’, true, true, NULL, ‘/html/wordpress…’)
    #2 /html/wordpress/wp-includes/class-wp-hook.php(298): mpdf_exec(true)
    #3 /html/wordpress/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(false, Array)
    #4 /html/wordpress/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #5 /html/wordpress/wp-includes/template-loader.php(12): do_action(‘template_redire…’)
    #6 /html/wordpress/wp-blog-header.php(19): require_once(‘/html/wordpress…’)
    #7 /html/wordpress/index.php(17): require(‘/html/wordpress…’)
    #8 {main}
    thrown in /html/wordpress/wp-content/plugins/wp-mpdf/mpdf/mpdf.php on line 31048

    Help plox 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author fkrauthan

    (@fkrauthan)

    What values do you set it too? And have you modified any plugin files?

    Thread Starter petrusmaximus

    (@petrusmaximus)

    I tried absolute and relative URI of PDF files on the server, like http://www.domain.com/wp-content/bla/file.pdf or /wp-content/bla/file.pdf. Both with the same result.
    No plugin-files were modified. Except default_de.php 🙂
    Also tried it on different WP instances with the same result.

    • This reply was modified 3 years, 4 months ago by petrusmaximus.
    Plugin Author fkrauthan

    (@fkrauthan)

    What exactly are you trying to accomplish? Sounds like something I never intended to support.

    Thread Starter petrusmaximus

    (@petrusmaximus)

    Well I am reffering to this part of themes/default.php:

    //Set a pdf template. if both are set the pdfdoc is used. (You didn’t need a pdf template)
    $pdf_template_pdfpage = ”; //The filename off the pdf file (you need this for a page template)
    $pdf_template_pdfpage_page = 1; //The page off this page (you need this for a page template)

    $pdf_template_pdfdoc = ”; //The filename off the complete pdf document (you need only this for a document template)

    So this part is non-functional?

    Meanwhile I found a workaround so I don’t need this function anymore.

    Plugin Author fkrauthan

    (@fkrauthan)

    I am very sorry for the late reply. Yes it seems like this feature is not longer working as it does not seem to be delivered with mpdf without installing extra libs (which would make the installation even bigger).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Uncaught MpdfException when $pdf_template_pdfpage is set’ is closed to new replies.