javascript document.print code example

Example 1: javascript print

console.log("Who's Joe?")

Example 2: document.print js

function printImages() {
  printJS({
    printable:    ['https://cdn.shopify.com/s/files/1/0284/4946/products/IMG_8999_720x.jpg?v=1580507812',  'https://bloomex.ca/components/com_virtuemart/shop_image/produc t/Make-a-Wish-LF102-53.png',  'https://s3.amazonaws.com/cdn.brecksbulbs.ca/images/500/60053.jpg'],
    type: 'image',
    header: 'Multiple Images',
    imageStyle: 'width:50%;margin-bottom:20px;'
  })
}