Adds support for a prawn to use a PDF that contains an image as an image.
Gemfile
gem 'prawn-pdfimage'
Your code
require 'prawn'
require 'prawn-pdfimage'
Prawn::Document.generate('output.pdf') do |pdf|
pdf.image 'image.pdf'
end
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.
Open a github issue
- 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.
prawn-pdfimage is released under the MIT Licence
prawn-pdfimage is written and maintained by Evan Sharp.