Sha256: b167d97015dc814ae3ed2b0deb2ebf46c5fb59afb331e68de64259219f3b4eb4
Contents?: true
Size: 979 Bytes
Versions: 2
Compression:
Stored size: 979 Bytes
Contents
module Asposepdfjava module SetPdfFileInfo 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 document information doc_info = doc.getInfo() doc_info.setAuthor("Aspose.Pdf for java") doc_info.setCreationDate(Rjb::import('java.util.Date').new) doc_info.setKeywords("Aspose.Pdf, DOM, API") doc_info.setModDate(Rjb::import('java.util.Date').new) doc_info.setSubject("PDF Information") doc_info.setTitle("Setting PDF Document Information") # save update document with new information doc.save(data_dir + "Updated_Information.pdf") puts "Update document information, please check output file." end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
asposepdfjava-0.0.2 | lib/asposepdfjava/Document/setpdffileinfo.rb |
asposepdfjava-0.0.1 | lib/asposepdfjava/Document/setpdffileinfo.rb |