Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JaneSjs opened this issue Jan 11, 2024 · 2 comments
Open
Assignees
Labels
bug user issue An issue or bug reported by users.

Comments

@JaneSjs
Copy link
Contributor

JaneSjs commented Jan 11, 2024

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 JaneSjs added bug user issue An issue or bug reported by users. labels Jan 11, 2024
@JaneSjs
Copy link
Contributor Author

JaneSjs commented Jan 18, 2024

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.

@RussPalms
Copy link

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…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug user issue An issue or bug reported by users.
Projects
None yet
Development

No branches or pull requests

3 participants