Hi Esan,
Thank you for using Syncfusion products.
We can use ejPdfViewer control in the Angular4 application. Please find the steps for including ejPdfViewer control in Angular 4 application below.
- We need to initialize the ejPdfViewer control in the HTML template file with the following code snippet.
Code Snippet:
<ej-pdfviewer [(serviceUrl)]="service" id="pdfviewer1" style="width:100%;min-height:600px;display:block"></ej-pdfviewer>
- The properties of the control and other members used in the template file should be defined in the corresponding TypeScript file.
Code Snippet:
export class HomeComponent {
service: string;
constructor() {
this.service = 'http://js.syncfusion.com/demos/ejservices/api/PdfViewer';
}
}
We have created a sample to demonstrate the same. Please find the same from the below link.
The PDF viewer control requires Web API controller to load and process the PDF document. At present, we do not provide support for PDF viewer control in ASP.NET Core platform. So we do not support WEBAPI2.0(Core) controller in .NET Core Framework. However, we have created Web API controller in the web application with .NET Framework. Please find the same from the following link.
Note: The URL of the Web API controller should be set to the serviceUrl property of the ejPdfViewer control for initializing the control.
Please let us know if you need any further assistance.
Regards,
Sabari Anand