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. Image for the cookie policy date
close icon

Download Document

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

2 Replies

SA Sabari Anand Senthamarai Kannan Syncfusion Team October 13, 2016 05:50 AM UTC

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. 
Sabari Anand

JA jaime October 13, 2016 01:20 PM UTC

Thanks a lot it's works for me

Live Chat Icon For mobile
Up arrow icon