Class: Saaspose::Pdf
- Inherits:
-
Object
- Object
- Saaspose::Pdf
- Defined in:
- lib/saaspose/pdf.rb
Class Method Summary collapse
- .convert(name, file, page_number, options = {:format=>:png, :height=>800, :width=>600}) ⇒ Object
- .page_count(name) ⇒ Object
Class Method Details
.convert(name, file, page_number, options = {:format=>:png, :height=>800, :width=>600}) ⇒ Object
4 5 6 7 |
# File 'lib/saaspose/pdf.rb', line 4 def convert(name, file, page_number, ={:format=>:png, :height=>800, :width=>600}) url = "pdf/#{name}/pages/#{page_number}" Utils.call_and_save(url, , file) end |
.page_count(name) ⇒ Object
9 10 11 12 13 |
# File 'lib/saaspose/pdf.rb', line 9 def page_count(name) url = "pdf/#{name}/pages" result = Utils.call_and_parse(url) result["Pages"]["Links"].size end |