Module: Asposepdfjava::GetXMPMetadata

Defined in:
lib/asposepdfjava/Document/getxmpmetadata.rb

Instance Method Summary collapse

Instance Method Details

#initializeObject



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/asposepdfjava/Document/getxmpmetadata.rb', line 3

def initialize()
	# The path to the documents directory.
    data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
    
    # Open a pdf document.
    doc = Rjb::import('com.aspose.pdf.Document').new(data_dir + "input1.pdf")

    # Get properties
    puts "xmp:CreateDate: " + doc.().get_Item("xmp:CreateDate").to_s
    puts "xmp:Nickname: " + doc.().get_Item("xmp:Nickname").to_s
    puts "xmp:CustomProperty: " + doc.().get_Item("xmp:CustomProperty").to_s
end