Based on Mozilla's pdf.js.
Requires node, npm, libcairo-dev, libpango-dev, libjpeg-dev, libgif-dev
After installing system deps (e.g., from ubuntu, apt-get install libcairo-dev, etc.), run "npm install" from project root directory.
Following worked as of 2015-07-29, but YMMV. Based on Homebrew:
- install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
- download Xcode (most recent was 6.4) from here
- // start it (asked for my password then installed components)
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
- install dependencies
brew install node
brew install npm
brew install cairo
brew install --without-x11 pango
brew install libjpeg
brew install giflib
- finally, install npm
cd <repos>/iesl-pdf-to-text/
npm install
bin/run.js -i /path/to/input.pdf -o /path/to/output.svg
Run with -f to keep all font information
bin/run.js -f -i /path/to/input.pdf -o /path/to/output.svg