0.0.11 • Published 2 years ago

agrefab-pdf-generator v0.0.11

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

PDF Generator

NodeJS library for creating PDF documents.

Installation

npm i agrefab-pdf-generator

How to use

const PDFGenerator = require('agrefab-pdf-generator');

let pdf = new PDFGenerator('Untitled');
let introduction = 'Introduction text';
let steps = ['Instructions for step 1', 'Instructions for step 2'];
let numberId = 'SOP-ALL-001';
let revisionDate = '8/9/21';
let effectiveDate = '8/9/21';
let approvedBy = 'email@example.com';
let author = 'email@example.com';
let replaces = '';
let version = 1;
pdf.saveGuide({
        introduction,
        steps,
        author,
        numberId,
        revisionDate,
        effectiveDate,
        approvedBy,
        replaces,
        version,
    });

See tests.js for more examples.

Usage information

  • Each PDFGenerator class represents one instance of a PDF. Do not reuse the same object. Create a new instance to rewrite a file.
  • saveGuide() creates a file on the local filesystem.
  • saveGuide() executes asychronously.
0.0.10

2 years ago

0.0.11

2 years ago

0.0.9

2 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago