Auto-generating PDF documents for storage

Auto-generating PDF documents for storage

  

At a high-level, what steps would you use to automatically generate a PDF document and store either in the DB or on the filesystem?

I have installed the SimpleReportsWithPDF and HtmlToPdfConverter applications and played around with them a bit. The "Download" action on SimpleReportsWithPDF/Print Menu seems to do what I intend in a batch/background format.

At a technical level, if this is performed in a background/batch manner, I don't need to send to HTML (or do I?) I really just want to take some data, format into a PDF and store for use later (email, print, etc)

Thank you

Jeff W.


Solution

Hi, Jeff, 

After having the report in Html, just call the function to convert to PDF, which will return you a binary file that can be saved in the database.

Remember that your page must be anonymous, (you should not ask for user login), do not reference session variables because the component will make a new request without taking advantage of the current session. 


Any questions or need an example, I am at your disposal.


Huarlem Lima 

Solution

Huarlem Lima wrote:

Hi, Jeff, 

After having the report in Html, just call the function to convert to PDF, which will return you a binary file that can be saved in the database.

Remember that your page must be anonymous, (you should not ask for user login), do not reference session variables because the component will make a new request without taking advantage of the current session. 


Any questions or need an example, I am at your disposal.


Huarlem Lima 

Thank you for the reply Huarlem!  I've made very good progress this evening with the suggestions you provided. I'm not quite finished with the original solution but this has helped me a lot. Thank you again.

Jeff W.