class Jpdfunite::PdfFile

Attributes

pages[R]
path[R]

Public Class Methods

new(path, title = File.basename(path, ".pdf")) click to toggle source
Calls superclass method Jpdfunite::Outline::new
# File lib/jpdfunite.rb, line 89
def initialize(path, title = File.basename(path, ".pdf"))
  @path = path.shellescape
  super(title)
  get_pages
end

Private Instance Methods

get_pages() click to toggle source
# File lib/jpdfunite.rb, line 97
def get_pages
  @pages = %x[pdfinfo #{@path}][/^Pages: +(\d+)/, 1].to_i
end