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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

PDF Viewer is not working

Thread ID:





142077 Jan 17,2019 01:19 PM UTC Jan 18,2019 02:27 PM UTC ASP.NET MVC - EJ 2 1
Tags: PDF Viewer
Maico Schmitz
Asked On January 17, 2019 01:19 PM UTC


PDF Viewer is not correctly working. It result on a modal with error message. What's wrong?

Karthik Krishnaraj [Syncfusion]
Replied On January 18, 2019 02:27 PM UTC

Hi Maico, 
Greetings from Syncfusion, 
We have analyzed the provided query “PDF Viewer is not correctly working” and we suspect that the issue is due to incorrect mapping of Serviceurl in your project. We need to add the controller name at the end of the localhost for accessing the data from the client to the server. Please find the below example. 
WebAPI Controller: 
@Html.EJS().PdfViewer("pdfviewer").ServiceUrl(“http://localhost /api/PdfViewer/”)  
In “api/pdfViewer” where pdfviewer refers to the name of the webAPIController (api/webAPIControllername) 
MVC Controller: 
@Html.EJS().PdfViewer("pdfviewer").ServiceUrl(“http://localhost /PdfViewer/”)  
In “/pdfViewer” where pdfviewer refers to the name of the MVCController (MVCcontrollername) 
//where localhost=http://192.168.0162:81 according to the provided snippet 
Note: Please use the webAPIControllername/ MVCcontrollername name as per you have provided in your hosted webservice. 
We have created the simple MVC sample, please download the sample from the below link. 
In the provided sample we have  both MVC controller and webAPI PDF Viewer controller for accessing the data form the client to the server, so you can refer any one of them in the serviceurl ,Kindly refer the below code snippet. 
WebAPI Controller: 
MVC Controller: 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon