Monday, 12 June 2017

Having trouble providing an image to my report generation route

I am trying to add an image which is located at path in the code. I already have the app looking for static files there so I am not sure what my problem could be. I am using fluentreports.

Code:

var hh = function(Report) {
        //JSON.parse(req.body.facility).facilityID;
       
        Report.newLine(2);
        Report.image ( "../static/images/Logo.png" );
        Report.print('Device Scans', {fontBold: true, fontSize: 16, align: 'right'});
        Report.print('Client Name: ' + JSON.parse(req.body.client).clientName, {fontSize: 12, align: 'left'});
        Report.print('Facility Name: ' + JSON.parse(req.body.facility).name, {fontSize: 12, align: 'left'});
        Report.print('Facility Address: ' + JSON.parse(req.body.facility).address, {fontSize: 12, align: 'left'});
        Report.bandLine();
        Report.newline();


};


via Tzvetlin Velev

No comments:

Post a Comment