Hi Team,
Getting an error while exporting result in PDF from SurveyAnalyticsTabulator. Please find attached exported PDF when signature pad is used in survey definition
vizPanelOptions :
CodevizPanelOptions = { allowHideQuestions: false, haveCommercialLicense: true, allowDynamicLayout: false}
Survey Definition:
{
"title" : "Survey Analytics COPIED",
"logoPosition" : "right",
"completedHtml" : "<h3>Thank you for your feedback</h3> <h5>Your thoughts and ideas will help us improve our product.</h5>",
"pages" : [ {
"name" : "page1",
"elements" : [ {
"type" : "radiogroup",
"name" : "question2",
"choices" : [ "item1", "item2", "item3" ]
}, {
"type" : "rating",
"name" : "question1"
}, {
"type" : "checkbox",
"name" : "question3",
"choices" : [ "item1", "item2", "item3" ]
}, {
"type" : "dropdown",
"name" : "question4",
"choices" : [ "item1", "item2", "item3" ]
}, {
"type" : "boolean",
"name" : "question5"
}, {
"type" : "file",
"name" : "question6"
}, {
"type" : "ranking",
"name" : "question8",
"choices" : [ "item1", "item2", "item3" ]
}, {
"type" : "text",
"name" : "question7"
}, {
"type" : "signaturepad",
"name" : "question9"
} ]
} ],
"clearInvisibleValues" : "none"
}
SurveyResult:
Attached in file
Dependencies used :
Codejquery: 3.3.1, jspdf: 1.5.3, jspdf-autotable: 3.0.5, react: 17.0.2, react-dom: 17.0.2, survey-analytics: 1.9.59, survey-core: 1.9.59, survey-creator-core: 1.9.59, survey-creator-react: 1.9.59, survey-pdf: 1.9.59,
Hello,
Probably the table too wide. Probably you need to make table with less columns count.
We're using 3rd party component (https://tabulator.info/)) in our products. Most likely this export issue not related to our code and should be addressed to them.
Thanks, Serge
SurveyJS Team
Hello Serge,
Even if Survey.JS is using third party component (tabulator), changes provided by them will need to be incorporated in Survey.JS. Request you to please raise this issue to tabulator on behalf of SurveyJS as this is impacting PDF generation from survey's components.
Thanks and Regards,
Tarang
Hello Tarang,
Thank you for the update. I'll try to reach out to the Tabular community. I'll get back to you once I have any news to share.
Hello Tarang,
Thank you for your patience. I got the following reply from a Tabular support member:
So, I can make a conclusion that the issue may somehow relate to the number of visible columns. And the purposed solution is to decrease the number of columns. However, by looking at your survey definition, I don't see that many columns. Moreover, I created this sample and didn't get any issue while exporting the table to PDF.
At this point, I believe the issue may be more than just the number of columns. I'll be happy to work with you and track the issue further. Would you please update my sample to demonstrate the issue?
I look forward to your reply.
Hello Jane,
I was using jspdf@2.5.1 and jspdf-autoable@3.5.26, post downgrading both libraries issue resolved for large number of columns. However, when added a signature pad instead of rendering base64 data I could see question name in the cell. Please find attached downloaded PDF
Hello,
Thank you for the update. From what I gather, downgrading these libraries fixed the mentioned issue.
Still, I believe we should research this issue in detail. Perhaps, there is an issue in the latest jspdf library version: so we may report it to the team. So please feel free to share a reproducible demo showing the initial and the recent issue.
Thank you.