views:

1110

answers:

3

I need to be able to view an embedded pdf in an ASP.Net form as well as print and save the document back to the web server. The pdf document allows filling out of various fields and I also need to have a Print and Save button that's on the form that's not in the pdf default viewer.

So the scenario is the user opens a pdf document in an asp.net webform, fills out the form, and then clicks either the print button or save button. The print button should activate the print in the pdf viewer, however the save button should automatically take the changes submitted in the pdf document and save them to the web server. I can't have the user bringing up a seperate Save As dialog and save it to his computer.

+1  A: 

If i understand correctly, you want to eliminate the "save" function of the pdf viewer and replace it with your own so that the user cannot save locally but the files is sent back to the server....

If so, then you might need to build your own PDF viewer with the options you need; removing the "save" button or making it post the document to the server. And i am not sure how feasible this is as i havent tried it.

You should create a web form that asks user to input the desired data and build the pdf in the server. At that point you can save it server side and then offer the user the ability to print; without using the form viewer. There are plenty of PDF APIs that allow you to do this.

Victor
A: 

You can embed javascript into the form that will post the information back to the server, where you can create the form you need.

Have a look at the book Extending Acrobat Forms with Javascript by John Deubert. It will tell you everything you need.

Khadaji
A: 

If you want to use 'embed' or 'object' to inline your pdf (http://blog.flashcolony.com/?p=244), you can put a button on your fillable pdf and have that button use 'submitForm' with 'cSubmitAs' set to PDF and cURL set to the http you want to post to.

I've found that you can use relative paths to the 'cURL' - can use /someApp/someController/someAction instead of http://www.somecompany.com/someApp/someController/someAction

(more http://www.adobeforums.com/webx/.59b7911e).

Then on the server-side that you post to, use whatever language to pick the application/pdf off of the http request and do what you need to with it.

I don't think there is a way to overload the reader functions (save, print).

Chad