You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Wall <d....@computer.org> on 2004/11/23 17:29:44 UTC

OFF TOPIC: Merging data into a PDF form

I have an existing PDF form (actually lots of them) and my webapp is
querying a user for the "missing data" on the HTML form.  I'd like to merge
the POST data into the PDF document and end up with a new filled out PDF
document.  Has anybody done this or can point to tools that will help?

Thanks,
David


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: OFF TOPIC: Merging data into a PDF form

Posted by Richard <ri...@gmail.com>.
Sorry.What I meant was Its suppose to be comptible with Struts
             They say its working okay
> with cocoon.


On Wed, 24 Nov 2004 16:59:49 +0800, Richard <ri...@gmail.com> wrote:
> Hi David,
> 
> Im not sure if this is a good option. A framework I have used before
> can serialized all html data into pdf files. They say its working okay
> with cocoon. Its up to you if you want to check it out.
> 
> Apache Cocoon. http://cocoon.apache.org/2.0/
> 
> Richard
> 
> 
> 
> 
> On Tue, 23 Nov 2004 08:29:44 -0800, David Wall <d....@computer.org> wrote:
> > I have an existing PDF form (actually lots of them) and my webapp is
> > querying a user for the "missing data" on the HTML form.  I'd like to merge
> > the POST data into the PDF document and end up with a new filled out PDF
> > document.  Has anybody done this or can point to tools that will help?
> >
> > Thanks,
> > David
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: OFF TOPIC: Merging data into a PDF form

Posted by Richard <ri...@gmail.com>.
Hi David,

Im not sure if this is a good option. A framework I have used before
can serialized all html data into pdf files. They say its working okay
with cocoon. Its up to you if you want to check it out.

Apache Cocoon. http://cocoon.apache.org/2.0/

Richard



On Tue, 23 Nov 2004 08:29:44 -0800, David Wall <d....@computer.org> wrote:
> I have an existing PDF form (actually lots of them) and my webapp is
> querying a user for the "missing data" on the HTML form.  I'd like to merge
> the POST data into the PDF document and end up with a new filled out PDF
> document.  Has anybody done this or can point to tools that will help?
> 
> Thanks,
> David
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: OFF TOPIC: Merging data into a PDF form

Posted by er...@swapsimple.com.
> On Tuesday 23 November 2004 18:29, David Wall wrote:
> > I have an existing PDF form (actually lots of them) and my webapp is
> > querying a user for the "missing data" on the HTML form.  I'd like to merge
> > the POST data into the PDF document and end up with a new filled out PDF
> > document.  Has anybody done this or can point to tools that will help?

	I don't know about doing this in java, but if you can use then there
are some libraries available for doing stuff like this.
Take a look at PDF::Reuse.

eric

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: OFF TOPIC: Merging data into a PDF form

Posted by Quinton Delpeche <qu...@vippayroll.co.za>.
On Tuesday 23 November 2004 18:29, David Wall wrote:
> I have an existing PDF form (actually lots of them) and my webapp is
> querying a user for the "missing data" on the HTML form.  I'd like to merge
> the POST data into the PDF document and end up with a new filled out PDF
> document.  Has anybody done this or can point to tools that will help?

Hi,

I don't know about merging, but my application generates and HTML file and 
uses a linux utility (html2ps) to convert this to Postscript.

Then depending on wether the user selects and e-mail address or fax number 
will convert the PS toPDF file using another linux utility (ps2pdf) and 
e-mail it to the user or send the PS file directly to our fax server.

Basically I create a mini-shell script on the server at run-time that looks 
like this:
FileOutputStream fisScript = new FileOutputStream(filScript, false);
PrintWriter pwrScript = new PrintWriter(fisScript);
pwrScript.write("#!/bin/bash\n");
pwrScript.write("/usr/bin/html2ps -U -O -o " + strPSFileName + " " + 
strHTMLFileName + "\n");
pwrScript.write("/usr/bin/ps2pdf " + strPSFileName + " " + strTempPDFFileName 
+ "\n");
pwrScript.write("/bin/mv " + strTempPDFFileName + " " + strPDFFileName + "");
pwrScript.close();

I then create a command string variable:
String strCommand = "/bin/bash /data/intsys/training/invoice/" + strLedgerID + 
".sh";

I then execute the script using this:
Process ls_procPS = Runtime.getRuntime().exec(strCommand);

Works like a charm. :)

Just make sure that the user that tomcat runs as (wwwrun pre 5) or (tomcat 
post 5) has read and write access to the relevant directories.

I use a similar principal when the user wants to view the file instead, all 
that I do is generate the PDF and then redirect the browser to the location 
of the PDF.

> Thanks,
> David
Q
-- 
Quinton Delpeche
Internal Systems Developer
Softline VIP

Telephone: +27 12 420 7000
Direct:    +27 12 420 7007
Facsimile: +27 12 420 7344

http://www.vippayroll.co.za/

The Roman Rule
	The one who says it cannot be done should never interrupt the
	one who is doing it.

Re: OFF TOPIC: Merging data into a PDF form

Posted by Parsons Technical Services <pa...@earthlink.net>.
http://www.lowagie.com/iText/faq.html#template

Doug,
www.parsonstechnical.com


----- Original Message ----- 
From: "David Wall" <d....@computer.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, November 23, 2004 11:29 AM
Subject: OFF TOPIC: Merging data into a PDF form


>I have an existing PDF form (actually lots of them) and my webapp is
> querying a user for the "missing data" on the HTML form.  I'd like to 
> merge
> the POST data into the PDF document and end up with a new filled out PDF
> document.  Has anybody done this or can point to tools that will help?
>
> Thanks,
> David
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org