Back in February github user augusto came up with a simple way to scale the background image on the PDFs:
It allows us to have a high-resolution background for print materials or a low resolution background for other uses.
We've been successfully using his branch in production for six months, but would love to have this be part of the master, so we can take advantage of the 1.0 release coming up. I'm submitting this pull request because I didn't see any requests from augusto.
Thanks for your consideration.
added ability to scale background image, taken directly from augusto
Here is a code sample from our app:
pdf = Prawn::Document.new(
:background => piece.background_image,
:background_scale => (72.0/piece.dpi),
:left_margin => 0,
:right_margin => 0,
:top_margin => 0,
:bottom_margin => 0,
:page_size => [(piece.width_in_pixels + 2*piece.bleed_in_pixels).to_i,(piece.height_in_pixels + 2*piece.bleed_in_pixels).to_i]
Prawn really needs this!
Prawn got 3 pull requests merged today but 292 ain't one. :-)
Just kidding. Thanks for all your hard work, bradediger.