sdk
Ruby SDK
Runtime: Ruby 3.0+
Install
gem install snappdf
Quickstart
require "snappdf"
snap = Snappdf.new(api_key: ENV["SNAPPDF_API_KEY"])
r = snap.pdf.merge(files: [File.binread("a.pdf"), File.binread("b.pdf")])
File.binwrite("out.pdf", r[:pdf])Features
- · Faraday-based transport with multipart + retry
- · Keyword args throughout for readable call sites
- · OpenSSL::HMAC constant-time signature verification
- · Rails-friendly — drop into any controller
Reference
Full API reference lives at /docs. Source + examples on GitHub.