Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pdf-writer

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdf-writer

Overlays text on PDFs.

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
65
increased by47.73%
Maintainers
1
Weekly downloads
 
Created
Source

PDF Writer

This script generates text-only PDFs by reading configuration from a JSON file. It can also overlay text on existing PDFs using QPDF.

Installation and usage

npm i -g pdf-writer
pdf-writer <path to a JSON file>

JSON format

See example/example.json for reference.

A few notes:

  • Width and height of a sheet are specified in millimeters.
  • x and width are relative to the width of the page; y and lineGap are relative to the height of the page.
  • Default value for align is center and for verticalAlign is middle: you don’t need to specify them explicitly.
  • continuation only works for single-line labels.

This script uses QPDF for overlaying text on existing PDFs. An example of how to achieve this can be found in the example file: see the line with the postprocess configuration. If you don’t have QPDF installed, remove this line in order to be able to run the example.

Keywords

FAQs

Package last updated on 24 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc