1.1.0 • Published 2 years ago

pdfstamp v1.1.0

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

pdfstamp

NPM Version License Downloads/week Github Issues

Easily add image signatures like signature.png to an existing pdf.

Features

  • Perfectly preserves form fields and formatting
  • Can add to specific page in long PDF
  • Can resize and position signature

Get Started

  1. Install this tool using: npm i -g pdfstamp.
  2. You need both: (ImageMagick and pdftk) Run pdfstamp doctor to see if you have them!

Usage

Usage: pdfstamp [options] [command]

Options:
  -h, --help       display help for command

Commands:
  doctor           Checks to make sure your dependencies are installed
  stamp [options]  Stamps the pdf document
  help [command]   display help for command

Using as a JS lib

import { stamp } from 'pdfstamp';

async function StampThat() {
  await stamp({
    signature: './signature.png',
    input: './sample.pdf',
    output: './output-example-lib.pdf'
  })
}

Stamping

Usage: pdfstamp stamp [options]

Stamps the pdf document

Options:
  -i, --input <inputPdfPath>       Input document, e.g: file.pdf
  -s, --signature <signaturePath>  Signature file, e.g: signature.png
  -p, --page <pageNum>             Page to input the signature, default: 1 (default: 1)
  -o, --output <outputPdfPath>     Output stamped document, default: output.pdf (default: "output.pdf")
  -l, --left <leftAmount>          Signature position from page left (px), e.g: 120
  -r, --right <rightAmount>        Signature position from page right (px), e.g: 120
  -t, --top <topAmount>            Signature position from page top (px), e.g: 120
  -b, --bottom <bottomAmount>      Signature position from page bottom (px), e.g: 120
  -z, --zoom <zoomPercent>         Signature zoom percentage on page (100% is full pagewidth), default: 25 (default: 25)
  --debug                          Keeps temporary PDF files (for development purposes)
  -h, --help                       display help for command

Example

pdfstamp stamp \                                                                                                      
--input ./input.pdf \                                                                                  
--signature ./signature.png \                                                      
--output ./output.pdf \                                
--page 2 \                       
--bottom 300 \
--left 200

output

1.1.0

2 years ago

1.0.9

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago