Reputation: 1249
I have created a PDF with Adobes LifeCycle and added some forms and a button to send the formdata to a php-script. On the serverside i grab the postdata and store them into a database. No problem so far, but the Adobe Reader now complains about an error something to do with the content of the text/html type.
Here is the error message in german:
Beim Senden ist ein Fehler aufgetreten. Inhalt des Typs text/html kann nicht verarbeitet werden.
and in english:
An error occurred during the submit process. Cannot process content of type text/html.
Do i have to write some data in the output of the php-script so the reade knows everthing is okay?
Upvotes: 1
Views: 3999
Reputation: 598
return value in the AspnetMvc
String userAgent = Request.Headers["user-agent"];
if (userAgent.ToUpper().StartsWith("ACROFORMS"))
{
Response.ContentType = "application/vnd.fdf";
Response.Write("%FDF-1.2\n" + "1 0 obj<< /FDF << /Status (Form has been submitted!) >> >>endobj\n" +
"trailer\n" +
"<< /Root 1 0 R >>%%\n");
}
Upvotes: 0
Reputation: 3998
Another solution is respond with application/vnd.fdf with a message. The following the java code but it has the sample fdf to send a message back to Acrobat Reader.
String userAgent = request.getHeader("user-agent");
if (userAgent.toUpperCase().startsWith("ACROFORMS")){
response.setContentType "application/vnd.fdf");
out.println("%FDF-1.2\n"+"1 0 obj<< /FDF << /Status (Form has been submitted!) >> >>endobj\n"+
"trailer\n"+
"<< /Root 1 0 R >>%%\n");
}else
....
Upvotes: 4
Reputation: 1249
I've found the solution, i have to set the content-type to application/pdf and read out a thank-you pdf :). Now the Adobe Reader stops complaining and i have a kind of feedback to the user...
Upvotes: 1