https://github.com/rse/pdfbox-simple
Simple PDFBox Wrapper
https://github.com/rse/pdfbox-simple
api cli node pdf pdfbox wrapper
Last synced: about 1 year ago
JSON representation
Simple PDFBox Wrapper
- Host: GitHub
- URL: https://github.com/rse/pdfbox-simple
- Owner: rse
- Created: 2018-09-17T19:56:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-08-09T17:29:19.000Z (almost 2 years ago)
- Last Synced: 2025-04-15T21:55:49.156Z (about 1 year ago)
- Topics: api, cli, node, pdf, pdfbox, wrapper
- Language: JavaScript
- Homepage: http://npmjs.com/pdfbox-simple
- Size: 571 KB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PDFBox-Simple
==================
[Apache PDFBox](https://pdfbox.apache.org/) for Node.js
About
-----
This is a small JavaScript library for use in Node.js environments,
providing the possibility to run the Java-based [Apache
PDFBox](https://pdfbox.apache.org/) tool from within a JavaScript API.
NOTICE
------
The Apache PDFBox is written in [Java](https://java.com/)
and hence this Node.js modules requires an installed `java`
executable in the environment.
Installation
------------
```shell
$ npm install pdfbox-simple
```
Usage
-----
```js
(async () => {
const PDFBox = require("pdfbox-simple")
const pdfbox = new PDFBox()
await pdfbox.exec("PDFMerger", "foo.pdf", "bar.pdf", "quux.pdf")
})().catch((err) => {
console.log(`ERROR: ${err}`)
})
```
Motivation
----------
The major differences of [pdfbox-simple](http://npmjs.com/pdfbox-simple)
to similar NPM modules and the motivation for the existence of
[pdfbox-simple](http://npmjs.com/pdfbox-simple) is that, in contrast
to other approaches, it does not need a pre-installed Apache PDFBox.
Instead, it automatically downloads and locally installs the Apache
PDFBox distribution on `npm install` and uses the plain java(1) command
to execute it.
License
-------
Copyright © 2018-2024 Dr. Ralf S. Engelschall (http://engelschall.com/)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.