How to use print-js - 1 common examples

To help you get started, we’ve selected a few print-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github process-engine / bpmn-studio / src / modules / design / bpmn-io / services / diagram-print.service.ts View on Github external
svgToPrint = svg;
    } else if (this.svg !== undefined && this.svg !== null) {
      svgToPrint = this.svg;
    } else {
      // eslint-disable-next-line prefer-promise-reject-errors
      return Promise.reject('No SVG for printing defined');
    }

    const png: string = await this.generateImageFromSVG('png', svgToPrint);

    const printOptions: print.Configuration = {
      printable: png,
      type: 'image',
    };

    print(printOptions);
    return Promise.resolve();
  }

print-js

A tiny javascript library to help printing from the web.

MIT
Latest version published 3 years ago

Package Health Score

61 / 100
Full package analysis

Popular print-js functions