View Demo
When files are stored by their names/ids in a survey, it's expected that a developer implements the onDownloadFile function and downloads files to render their File question previews.
However, if this function is not implemented, a SurveyJS PDF Generator fails with an exception.
Purposed solution:
The SurveyJS PDF Generator should not fail with an exception if the onDownloadFile callback function is not attached to a SurveyJS PDF model instance. As an option, we may simply generate an empty file preview, similar to the following one:
User Issue: T14799 - Urgent Help needed - Issue with SurveyPdf https://surveyjs.answerdesk.io/internal/ticket/details/T14799
View Demo When files are stored by their names/ids in a survey, it's expected that a developer implements the
onDownloadFile
function and downloads files to render their File question previews. However, if this function is not implemented, a SurveyJS PDF Generator fails with an exception.Purposed solution: The SurveyJS PDF Generator should not fail with an exception if the![image](https://github.com/surveyjs/survey-pdf/assets/22372972/2f94ae72-9a73-455a-9556-ace47dbd7c94)
onDownloadFile
callback function is not attached to a SurveyJS PDF model instance. As an option, we may simply generate an empty file preview, similar to the following one: