How to display PDF in new browser tab that was created with LUA script

0

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…

<Start>

THANK YOU

Your certificate has been sent to you via email.  Please check your email.

Click here to view your certificate now.

<end>

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.

  1. Complete the survey (including name, email, questions, etc.)
  2. Generate a certificate via LUA based on survey answers
  3. 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)

Jennifer Gold edited question
    ×

    Login

    Question stats

    • Active
    • Views36 times
    • Answers0 answers
    • Followers1 follower