I want to save my pdf as image, this is the screen shot of my web page and due to the script, the entire page displays as pdf when i use ctrl+p, now I want this entire pdf as a image how can I do this. I want the image to displayed when i click the "confirm order" button.
<button>Confirm order</button>
This is the script i am using for the webpage to be displayed as pdf
<script type="text/javascript" src="js/THREEx.screenshot.js"></script>
<script>
var dataUrl = renderer.domElement.toDataURL("image/png");
var renderer = new THREE.WebGLRenderer({
preserveDrawingBuffer: true // required to support .toDataURL()
});
THREEx.Screenshot.bindKey(renderer);
</script>