Just print an image.
npm install print-img
import printImg from 'print-img'
...
printImg(src, options)
...
...
<script src="path/to/print-img.js"></script>
...
<script>
...
printImg(src, options)
...
</script>
...
name | type | note |
---|---|---|
id | string | id of iframe |
imgStyle | string | style for image element |
wrapStyle | string | style for wrap div element |
style | string | style text for document |
Follow naturalWidth & naturalHeight image properties.
Well tested in latest modern browsers include Chrome, Firefox, Edge and IE11.