Why would you want to do this, as the content would, presuming it is text, would no longer be readable by a pdf reader?
I often use wkhtmltopdf to create invoices etc. from HTML templates. It'd be pretty simple to have it use an image.