Support » Plugins and Hacks » [Resolved] HTML output of the PDF

[Resolved] HTML output of the PDF

Viewing 1 replies (of 1 total)
  • Plugin Author Lewis Rosenthal


    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.



Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] HTML output of the PDF’ is closed to new replies.