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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to use the EJ1 PDF viewer control in ASP.NET core

Platform: ASP.NET Core |
Control: PdfViewer

At present, EJ1 PDF viewer control is not supported in the ASP.NET Core platform. However, you can use the PDF viewer control of EJ1 platform in the ASP.NET Core platform. The server (web API controller) for loading and processing the PDF document must be defined as a separate Web application. The URL of this application must be referred to the serviceUrl property of the PDF viewer control in the ASP.NET core application.


<div class="control">
    <div id="container" style="width:100%;height:780px;"></div>
<script type="text/javascript">
        $(function () {
              //If the hosted custom service URL is http://localhost:57971/, then serviceURL should be as follows
           $("#container").ejPdfViewer({ serviceUrl: 'http://localhost:57971/api/PdfViewer' });

Refer to the following samples for EJ1 PDF viewer control in the ASP.NET Core application.

Web API controller: http://www.syncfusion.com/downloads/support/directtrac/general/ze/WebAPI_service830758858 

ASP.NET Core:httpwww.syncfusion.com/downloads/support/directtrac/general/ze/PdfViewer_ASP.NET_Core1949388477

You can also refer the online service in the serviceUrl property of the PDF viewer control.  Refer to the following code snippet.


script type="text/javascript">
        $(function () {
            $("#container").ejPdfViewer({     serviceUrl:'http://js.syncfusion.com/ejServices/api/PdfViewer' });


2X faster development

The ultimate ASP.NET Core UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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