Socket
Book a DemoInstallSign in
Socket

pdf-trim_detector

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdf-trim_detector

0.2.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

= 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.

FAQs

Package last updated on 26 May 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.