No commit activity in last 3 years
No release in over 3 years
Ruby Wrapper for CloudConvert Combine files to PDF API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 4.7.3

Runtime

>= 0
 Project Readme

CloudConvertMergePDF

CloudConvertMergePDF is a ruby wrapper for the Cloud Convert combine files to pdf API. The CloudConvert combine to pdf API merge files of any supported file type to a single PDF file.

Installation

Add this line to your application's Gemfile:

gem 'cloud_convert_merge_pdf'

And then execute:

$ bundle

Basic Usage

Add the following to an initializer file.

CloudConvertMergePdf.configure do |config|
  config.api_key  = "YOUR CLOUD CONVERT API KEY"
end

If you need a file object for the combined pdf:

CloudConvertMergePdf::Merge.new(files).call

If you need the url for the combined pdf:

CloudConvertMergePdf::Merge.new(files, false).call

Basic Example

files = ['http://www.example.com/1.pdf', 'http://www.example.com/2.pdf']
merge_obj = CloudConvertMergePdf::Merge.new(files)
out_file = @client.call # This will return a Tempfile object for the combined pdf
out_file.unlink # Its a good apporach to unlink the tempfile than leaving it for the garbage collector

Contributing

Please feel free to contribute to the repository.

License

The gem is available as open source under the terms of the MIT License.