views:

228

answers:

2

I want to use PDF::writer to put some dates on a calendar sheet. The calendar sheet itself is prepared as a prerendered template in PDF format. How could I read this PDF as template to write text on it?

Is there an alternative? Fiddling with an HTML-to-PDF converter (like HTMLDoc) is no option.

A: 

Maybe pdf-toolkit could help you

Edit: I remembered I played around with this a few years back and like it a lot.

marcgg
Apperently pdf-toolkit is for metadata only - so of no use for me. I want to add content.
hurikhan77
I found rfpdf which seems to be a port of FPDF for php and always worked flawlessly for us. Hopefull the ruby version does the same. I'll probably stick to that.
hurikhan77
A: 

If at all possible, try to get to the original text (i.e. calendar sheet) BEFORE it is transformed to PDF! It is not easy and sometimes not possible to reconstruct text (and your calendar's look and layout) from PDF.

Carl Smotricz
This would be a problem as the calendar sheet consists of graphics. We only want to position and write some additional text elements. We do not want to exchange or replace content. Only add content.
hurikhan77
We now moved to prawn/prawnto at this seems an actively developed solution. While it cannot import existing pdfs its metalanguage seems to be good enough to reimplement the template in pure ruby. Until then we import the template as plain jpg background into prawn. Not very efficient but works for the moment.
hurikhan77