pdf-writer
v1.1.3
Published
Overlays text on PDFs.
Downloads
341
Maintainers
Readme
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.
xandwidthare relative to the width of the page;yandlineGapare relative to the height of the page.- Default value for
aligniscenterand forverticalAlignismiddle: you don’t need to specify them explicitly. continuationonly 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.
