Hi, I am having trouble with exporting imagepicker question.
Other questions like radiogroup or checkboxes are working just fine but I am getting error on imagepicker question when I try to export as PDF.
The error says …
"Uncaught (in promise) TypeError: Cannot read property 'imageLink' of undefined
at B.<anonymous> (survey.pdf.min.js:6)"
I really cannot find any solution onto this.
Please give me some advice on this problem…
Here is my imagepicker question.
questions: [
{
type: "imagepicker",
name: "step3",
title: {"ko" : "헤어라인 모양?",
"default" : "test2"
},
//hasOther: true,
//isRequired: true,
//colCount: 1,
visibleIf: "{step2}='yes.'",
showLabel: true,
choices: [
{
"value": "1",
"imageLink": "https://shingoonktest.cafe24.com/img/hair1.png"
}, {
"value": "2",
"imageLink": "https://shingoonktest.cafe24.com/img/hair2.png"
}, {
"value": "3",
"imageLink": "https://shingoonktest.cafe24.com/img/hair3.png"
}, {
"value": "4",
"imageLink": "https://shingoonktest.cafe24.com/img/hair4.png"
}, {
"value": "5",
"imageLink": "https://shingoonktest.cafe24.com/img/hair5.png"
}, {
"value": "6",
"imageLink": "https://shingoonktest.cafe24.com/img/hair6.png"
}
]
}
]
Hello,
Thank you for the report. I've reproduced the issue in this plunker - https://plnkr.co/edit/wUszgGd81cod5RHm.
We'll worn on the fix.
Wrong rows/cols count in our code. rows 2 cols 4. index = 6 - item (this.question.visibleChoices[index]) is undefined
let index: number = i * cols + j; this.controller.margins.left = currMarginLeft; this.controller.margins.right = this.controller.paperWidth - currMarginLeft - colWidth; currMarginLeft = this.controller.paperWidth - this.controller.margins.right + this.controller.unitWidth; currPoint.xLeft = this.controller.margins.left; let itemFlat: IPdfBrick = await this.generateFlatItem(currPoint, this.question.visibleChoices[index], index);
Thanks, Serge
SurveyJS Team
Hi
I thought that I was doing something wrong :)
Thanks for the fast reply.
When do you think the fix is going to be updated?