There are quite a few proprietary and free solutions that can generate PDF
files out there (xml.org, sourceforge.org). The simplest thing you can do is
to prepare a non-compressed PDF file that you open in a text editor and
replace text objects that will be variable with something like @@local$text1
@@local$text2 .... @@local$textN. In your witango code read this modified
PDF (template) from disk or DB (wherever you have saved it) and display it
in one of the result actions following the read action. If you have
variables (text1 - textN) around at that time having values assigned from
the web form post arguments, the template will get "instantiated" with those
values. Create an assignement action right after that where you assign the
PDF instance into a new variable <@ASSIGN local$instance
VALUE="<@RESULTS>">. Then <@PURGERESULTS>, to clear the accumulated results
that are not needed any more. If you need to write the instantiated PDF into
disk in order to email it as an attachment, you can do the population
directly in the file action results pane.

Some problems with this hack:
1) text will be left justified by default (for example, PDF spec does not
understand concept of "centering")
2) new text might overlap other elements on the page
3) the newly-generated PDF will have it's cross-reference table irrepairable
by Acrobat. This issue is related to the fact that every object's position
in the PDF file is recorded in a cross-reference table (usually found at the
end of the file) in form of a byte offset and when you change one text
string, position of that string and all the following ones will be incorrect
in the CR table. This one might be a showstopper, so I would recommend you
to first open a sample PDF file and manually overwrite the text strings that
your program would populate and see whether Acrobat can open thus modified
file.

I hope this helps some.

A.

> -----Original Message-----
> From: Troy Sosamon [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 26, 2002 5:03 PM
> To: Multiple recipients of list witango-talk
> Subject: RE: Witango-Talk: Creating pdf files
> 
> 
> This sounds interesting.  You might need to call Adobe Tech 
> Support, but I 
> found this on their web site.
> 
> http://adobedoc.kanisasolution.com/Acrobat5/c09pf38.htm
> 
> ===== Original Message from [EMAIL PROTECTED] at 
> 9/26/02 6:36 am
> >Hi all,
> >
> >I have been asked to the take input of a long form, insert 
> the values into a
> >pdf template, and send the merged pdf to someone via email.  
> I think I have
> >seen posts here indicating that this is possible.
> >
> >Can anyone tell me the basic steps for creating the merged pdf file?
> >Thanks.
> >
> >John
> >
> >_____________________________________________________________
> ___________
> >TO UNSUBSCRIBE: send a plain text/US ASCII email to 
> [EMAIL PROTECTED]
> >                with unsubscribe witango-talk in the message body
> 
> ______________________________________________________________
> __________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to 
> [EMAIL PROTECTED]
>                 with unsubscribe witango-talk in the message body
> 
________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to