Sha256: 887280c978b2b86141029b1dcba1be8b342961a898d9afb022017b157a281093

Contents?: true

Size: 650 Bytes

Versions: 2

Compression:

Stored size: 650 Bytes

Contents

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

        # Instantiate ExcelSave Option object
        excelsave = Rjb::import('com.aspose.pdf.ExcelSaveOptions').new

        # Save the output to XLS format
        pdf.save(data_dir + "Converted_Excel.xls", excelsave)

        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/pdftoexcel.rb
asposepdfjava-0.0.1 lib/asposepdfjava/Converter/pdftoexcel.rb