1.1.3 • Published 7 years ago

pdf-stream-cli v1.1.3

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
7 years ago

PDF stream CLI

Convert PDF to text or JSON

Node.js global module for converting PDF in terminal.

Based on pdf-stream module and PDF.js library.

Table of Contents

Install

Prerequisites

You need Node.js and NPM. Then install node module globally:

  npm i pdf-stream-cli -g

Usage

Output text from PDF URI to STDOUT

  pdf-stream-cli https://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf 

Get JSON with text objects from PDF

  pdf-stream-cli --type json https://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf ./out/text.json

Show help

  pdf-stream-cli --help

Output:

  pdf-stream-cli [options] [input] [output_file]
  
    Defaults:
      input (file or URI) - STDIN
      output_file         - STDOUT
  
    Options:
  
      -h, --help           output usage information
      -v, --version        output the version number
      -w, --whitespace []  whitespace replacement. Ignored for type `json`. Defaut: `` empty string.
      -t, --type [text]    type: text or json. Default: `text`.

Contribute

Contributors are welcome. Open an issue or submit pull request.

Small note: If editing the README, please conform to the standard-readme specification.

License

Apache 2.0

© Sergey N