We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Download Document

Thread ID:

Created:

Updated:

Platform:

Replies:

126378 Oct 12,2016 12:51 AM Oct 13,2016 09:20 AM ASP.NET MVC 2
loading
Tags: PdfViewer
jaime
Asked On October 12, 2016 12:51 AM

Hi I'm using your great tools, but I have a problem downloading documents show in pdf viewer, I have to create DocumentDownloadAction? because I receive this error in firebug
{"Message":"No HTTP resource was found that matches the request URI 'http://localhost:64644/api/PdfViewer/DocumentDownloadAction'.","MessageDetail":"No action was found on the controller 'PdfViewer' that matches the name 'DocumentDownloadAction'."
Do you have an example to create this action, I already create the webapi, thanks in advance

Sabari Anand Senthamarai Kannan [Syncfusion]
Replied On October 13, 2016 01:50 AM

Hi Jaime, 
 
Thank you for choosing Syncfusion products. 
 
The DocumentDownloadAction() action method in the WebAPI controller for the PdfViewer control has the following code snippet, 
 
Code Snippet: 
        public object DocumentDownloadAction(Dictionary<string, string> jsonResult) 
        { 
            PdfViewerHelper helper = new PdfViewerHelper(); 
            return new { DocumentStream = Convert.ToBase64String(helper.DocumentStream.ToArray()) }; 
        }  
 
We have created a sample to demonstrate this. You can download the sample from the following link, 
 
 
Please let us know if you need any further assistance. 
 
Regards, 
Sabari Anand

jaime
Replied On October 13, 2016 09:20 AM

Thanks a lot it's works for me

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;