diff --git a/lib/phantomscript.js b/lib/phantomscript.js index 11a0b42d5..2fe422589 100644 --- a/lib/phantomscript.js +++ b/lib/phantomscript.js @@ -256,6 +256,10 @@ function executeInPage(data) { svg = document.querySelector('svg') svgValue = xmlSerializer.serializeToString(svg) + // make sure the entire view area is calculated before exiting + // this solves an issue where the svg is not done rendering when the image is created + svg.getBBox(); + //console.log(document.body.outerHTML); return svgValue