WP Post to PDF
[resolved] Displaying a simple text footer (5 posts)

  1. outofhouse
    Posted 3 years ago #


    Very easy plugin to use!

    Is there any way I can add some text to the php file that will appear at the end of my post as a default footer?

    Any help much appreciated!


  2. outofhouse
    Posted 3 years ago #

    If so, where would I place the code?

    Something like:

    echo $myString;
    echo"<p>Notes to the editor<p/>;
  3. Neerav Dobaria
    Plugin Author

    Posted 3 years ago #

    Instruction for version 2.3.1

    In file wp-post-to-pdf/wp-post-to-pdf.php

    Append your code to $html variable after line 342

    $html .= $myString;
    $html .= "<p>Notes to the editor<p/>";

  4. outofhouse
    Posted 3 years ago #

    Hi Neerav

    Doesn't seem to be working for me!
    Here's where I put the code:

    $html .= htmlspecialchars_decode(htmlentities($post->post_content, ENT_NOQUOTES, 'UTF-8', false), ENT_NOQUOTES);
                $dom = new simple_html_dom();
                foreach($dom->find('img') as $e){
                    $e->align = null;
                    $e->outertext = '<div style="text-align:center;">' . $e->outertext . '</div>';
                $html = $dom->save();
                $html .= $myString;
    $html .= "<p>Notes to the editor<p/>";
                // Print text using writeHTML
                $pdf->writeHTML($html, true, 0, true, 0);
                // ---------------------------------------------------------
                // Close and output PDF document
                // This method has several options, check the source code documentation for more information.

    website: http://www.ooh-websites.co.uk/ovalmedical/oval-medical-collaborates-with-the-cambridge-university-mba-venture-project-2/

    Any ideas or have I simply put it in the wrong place?!

  5. Neerav Dobaria
    Plugin Author

    Posted 3 years ago #

    You have put the code at right place.

    I suspect you forget to delete cached PDF files. You can delete them from WP Post to PDF settings page.

Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic