I have used a trick where I put some special sequence of characters in  
the PDF where I want to substitute text. Then I used a program to find  
and replace that text in the document. The downside is if there is  
some position calculation that is done based on the length of the text.

On Oct 16, 2008, at 11:41 PM, John Bresnik wrote:


ah get it -  yea there's a pdf/reader as well but is really for
extracting things if I recall properly, i.e. not for editing / writing
a PDF (I think) - it's actually pretty involved, decoding then
encoding - you could edit the file directly but would have to become
well versed in the encoding / overall structure of PDFs (not a quick
study).. I'd just take the hit and regenerate every time, people are
used to waiting on PDFs (cf. pragmatic / safari)..

On Thu, Oct 16, 2008 at 11:12 PM, Guyren G Howe <[EMAIL PROTECTED]>  
wrote:
>
> On Oct 16, 2008, at 11:06 PM, John Bresnik wrote:
>
>> On Thu, Oct 16, 2008 at 10:41 PM, Guyren G Howe <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> On Oct 16, 2008, at 10:23 PM, Rob Kaufman wrote:
>>>
>>>> The best way to do it uses a technology called FDF.  You basically
>>>> add form fields to the PDF using Acrobat or Illistator and then  
>>>> make
>>>> an FDF or XFDF (its FDF+XML ;-) and merge the two.  The result is
>>>> the form filled in.  As far as I know there isn't a great way to do
>>>> that inside Ruby, but there is an app called pdftk (which doesn't
>>>> actually use TK btw) and I usually shell out to that.
>>>
>>> Actually, I found pdftk just now, and that would let me set one pdf
>>> as
>>> a watermark over another one.
>>>
>>> I think if I use a form, someone can modify the form with Acrobat,
>>> can't they?
>>>
>>> This is intended to be a lightweight deterrent to distribution,  
>>> but I
>>> think that's too lightweight.
>>
>> What abt generating on the fly with pdf writer or RailsPDF ?
>
> No, it's a 150 page book with all kinds of illustrations and whatnot.
>
>>
>




--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to