No commit activity in last 3 years
No release in over 3 years
Gets the colored pages of a PDF by parsing Ghostscript (>9.05) output
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
 Project Readme

Build Status Coverage Status Code Climate

PdfColoredPages

Ruby Gem to check which pages of a pdf contain color and output those.

Installation

Add this line to your application's Gemfile:

gem 'pdf_colored_pages'

And then execute:

$ bundle

Or install it yourself as:

$ gem install pdf_colored_pages

Usage

As Array:

PdfColoredPages.as_array(/path/to/pdf.pdf)
# returns [1,3,4]

As Range String:

PdfColoredPages.as_range_string(/path/to/pdf.pdf)
# returns: 1,3-4

Shell:

$ pdf_colored_pages ./path/to/pdf.pdf
# outputs 1,3-4

Just Check:

PdfColoredPages.colored_pages?(/path/to/pdf.pdf)
# returns: true or false

Test:

$ rake test

Contributing

  1. Fork it ( https://github.com/RedRoosterMobile/pdf-colored-pages/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request