Project

pdftotext

0.02
No commit activity in last 3 years
No release in over 3 years
A Ruby wrapper for the `pdftotext` command line library
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 0.10
~> 10.0
~> 3.4

Runtime

~> 0.3
 Project Readme

Pdftotext

A Ruby wrapper for the pdftotext command line library

Build Status

Installation

  1. You must first install Poppler. On OS X this can be done with brew install poppler if you have Homebrew installed
  2. Add gem "pdftotext" to your project's Gemfile
  3. bundle install

Usage

text = Pdftotext.text('path-to.pdf')
=> "The text of the PDF"

pages = Pdftotext.pages('path-to.pdf')
pages.first.number
=> 1
pages.first.text
=> "The text of the PDF"

Both methods take an optional hash of command line arguments to pass to pdftotext. The only one by default being -layout.