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();
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
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();
FdfAcX_Doc.FDFSetFile(OrderSheetFileName);
FdfAcX_Doc.FDFSaveToFile(OrderSheetFileName+".fdf");
How can this be done ?
/Johan
Aandi Inston