Question T10307
Visible to All Users

How attachments are exported onto PDF

created 2 years ago (modified 2 years ago)

Hi,

Could you tell me how attachments are exported onto the out of the box PDF functionality? For example, I've tested on your site attaching an Excel document on a survey, and exported that. The resultant PDF shows a link to the Excel, which is then downloadable if the user clicks on it from within the PDF.

I'm interested in knowing the technical details behind how this is done. I'm doing a bit of research and I came across jspdf and I thought that it didn't allow for attachments onto PDF, but perhaps you are extending this library. I'm therefore I'm curious to know how SurveyJs has implemented this.

Thank you.

Answers approved by surveyjs Support

created 2 years ago
    Show previous comments (4)

      Ok great thank you for clarifying! This helps a lot. I wasn't aware that base64 encoded strings can be used as URLs so thank you.

        Hi Serge, apologies for re-opening quite an old ticket. I've added a question type of 'file' to an example on SurveyJs and I've uploaded a very simple word document. This adds a link to the exported PDF just fine. However, when I come to click on the link, the attachment doesn't download. I have to instead right-click, and open the link in a new tab in order for the attachment to successfully download. Is this normal behavior?

          Hello,

          I created a separate ticket on your behalf: T10473: File question doesn't allow downloading Word document when survey is exported to PDF. We placed it in our processing queue and will process it shortly.