Skip to content

fabrix-app/spool-pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spool-pdf

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

📦 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
  })