Hi,
I have recently upgrade to V2 of SurveyJS, which looks and feels great.
However, now my export for SurveyPDF seems to be broken. The result I am getting is always blank and no questions. Here is the function (directly from the docs) and screen shot:
JavaScriptexport const saveSurveyToPdf = (
json: any,
filename: string,
surveyModel: any,
answers?: boolean
) => {
const pdfOptions = {
fontSize: 14,
margins: {
left: 10,
right: 10,
top: 10,
bot: 10
},
fontName: 'Courier'
};
const surveyPDF = new SurveyPDF.SurveyPDF(json, pdfOptions);
if (answers) surveyPDF.data = surveyModel.data;
surveyPDF.save(filename);
};
Screenshot:
I am very confused, I took the function directly from the docs and also have tried this on Plunker and it worked fine. My JSON is perfectly correct and when console logging it is showing the correct information, all pages and questions etc.
Thank you look forward to hearing from you guys :)