I created scripting for a survey where a custom PDF is created. The PDF is a certificate generated from the responses to the survey questions. I create the HTML for the PDF file (certificate) in LUA as a variable and then use the HTMLtoPDF function to convert that HTML to a PDF file. The LUA-generated PDF is successfully sent to the respondent via email. However, I was also tasked to have that same PDF be displayed in the browser. I was thinking of creating a link to the PDF document like print(‘<a href=”‘ .. pdfObj .. ‘ target=”_blank”>Click here to view certificate</a>’);
However, I don’t know how to access the actual PDF file to be used by pdfObj above. The above link would appear on the thankyou step, something like…
Your certificate has been sent to you via email. Please check your email.
Or do I have to use LUA to create a file and then use that in my link? So in summary, here are the steps desired.
- Complete the survey (including name, email, questions, etc.)
- Generate a certificate via LUA based on survey answers
- Present the thank you page that will also include a link to view the certificate (PDF) in step #2 above
Any ideas? Thanks
-Reggie (programmer for Jen Gold)