Skip to content

ADO/pdftotext

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Ruby wrapper for the `pdftotext` command line library

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Ruby 97.8%
  • Shell 2.2%