0

I have a json object of a surveyJS. I want to save it as pdf using Node.js. Documentations are showing the operation by using Angular or React. But I should use node

        const json = {
            "logoPosition": "right",
            "pages": [
              {
               "name": "page1",
               "elements": [
                {
                 "type": "html",
                 "name": "question1",
                 "html": "<html><div>HiML</div></html>",
                 "renderAs": 'image'
                }
               ]
              }
            ]
            }
        const options = {
                htmlRenderAs: 'image'
            };

        const surveyPDF = new SurveyPDF.SurveyPDF(
            this.json,options
          );
          console.log(this.result);
          
          console.log(surveyPDF.data);
          surveyPDF.data = this.result;
    }

this.resut give me undefined and surveyPDF.data gives {}. What I am missing? please let me know

0 Answers0