Sha256: ae9a1c1aa15971e88500d25ed8dd3d3864b125efa8dc50ffae871e4c4602d303
Contents?: true
Size: 611 Bytes
Versions: 2
Compression:
Stored size: 611 Bytes
Contents
module Asposepdfjava module HtmlToPdf def initialize() # The path to the documents directory. data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/' htmloptions = Rjb::import('com.aspose.pdf.HtmlLoadOptions').new(data_dir) # Load HTML file pdf = Rjb::import('com.aspose.pdf.Document').new(data_dir + "index.html", htmloptions) # Save the concatenated output file (the target document) pdf.save(data_dir+ "html.pdf") puts "Document has been converted successfully" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
asposepdfjava-0.0.2 | lib/asposepdfjava/Converter/htmltopdf.rb |
asposepdfjava-0.0.1 | lib/asposepdfjava/Converter/htmltopdf.rb |