Welcome Guest Search | Active Topics | Sign In | Register

WebBrowser opens saveas dialog box for pdf Options
Rick Morayniss
Posted: Tuesday, April 28, 2015 11:44:25 AM
Rank: Advanced Member
Groups: Member

Joined: 12/30/2013
Posts: 68
In my app, the users can opens files they have uploaded.
1) The adobe plugin is installed
2) If I run the view hyperlink from Chrome, it works correctly(file is saved).
3) When I run it using your dll, the save as dialog box appears. I have received numerous complaints about this.

here is the code that gets the file. This code was also running correctly when using the VS browser control.

NavDocument myDocument = new NavDocument((byte[])myDoc.Rows[0]["Doc"]);
myDocument.SetDocumentType(NavDocument.DocumentType.Attachment, myDoc.Rows[0]["FileName"].ToString(),"", "", "");
myDocument.Decompress();
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + myDoc.Rows[0]["FileName"].ToString() + "\"");
Response.BinaryWrite(myDocument.GetBinaryData());
Response.End();
Rick Morayniss
Posted: Tuesday, April 28, 2015 2:29:28 PM
Rank: Advanced Member
Groups: Member

Joined: 12/30/2013
Posts: 68
I have changed this process to use the BeforeDownload and AfterDownload methods in the webbrowser.
My only issue is how to I open the file in the afterdownload method.
I have the file name from the e.FilePath.ToString(); in beforeDownload
Rick Morayniss
Posted: Tuesday, April 28, 2015 2:36:34 PM
Rank: Advanced Member
Groups: Member

Joined: 12/30/2013
Posts: 68
Disregard this support question please. From Afterdownload I am just doing a regular docuemnt open. I thougt maybe there was something special in the webbrowser for it.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.