Skip to content

Opens a window with the supplied HTML and opens a print dialog

License

Notifications You must be signed in to change notification settings

EOSBlox/blox-print

Repository files navigation

<blox-print>

A component that prints the given HTML

Install the Polymer-CLI

First, make sure you have the Polymer CLI and npm (packaged with Node.js) installed. Run npm install to install your element's dependencies, then run polymer serve to serve your element locally.

Install blox-print

$ npm install blox-print

Viewing Your Element

$ polymer serve

Running Tests

$ polymer test

Import

$ import 'blox-print';

Basic Use

<blox-print
    html="<html><body><h1>You Printed Me!</h1></body></html>"
    error="{{error}}">
</blox-print>

Javascript Use

<blox-print id="bloxPrint"></blox-print>
<script>
    this.$.bloxPrint.print('<html><body><h1>You Printed Me!</h1></body></html>')
    .then(() => {
        // Do Something
    })
    .catch((err) => {
        // Do Something
    })
</script>

About

Opens a window with the supplied HTML and opens a print dialog

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published