Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).

New Forum | Previous | Next | (P-PDF) Developers

Topic: IE6,Servlet,FDF kit for Java(??not retrieves in browser)
Conf: (P-PDF) Developers, Msg: 92315
From: sgho
Date: 7/18/2003 02:15 AM

Please share the thoughts if you had luck before in successfully retrieving pdf (with fields populated with retrieved values) using FDF tool kit for Java, Servlet, within a browser(IE 6.0)? I am using Tomcat 4.1.24.

I am having problem in retrieving pdf with populated fields within a browser IE 6.0, SP1 using FDF Tool Kit for Java, Java 1.4, Tomcat 4.1.24 with Adobe 5.0 on Windows 2000 platform.

However, if I open the same pdf file within Adobe Acorobat (full blown software), I can successfully retrieve the pdf file with populated fields.

A button in pdf hits doPost method of Servlet. It works fine if I open the pdf within Adobe and it successfully retrieves pdf file with data.

When I open the same pdf file within a browser (IE), it still hits doPost method of Servlet. I can see debugging statements inside doPost method. It does not throw any exception in Tomcat, or in the browser. However, a new pdf page with the retrieved values for fields is not shown/displayed in the browser. It does NOT open up/retrieve the pdf file with retrieved values. It keeps the same/previous pdf file in the browser.

I am doing a cut-paste of Servlet code. There is a retrieve button on pdf page. Pdf page also has a field called IRB. When retrieve button on pdf is clicked, following doPost method gets triggered.

package com.core;
import javax.servlet.*;
import javax.servlet.http.*;
import com.adobe.fdf.*;

public class Retrieve extends HttpServlet
public void doPost(
HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
FDFDoc outputFDF = null;
outputFDF = new FDFDoc();

//I have tried both the lines individually as shown below.
// I have saved the same file as pdf and fdf. But no luck
// I have fdf version of the pdf file at the same location



// I am trying to populate a field named "IRB" in myfile.pdf
outputFDF.SetValue("IRB", "val_IRB");

//response.setDateHeader("Expires", 0);
//response.setHeader("Cache-Control", "no-store, no-cache");
//response.setHeader("Pragma", "no-cache");


//Disposition", "inline;filename=myfile.fdf");

Disposition", "attachment;filename=myfile.fdf");

OutputStream out = response.getOutputStream();
catch (Exception e)
{ e.printStackTrace(); }
Should I be only using pdf, or fdf version of pdf in the code?

Some other folks have accomplished the same task of retrieval using PHP and FDF tool kit for PHP in IE 6.0. I duplicate the PHP code in Java - still no luck.

Does anyone know about any strange behavior related to IE6.0, Java and FDF tool kit for Java?


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Five visions of a PDF Day

In the world of PDFs or as we like to say Planet (of) PDF, a year isn't a real PDF year without an intense few days of industry knowledge sharing.

May 15, 2018
Platinum Sponsor

Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.


Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.