No commit activity in last 3 years
No release in over 3 years
Attempt to detect the region of a PDF page indicated by trim marks
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
~> 2.3

Runtime

>= 1.1.0
 Project Readme

= PDF::TrimDetector

Attempts to detect the trim marks on a PDF page and returns a rectangle describing the box they indicate. Useful for when you have a PDF with trim marks drawn on the page but no matching page box (TrimBox, ArtBox, etc)

== Installation

gem install pdf-trim_detector

== Usage

require 'pdf-reader'
require 'pdf/trim_detector'

detector = PDF::TrimDetector.new

PDF::Reader.open("somefile.pdf") do |pdf|
  pdf.pages.each do |page|
    page.walk(detector)
    puts detector.trim.inspect
  end
end

== Licensing

This library is distributed under the terms of the MIT License. See the included file for more detail.