Sha256: 4360a3c51f6a6a1db1fcabb4358bd1aff414c7152104c2d593573cc9a0192743
Contents?: true
Size: 442 Bytes
Versions: 17
Compression:
Stored size: 442 Bytes
Contents
#!/usr/bin/env ruby # coding: utf-8 # Extract metadata only require 'rubygems' require 'pdf/reader' class MetaDataReceiver attr_accessor :regular attr_accessor :xml def metadata(data) @regular = data end def metadata_xml(data) @xml = data end end receiver = MetaDataReceiver.new pdf = PDF::Reader.file(ARGV.shift, receiver, :pages => false, :metadata => true) puts receiver.regular.inspect puts receiver.xml.inspect
Version data entries
17 entries across 17 versions & 2 rubygems