prawn-pdfimage
Adds support for a prawn to use a PDF that contains an image as an image.
Usage
Gemfile
gem 'prawn-pdfimage'
Your code
require 'prawn'
require 'prawn-pdfimage'
Prawn::Document.generate('output.pdf') do |pdf|
pdf.image 'image.pdf'
end
Limitations
The current code will add the first xobject on the first page as the image to the Prawn document. For the common case (someone exporting an image as a PDF) this works just fine. If you need more control over which object is inserted into your Prawn document, PRs are welcome.
Found a bug?
Open a github issue
Contributing & Development
- Fork the project.
- Make your feature addition or bug fix. All specs should pass.
- Add specs for your changes.
- Commit
- Send a pull request. Bonus points for topic branches.
Licence
prawn-pdfimage is released under the MIT Licence
Authors
prawn-pdfimage is written and maintained by Evan Sharp.