Question T11340
Visible to All Users

Getting error "Of the table content, 2209 units width could not fit page"

created 2 years ago

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 :

Code
vizPanelOptions = { 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 :

Code
jquery: 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,
Show previous comments (3)

    Hello Tarang,
    Thank you for your patience. I got the following reply from a Tabular support member:

    Hey there, That will be a limitation of jspdf and autotables the library that tabulator uses to build the PDF, not tabulator itself. I would suggest having a look at their docs to see what they suggest. You can use the download attribute on columns to hide them in the download if that helps. Happy to help if you need any more info

    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.