Skip to content

CLI-tool which opens a pdf file specified by command line argument in the form of URI with pdf.js.

Notifications You must be signed in to change notification settings

monado3/pdfjs-broker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pdfjs-broker


CLI-tool which opens a pdf file specified by command line argument in the form of URL or local filepath with pdf.js.

Requirements

  • docker environment (You have to be able to execute docker commands without sudo)
  • Python 3 (>=3.6)
  • browser-launcing command depending on your platform
    • wslview on WSL
    • Environment variable $BROWSER (e.g. $BROWSER=chromium ) on Linux

Installation

  1. $ git clone [email protected]:monado3/pdfjs-broker.git
  2. $ cd pdfjs-broker
  3. $ docker build -t pdfjs_url ./pdfjs_server_url
  4. $ docker build -t pdfjs_file ./pdfjs_server_file
  5. Configure browser launcing
    • Add $BROWSER={your browser you want to use for reading pdf files} to environment variable (on Linux)
    • install wslu for wslview command (on WSL)
  6. $ ln -s {/foo/bar/broker.py} /usr/local/bin/pdfjs

Usage

$ pdfjs [-u <URL of a pdf file> | -f <pdf file path>]

About

CLI-tool which opens a pdf file specified by command line argument in the form of URI with pdf.js.

Resources

Stars

Watchers

Forks

Packages

No packages published