• Resolved jorisw

    (@jorisw)


    To the author: Please help your users by providing a clear way to debug both wp-mpdf and mpdf when PDFs appear to come out blank.

    I say ‘appear’ because often this happens even if wp-mpdf’s “debug” mode’s HTML, comes out the way it’s supposed to. Seeing the HTML output (especially if no errors are shown in there) isn’t very helpful towards understanding why the PDF comes out as blank.

    Neither wp-mpdf nor mpdf are very well documented when it comes to this. For example, there is https://mpdf.github.io/reference/mpdf-variables/debug.html but I have no idea how to enable this when using wp-mpdf. Nor do I know if mpdf’s docs match the version of mpdf being used in wp-mpdf.

    Plain and simple, how does one debug a blank looking PDF file? What other debug than outputting HTML instead of a PDF file, do either offer?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jorisw

    (@jorisw)

    To add to the above, a “debug” checkbox in the settings without an explanation isn’t very helpful either.

    Helpful would be if, when ticking that option, it clearly stated in the settings page that this makes HTML files be written to a debug directory inside the wp-mpdf plug-in directory. Which by the way is no place to write files. Writing to the filesystem is meant to be done in wp-content. For instance you could write to wp-content/uploads/wp-mpdf/debug instead.

    Plugin Author fkrauthan

    (@fkrauthan)

    Thank you very much for your feedback. The debug flag is indeed not very well explained. In 99% of cases when there is a blank output it has something todo with your PHP Configuration. So the only thing I can suggest you todo is to look at your PHP Error Log (or if that is disabled to turn it on)

    Plugin Author fkrauthan

    (@fkrauthan)

    In addition to that I welcome any pull requests on the plugins github page (https://github.com/fkrauthan/wp-mpdf) to add the listed improvements.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Request: Clear debug steps for ‘blank’ PDFs’ is closed to new replies.