WP Post to PDF Enhanced
[resolved] HTML output of the PDF (2 posts)

  1. Kristy Sullivan
    Posted 2 years ago #

    Hello, I really like your plug-in. I was wondering what the HTML output is for the PDF so I can customize some things out the output via CSS on my end. There are a bunch of options that are not available apparently yet in the admin.


  2. Lewis Rosenthal
    Plugin Author

    Posted 2 years ago #

    Hi, Kristy, and apologies for the late follow-up.

    You can stall the output of the PDF by inserting the following code in the main plugin class (wp-post-to-pdf-enhanced.php):

    echo( $html );

    just above the lines:

    // Print text using writeHTML
    $pdf->writeHTML($html, true, 0, true, 0);

    This should show you the HTML at the top of the opened browser window/tab and the PDF source below it. Some elements will not be rendered (the header and footer content), as these are rendered on-the-fly by TCPDF, and ae only inserted into the PDF. I'm not aware of a means of getting TCPDF to dump its work-in-progress, but that would indeed be handy.

    I should probably add a debug flag for this. It's not exact, however, because just as some content is rendered by TCPDF itself, the HTML here is interpreted by TCPDF - and sometimes, in unexpected ways. Still, it's better than flying completely blind.



Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Post to PDF Enhanced
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic