0.0.11 • Published 3 years ago

agrefab-pdf-generator v0.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
3 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

3 years ago

0.0.11

3 years ago

0.0.9

3 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago