views:

155

answers:

2

Is there a way to watermark an existing pdf in ruby ?

I want to add a dynamically generated text,

Thanks,

A: 

Use Ruport.

1st result for Googling ruby pdf watermark.

mcandre
Duh... just shows the limits of Google. I'm looking for the same thing, and Ruport is not it.
John
`+ruby +pdf +watermark -ruport` :-)
Steve Weet
A: 

Check out Prawn(http://github.com/sandal/prawn) for just ruby and Prawnto(http://github.com/thorny-sun/prawnto) for Ruby on Rails.

You are probably going to want to either use the image embedding functionality or the background image functionality.

Here's an example of using a background image http://cracklabs.com/prawnto/code/prawn_demos/source/general/background

Nick Hammond
Prawn is only able to embed images to a fresh pdf created with prawn not an existing one ... so it doesn't work for me.
Mike
ah, missed the *existing* part in your post. Sorry about that. I don't believe there is, unless you were to convert it to an image and then watermark it.
Nick Hammond