-
Notifications
You must be signed in to change notification settings - Fork 684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for embedded PDFs (e.g., for vectorial images) #1020
Comments
@gioele you can still use PDF-Templates via |
There's a prawn-svg gem for embedding vector graphics. |
I'm calling out of scope for this request. There are prawn-eps and prawn-svg extensions maintained by wonderful people in the community. Those can be used to draw vector images in your documents. |
It would be nice if Prawn could embed existing PDFs files into the PDF being generated. In my particular case, this would be useful to embed drawings, logos and other kinds of vectorial images inside Prawn-generated PDFs.
Right now Prawn's
#image
does not support any kind of vectorial images, only two raster formats: JPEGs and PNGs. In LaTeX-land the common formats used for vectorial images are EPS and PDF (they are natively supported byincludegraphics
insidepdftex
). SVGs are also very common in other settings (web pages, for instance).It seems to me that supporting PDF would be easiest way to support vectorial images in prawn. Supporting EPS and SVG would require writing decoders or transcoders for these formats.
IIUC, Prawn used to support templates that could be used to embed PDFs, as suggested by @practicingruby in issue #91. This does not seem to be the case anymore.
Proof-of-concept code by @yob against an old (2012) version of Prawn can be found at https://github.com/yob/prawn/commits/pdf_images.
The text was updated successfully, but these errors were encountered: