Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FDF / PDF merge error

42 views
Skip to first unread message

Tracey Gates

unread,
Jul 23, 2003, 11:31:56 AM7/23/03
to
I'm working with Adobe Acrobat 5.0 and Java. I am wanting to create a PDF file that is displayed to the user so that they can print it.

I have a servlet that creates a FDFDoc, Sets the PDF document, populates the fields from a database, and saves to a file. When I run the servlet, it creates the fdf file and launches Acrobat and then I get the following error:

"There was an error opening this document. A file read error has occurred"

When I open the fdf file, it launches Arcobat and I can view the document just fine.

What is causing this problem?

Also, I would like the PDF that is displayed to the user be a PDF document or something else that is not a form where they can change the values. How do I do that?

Here is snippet of servlet code:

FDFDoc outputFDF = null;
outputFDF = new FDFDoc();
//set output values
outputFDF.SetValue(...);
:
:
outputFDF.SetFile( "C:/BSUploadFiles/DeltaEnrollment.pdf" );
response.setContentType("application/vnd.fdf");
OutputStream out = response.getOutputStream();
outputFDF.Save("c:/temp/Smith.fdf");
out.close();

guozhang yu

unread,
Jul 30, 2003, 2:05:33 PM7/30/03
to
I get the "There was an error opening this document. A file read error has occurred" error too sometimes but it goest away after I reboot the computer or stop and start the web server. But I am still interested in knowing what causes the problem.

I have a related problem regarding the pdf and fdf merge.

I am using C# (used ASP before) to talk to the SDK and our database to create the fdf. Eveything works fine on my computer ( served as both client and web server) but it is extremely slow to run it from another computer. I don't know which process slows things down. The merge process?

Anyone had this problem before? Any ideas/suggestions are preatly appreciated.

John Yu

richruiz

unread,
Aug 4, 2003, 12:04:59 PM8/4/03
to
I two am finding this same type of problem. Systems with the same OS, browesr, and Reader version behave differently.

I went so far as to create the following to return info about the users system.

<http://66.166.124.171/Versata/FAQ_Factory/FormFlowClient/images/Report.htm>

System that return the identical info will behave differently when passed FDF data.

Here is my code...

// file path to fdf
FDFDoc outputFDF = new FDFDoc(file);
File tempfile = new File(file);
resp.setContentType("application/vnd.fdf");
ServletOutputStream out = resp.getOutputStream();
outputFDF.Save(out);
out.close();
boolean deleted = tempfile.delete();

Johan Johansson

unread,
Aug 10, 2003, 1:43:50 PM8/10/03
to
I want to attach ONE file and send it as an email. My program has a pdf-file and its form is filed out by my program. But I don't want to end up with to files ?
I want to merge the .pdf and .fdf to one .pdf file ?

FdfAcX_Doc.FDFSetFile(OrderSheetFileName);

FdfAcX_Doc.FDFSaveToFile(OrderSheetFileName+".fdf");

How can this be done ?

/Johan

Aandi Inston

unread,
Aug 10, 2003, 10:23:52 PM8/10/03
to
The FDF toolkit works only with FDF. Do you want to merge the files
server-side, or on an end-user's workstation where Acrobat is
installed?

Aandi Inston

0 new messages