RE: Generating and Attaching PDFs to Emails in Liferay Q2.7

Jamie Sammons, modified 1 Year ago. New Member Posts: 3 Join Date: 11/7/24 Recent Posts

Hello Team,

We are currently using the notification template provided in Liferay version Q2.7 to send email notifications. Is there a low-code solution available to generate a PDF and attach it to the email? If not, what is the best practice for implementing this functionality?

Thank you.

thumbnail
Claudio Souza, modified 1 Year ago. New Member Posts: 20 Join Date: 11/9/23 Recent Posts

Hello, Rishi, thanks for taking the time to inquire about your intriguing use case!

I wanted to get a bit more information on this:

When you say "generate a PDF and attach it to the email", do you mean creating an object action (if it's not the case, please let me know) that can access a file from Documents and Media and convert it to a PDF format? Then, you'd upload that converted file to an object entry and trigger another action to send the email with the attached file?

Also, which part of the process you'd like to automate?

  • PDF generation only (an action to convert the file, but not attach it to an email/object entry)
  • Both PDF generation and file attachment (a single action to convert the file and attach it to the email/object entry)

Thanks in advance!

Regards,
Claudio

Jamie Sammons, modified 1 Year ago. New Member Posts: 3 Join Date: 11/7/24 Recent Posts

Hi Claudio,

Thank you for your follow-up!

Yes, we are currently utilizing both Liferay workflow and object actions to trigger the email notifications. Once the record receives final approval, we need to generate a PDF based on the details within the record.

Regarding the process, we would prefer the option that handles both PDF generation and file attachment in a single action — creating the PDF and attaching it to the email/object entry. This would streamline the process by automatically generating the PDF from the record details once it’s approved, and then directly attaching it to the email notification, without requiring separate steps.

Let me know if you need any further details!

Regards,
Rishi

thumbnail
Claudio Souza, modified 1 Year ago. New Member Posts: 20 Join Date: 11/9/23 Recent Posts

Hey, Rishi,

Thank you for answering my questions and providing more info on your requirements.

After researching through our documentation and trying to find a solution for you, I couldn't find an out-of-the-box method to automate all the steps you brought up. However, you can still create a Feature Request for this and our team will dedicate themselves to provide a solution for you.

Besides that, I also found a way to manually convert D&M files to PDF by integrating LibreOffice / OpenOffice. Once you have your converted file, you can attach it to the object entry and send your email notification. I verified this on a local instance of Liferay using LibreOffice.

I can help you integrate this functionality in your Liferay solution if you'd like. Let me know if you're interested.

Best regards,
Claudio Souza