Skip to content

Instantly share code, notes, and snippets.

@Isxida
Last active December 15, 2015 18:09
Show Gist options
  • Save Isxida/5301807 to your computer and use it in GitHub Desktop.
Save Isxida/5301807 to your computer and use it in GitHub Desktop.
editado para no subirlo a la nube.
require 'rubygems'
require 'rest_client'
require 'json'
require 'openssl'
require 'base64'
require 'uri'
require 'rexml/document'
require_relative 'lib/Common/product'
require_relative 'lib/Common/saaspose_app'
require_relative 'lib/Common/utils'
require_relative 'lib/Storage/folder'
require_relative 'lib/Words/Convertor'
# URI
Common::Product.setBaseProductUri('http://api.saaspose.com/v1.0')
# Lugar del archivo
filePath = 'C:/Input.docx'
# get file name
fileName = filePath.split('/').last
# create Converter object
doc = Words::Convertor.new(fileName)
# save in the required format
doc.convert("C:/Output.pdf", "pdf")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment