• Resolved maselemat

    (@maselemat)


    Hi, we have a problem with viewing the pdf documents generated by the plug-in?woocommerce-pdf-invoices-packing-slips, in the management of tickets using the platform Liveagent.com.

    When a new ticket arrives in the Liveagent dashboard, you can normally preview a pdf without having to download them. This happens with all pdfs but NOT with those generated by your plugin. The Liveagent support says pdf normally have Content-Type =?application/pdf;?while those done with Packing Slips appear as Content-Type:?application/octet-stream.

    Liveagent also says “The application which is sending the email is responsible for setting content-type header of the attachment, LiveAgent just reacts (displays “View” option or not)?according to the value found in email.”?https://support.liveagent.com/715429-The-View-button-availability-for-attachments-in-tickets

    Downloading two test pdfs on a Mac, we find that:
    – normally a pdf is correctly read by Liveagent?and appears like generated with PDF version 1.4
    – a pdf produced by Packing Slips It is NOT read correctly by Liveagent?and appears to us generated with PDF version 1.7?

    So could you verify if Packing Slips can generate PDF in 1.4 format instead 1.7?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    This plugin indeed generates a version 1.7 PDF, although that doesn’t appear to be the issue here if I understand the Liveagent support response (which refers to the content type rather than the PDF version).

    pdf normally have Content-Type = application/pdf; while those done with Packing Slips appear as Content-Type: application/octet-stream.
    The application which is sending the email is responsible for setting content-type header of the attachment, LiveAgent just reacts (displays “View” option or not) according to the value found in email.

    The “application which is sending the email” is WordPress in this case, or more specifically PHPMailer 6.1.7. Looking at the source code for PHP mailer inside WordPress, it looks like it actually recognizes PDF files as application/pdf (source)

    Are you using a third party email sending service in WordPress? If so, which service and which plugin?

    Unfortunately there is no (simple) way for us to control the Content-Type from our end, we can only tell the mail application to attach the file by passing the path to that file.

    Thread Starter maselemat

    (@maselemat)

    Thanks for your suggestions. We use Post SMTP with Type = SMTP and Mailer Type = PostSMTP. The authenticated smtp used is the one from our provider.
    Any ideas to solve this problem?

    Plugin Contributor Ewout

    (@pomegranate)

    Thanks, that appears to be this plugin: Post SMTP Mailer/Email Log – correct?

    You could contact the authors via the support forum for that plugin, or use another plugin (like WP Mail SMTP by WPForms) (although I haven’t checked whether that plugin does apply the correct content-type).

    Hope that helps!

    Thread Starter maselemat

    (@maselemat)

    Yes, that’s the plugin!
    I contact them immediately, thanks again for the suggestions!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Pdf format in woocommerce-pdf-invoices-packing-slips’ is closed to new replies.