Sha256: 000d8c9f67bf2a75e5e68ccd07c046867e9366cca2abcf8e2c22cd7faa6b6f65
Contents?: true
Size: 664 Bytes
Versions: 2
Compression:
Stored size: 664 Bytes
Contents
module Asposepdfjava module HelloWorld def initialize() data_dir = File.dirname(File.dirname(File.dirname(__FILE__))) + '/data/' # Create PDF document pdf = Rjb::import('aspose.pdf.Pdf').new # Add a section into the PDF document section = pdf.getSections().add() # Add a text paragraph into the section section.getParagraphs().add(Rjb::import('aspose.pdf.Text').new("Hello World")) # Save the document pdf.save(data_dir + "HelloWorld.pdf") puts "Document has been saved, please check the output file." end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
asposepdfjava-0.0.2 | lib/asposepdfjava/helloworld.rb |
asposepdfjava-0.0.1 | lib/asposepdfjava/helloworld.rb |