Sha256: e1b0fc7608fed603eb94b84e960512d5e2864e43aaa3d310c717d2ac1c8ff50e

Contents?: true

Size: 406 Bytes

Versions: 12

Compression:

Stored size: 406 Bytes

Contents

#!/usr/bin/env ruby
# coding: utf-8

# Determine the PDF version of a file

require 'rubygems'
require 'pdf/reader'

class VersionReceiver
  attr_accessor :version

  def initialize
    @version = nil
  end

  # Called when document parsing starts
  def pdf_version(arg = nil)
    @version = arg
  end

end

receiver = VersionReceiver.new
pdf = PDF::Reader.file(ARGV.shift, receiver)
puts receiver.version

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
pdf-reader-0.10.1 examples/version.rb
fireinc-pdf-reader-0.11.0 examples/version.rb
fireinc-pdf-reader-0.11.0.alpha examples/version.rb
pdf-reader-0.11.0.alpha examples/version.rb
pdf-reader-0.10.0 examples/version.rb
pdf-reader-0.9.3 examples/version.rb
pdf-reader-0.9.2 examples/version.rb
pdf-reader-0.9.1 examples/version.rb
pdf-reader-0.9.0 examples/version.rb
pdf-reader-0.8.6 examples/version.rb
pdf-reader-0.8.5 examples/version.rb
pdf-reader-0.8.4 examples/version.rb