Articles in this section
Category / Section

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

1 min read

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.

HMTL

<div class="control">
    <div id="container" style="width:100%;height:780px;"></div>
</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' });
        });
</script>

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.

JavaScript

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

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied