Hi Roshan,
PDF viewer supports loading the PDF document from the custom service URL. To do this, run the Web API service first, then that URL should be provided to the
serviceURL property of the PDF viewer control in Typescript file. Refer to the following code sample.
HTML
<ej-pdfviewer [(serviceUrl)]="service" id="pdfviewer1" style="width:100%;min-height:600px;display:block" >
</ej-pdfviewer>
|
Typescript
import { Component } from '@angular/core';
@Component({
selector: 'ej-app',
templateUrl: './pdfviewer.component.html'
})
export class PdfViewerComponent {
service: string;
constructor() {
this.service = 'http://localhost:57971/api/PdfViewer';
}
} |
Refer to the following samples.
Note:
· The serviceURL should be provided to map the Web API controller class and not to the load method in the controller.
Regards,
Karthik.