1.5.0 • Published 6 years ago

@fabrix/spool-pdf v1.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

spool-pdf

Gitter NPM version Build Status Test Coverage Dependency Status Follow @FabrixApp on Twitter

:package: Pdf Spool

Install

$ npm install --save @fabrix/spool-pdf

Configure

// config/main.ts
import { PdfSpool } from '@fabrix/spool-pdf'
export const main = {
  spools: [
    // ... other spools
    PdfSpool
  ]
}

Configuration

// config/pdf.ts
export const pdf = {
  allowLocalFilesAccess: true,
    printDelay: 100,
    paperSize: {
      format: 'Letter',
      height: '11in',
      width: '8.5in'
    },
    format: {
      quality: 100
    }
}

For more information about store (type and configuration) please see the pdf documentation.

Usage

  this.app.pdf.htmlToPDF('<h1>Hello World</h1>')
  .then(pdf => {
    // Do something with your PDF
  })