Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phoet/saaspose
Ruby bindings to Saaspose REST API
https://github.com/phoet/saaspose
Last synced: 26 days ago
JSON representation
Ruby bindings to Saaspose REST API
- Host: GitHub
- URL: https://github.com/phoet/saaspose
- Owner: phoet
- Created: 2012-04-16T18:10:44.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-05-02T15:23:16.000Z (over 11 years ago)
- Last Synced: 2024-09-15T22:44:40.498Z (about 2 months ago)
- Language: Ruby
- Homepage: http://www.saaspose.com
- Size: 1.91 MB
- Stars: 1
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ruby bindings to Saaspose REST API
This gem provides a access to the [Saaspose REST API](http://saaspose.com/docs/display/rest/Home).
## Installation
gem install saaspose
or using bundler
gem "saaspose"
## Configuration
Saaspose::Configuration.configure do |config|
config.app_sid = ENV["SAASPOSE_APPSID"]
config.app_key = ENV["SAASPOSE_APPKEY"]
end## Usage
Please have a look at the specs to see all the examples!
# generate a png from a page of a remote pdf
Saaspose::Pdf.convert "remote_pdf_file.pdf", "local_png.png", 1
# read the number of pages from a remote pdf
Saaspose::Pdf.page_count "remote_pdf_file.pdf"
# => 1# generate a pdf from a remote ppt
Saaspose::Slides.convert "remote_ppt_file.ppt", "local_pdf.pdf"# generate a pdf from a remote doc
Saaspose::Words.convert "remote_doc_file.doc", "local_pdf.pdf"# generate a pdf from a remote xls
Saaspose::Cells.convert "remote_xls_file.xls", "local_pdf.pdf"# upload a file to the root dir
Saaspose::Storage.upload "example.pdf", ""# get a list of files from the root dir
files = Saaspose::Storage.files ""
files.first
# =>## License
"THE BEER-WARE LICENSE" (Revision 42):
[[email protected]](mailto:[email protected]) wrote this file. As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer in return Peter Schröder