survey-pdf icon indicating copy to clipboard operation
survey-pdf copied to clipboard

Signature Pad - Signatures are not exported to PDF when applyImageFit: true

Open JaneSjs opened this issue 2 years ago • 3 comments

User Issue: T16329 - Signatures not being exported to PDF (Safari) https://surveyjs.answerdesk.io/internal/ticket/details/T16329


View Demo To reproduce the issue, run the demo on MacOS, and try to export a survey to PDF. A Signature Pad question doesn't contain a signature image: image

JaneSjs avatar Jan 11 '24 07:01 JaneSjs

When the applyImageFit option is enabled, the SurveyJS PDF library uses an HTMLCanvasElement element to render images, apply the desired image fit and produce the resultant PDF image element. However, it appears that Safari is unable to properly handle it. As a result, images may not be available on the first PDF export call. For instance, here are similar issues:

Image is often missing on first render on Safari iOS SVG to PNG not render images in Safari browser

In the meantime, it is possible to solve this issue by disabling the applyImageFit option.

JaneSjs avatar Jan 18 '24 11:01 JaneSjs

I've tried

When the applyImageFit option is enabled, the SurveyJS PDF library uses an HTMLCanvasElement element to render images, apply the desired image fit and produce the resultant PDF image element. However, it appears that Safari is unable to properly handle it. As a result, images may not be available on the first PDF export call. For instance, here are similar issues:

Image is often missing on first render on Safari iOS SVG to PNG not render images in Safari browser

In the meantime, it is possible to solve this issue by disabling the applyImageFit option.

I've tried your suggestion, but it is still not working Uploading Screenshot 2024-05-06 at 11.11.14.png…

RussPalms avatar May 06 '24 18:05 RussPalms

Hi @RussPalms, Would you please share your code?

JaneSjs avatar Oct 01 '24 10:10 JaneSjs