node-webshot
node-webshot copied to clipboard
SVG icons are not capturing
This is my code base to capture a website page i have set all alignment issues using custom css but svg icon on my page are rendering or its not capturing svg icons. var options = { //renderDelay: 5000, windowSize: { width: 1360, height: 455 }, shotSize: { width: 'all', height: 'all' }, viewportSize: { width: 1360, height: 455 }, customCSS: ".single-cpt_advisors a.topicon {float: left;}/content/.single-cpt_advisors .row{display: block !important;} .singel_advisor .col-md-4{float:right !important} .contact_advisor .d-flex{padding-bottom:0px !important;float: left;min-height: 80px;} .contact_advisor .d-flex span{display:block;float:right;padding-left:0px !important;} .singel_advisor .content_sec{display:inline-block;} .contact_advisor .svgicon{ display:block !important;float: right;} /header/.single-cpt_advisors .col-lg-3{float:left !important;} .single-cpt_advisors .col-lg-9{float:right !important;} /footer/ .copyright_sec .col-md-9{float:left !important;} .copyright_sec .col-md-3{float:right !important;}"
};
//https://www.npmjs.com/package/node-webshot
webshot(url, 'images/test.png', options, function(err) {
// screenshot now saved to google.png
res.status(200).json({status: 'OK', message: 'Generated..', image_url: 'https://code.hashe.com/wp_pdf/images/test.png'});
});