Thanks for the reply.
I'm going to try and load the file and see if it looks in the classpath.
if that fails, i'll go with your approach.
BTW, the checkboxes work (something to do with how the AcroForm was
designed was the problem).
Cheers
Rakesh
Hicks, Shaun wrote:
You can definitely create it via a ByteArrayOutputStream. We're doing it
now from Tomcat for many different reports based on itext and JasperReports.
I just use a web.xml parameter to define the "home" for the PDFs and
reference it from the servlet generating the content.
Example:
(Inside the servlet code)
String pdfDir = session.getServletContext().getInitParameter("pdfDir");
(Inside the web.xml)
<servlet-name>pdf_download-key</servlet-name>
<servlet-class>com.example.websites.PdfDownload</servlet-class>
<init-param>
<param-name>pdfDir</param-name>
<param-value>/usr/local/netbeans-5.0/enterprise2/jakarta-tomcat-5.5.9/temp</
param-value>
</init-param>
</servlet>
Should work in a similar fashion for other AppServers.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rakesh
Patel
Sent: Wednesday, May 03, 2006 9:11 AM
To: iText
Subject: [iText-questions] iText and AcroForms
Hi all,
trying to put it all the pieces together and generate pdfs in my web app
but have run into some issues:
1. Inserting text into the pdf works but setting the checkboxes doesn't.
I found a forum entry saying to set the checkbox to "1". Here's what I'm
doing:
form.setField("Frau", "1"); // Frau is a checkbox
any ideas?
2. Instead of creating a FileOutputStream to hold the merged pdf can i
just use a ByteArrayOutputStream?
3. I would like to reference the AcroForm pdf in a generic way and not
hard-code its location on the file system. What are my options? Shall i
put the pdf on the web site and load it using a url? Can i place it in
the classes directory and have it automatically picked up from there?
Thanks
Rakesh
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
-----------------------------------------
The information in this message may be proprietary and/or
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify First Data
immediately by replying to this message and deleting it from your
computer.
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions