braindice
braindice

Reputation: 988

PDF form submitted to ASP.NET page creates a return HTML file

I have a PDF form that has a 'Submit' button that submits its information to a ASP.NET page. The information is taken and processed into a PDF on the server for storage and later use.

This process works fine, however after the form is done submitting the Adobe viewer receives back a html 'fragment' i guess. I need to know how to format that, stop it, or otherwise handle it. I suspect the fragment is a success message but the Adobe reader doesn't seem to handle it

The HTML is

<!-- saved from url=(0014)about:internet -->

Upvotes: 1

Views: 784

Answers (1)

Doozer Blake
Doozer Blake

Reputation: 7797

I don't have a definitive answer on how to get Acrobat to display your HTML, or if it even can, but my guess is that it won't display HTML back. I do remember having issues with this years ago, and when I had an HTTP Handler to take the form data and process it, but my final step was to redirect them code to different PDFs based on their status.

I put together different response PDF for a few different scenarios as I wasn't showing them back the document that was actually created and when the processing was done just did a context.Response.Redirect( "STATUS.pdf", false ); which Acrobat handled fine.

You could alternately try changing to ContentType to text/plain and seeing if Acrobat will display any output that way.

context.Response.ContentType = "text/plain";
context.Response.Write("Message here.");

Upvotes: 1

Related Questions