Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 790 Bytes

README.md

File metadata and controls

54 lines (38 loc) · 790 Bytes

print-img

Just print an image.

Install

npm install print-img

Usage

Modules

import printImg from 'print-img'
...
printImg(src, options)
...

Browser

...
<script src="path/to/print-img.js"></script>
...

<script>
...
  printImg(src, options)
...
</script>
...

Options

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

Compatibility

Follow naturalWidth & naturalHeight image properties.

Well tested in latest modern browsers include Chrome, Firefox, Edge and IE11.

License

MIT