• Hello Matt,

    Thanks for this plugin, that is just what I was looking for my photo club website. I can now send the users a pdf when there are new blog posts.

    Would it be possible to have the pictures shown in the blog in the pdf; now only the text message is there.
    And second would it be possible to have my own e-mail subject and message text; I am a dutch user and my users are also dutch.

    Thanks for your help, Hans

    • This topic was modified 7 years, 1 month ago by Hans.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Matt Banks

    (@mjbanks)

    Hi kuppj00!

    Thanks for using the plugin! ??

    I’m not sure whether images will get rendered inside the PDF by default, although it’s set to just pull the post content by default.

    There are filters built in so that you can modify that content in your theme or a custom plugin that you write.

    – Subject for email being sent: pdf_email_on_save_subject
    – Content of email message being sent: pdf_email_on_save_message

    For example, to change the title, you can use a function like:

    
    /**
     * Filter PDF email subject
     */
    function my_custom_pdf_email_subject( $subject ) {
    	$subject = 'This is my awesome new email subject!';
    
    	return $subject;
    }
    add_filter( 'pdf_email_on_save_message', 'my_custom_pdf_email_subject' );
    

    A similar function can be used for the content of the PDF.

    Hope that helps! ??

    – Matt

    • This reply was modified 7 years ago by Matt Banks.
    Thread Starter Hans

    (@kuppj00)

    Matt,

    Thanks for your help.
    I will manage the dutch text with your functions.
    But there are no images in the pdf that are in the blog posts; at the photo blogs it is important to have those images in the pdf.
    It you could find a way to get them in the pdf it would be great.

    Thanks, Hans

    Plugin Author Matt Banks

    (@mjbanks)

    Hi Hans,

    I’m a bit tied up with some projects right now, so it might be a few weeks before I’m able to take a look. I’ll have to add some additional filters on top of the the_content to replace all img tags with Image() tags and parameters in tcpdf (as seen here – https://tcpdf.org/examples/example_009/).

    If you’re interested in coding that before I have a chance to get to it, the project is on Github – https://github.com/mattbanks/pdf-email-on-save.

    Thanks,
    Matt

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show pictures in posts’ is closed to new replies.