Hello,
When I try to fill out this form on iOS (iPhone or Mac), specifically on the Signature module which contains a background image, it doesn't appear in the PDF rendering of the survey.
Do you have a solution? I think this only happens on iOS devices.
You can try it yourself with your own questionnaire here : https://surveyjs.io/form-library/examples/car-rental-form-template-free/reactjs
Thanks,
Regards
Dario
Hello Dario,
Would you please clarify whether you enabled the
applyImageFit
PDF configuration option?Hello,
Thanks, I hadn't seen that.
Can you tell me why when I try with this json for example the 1st time when saving in PDF I only have one image out of 4 then 2nd saving without change 2 images out of 4 then 3rd saving 4 images out of 4
I want all my images (logo, background, background with signature, image) from the first save.
const json = { "logo": "https://api.surveyjs.io/private/Surveys/files?name=56f6cf87-472f-4886-b8ba-0a90222beab5", "logoWidth": "150px", "logoHeight": "100px", "logoPosition": "right", "pages": [ { "name": "page1", "elements": [ { "type": "signaturepad", "name": "question1", "title": "Veuillez indiquer sur le dessin l'endroit où vous avez mal", "isRequired": true, "showPlaceholder": false, "backgroundImage": "https://api.surveyjs.io/private/Surveys/files?name=56f6cf87-472f-4886-b8ba-0a90222beab5" }, { "type": "image", "name": "question2", "imageLink": "https://api.surveyjs.io/private/Surveys/files?name=aed6942e-5548-427c-8947-aff4ddb08955", "imageFit": "cover", "imageHeight": "auto", "imageWidth": "100%" }, { "type": "signaturepad", "name": "question3", "showPlaceholder": false, "backgroundImage": "https://api.surveyjs.io/private/Surveys/files?name=f9c9e3cc-fa1f-45ca-bab6-5549e072a680" } ] } ], "showQuestionNumbers": "off" }
Thanks
Hello,
Thank you for the update. Unfortunately, I didn't completely get it from your message whether or not you enabled the
applyImageFit
PDF configuration option. Would you please confirm this?For the record: we researched a related issue in the past: Signature Pad - Signatures are not exported to PDF when applyImageFit: true. When the
applyImageFit
option is enabled, the SurveyJS PDF library uses anHTMLCanvasElement
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. Here are related issues:To resolve the issue, we suggest that you disable the applyImageFit option.
I look forward to your reply.
Hello,
No, I hadn't enabled the applyImageFit option.
Before enabling it only on iOS, I had a problem when rendering to PDF: just the signature background doesn't display. The signature, logo, and other images generally display correctly.
After enabling this option, the background images appear, but the rest (logo, image, etc.) appear subjectively, potentially from the first rendering, but sometimes not after several renderings.
Do you have a solution for this? When surveys are completed by iOS users, I want all my images to appear in the PDF from the first rendering.
Hello Dario,
To help us assist you in the most efficient manner, please share a problematic demo which illustrates the problem which occurs when the
applyImageFit
option is disabled.I look forward to your reply.
Hello,
I've already given you an example that doesn't work without the applyImageFit option.
It's one of your survey, which is on your website in the demo section: https://surveyjs.io/form-library/examples/car-rental-form-template-free/reactjs
Otherwise, try using the survey JSON I gave you without setting the applyImageFit option when rendering as a PDF, and with
Hello Dario,
Thank you for the update. I reproduced the issue on my end. We'll research it and update you as soon as we get any news to share.
[Mac OS] Signature Pad with a Background Image - The background image is not rendered in PDF
Please stay tuned.