Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143346 | Mar 15,2019 06:53 AM UTC | Mar 15,2019 12:22 PM UTC | Angular - EJ 2 | 1 |
![]() |
Tags: PDF Viewer |
HTML:
<div class="content-wrapper">
<ejs-pdfviewer id="pdfViewer" [serviceUrl]='service' [documentPath]='document' [toolbarSettings]= 'toolbarSettings' style="height:850px;display:block"></ejs-pdfviewer>
</div>
TS
export class AppComponent implements OnInit {
public service = 'https://ej2services.syncfusion.com/production/web-services/api/pdfviewer';
public document = 'PDF_Succinctly.pdf';
public toolbarSettings = { toolbarItem: 'OpenOption,PageNavigationTool, MagnificationTool, PanTool, SelectionTool, SearchOption'};
ngOnInit(): void {
}
} |
window.onload = function () {
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
pdfViewer.toolbar.showToolbarItem(new Array("OpenOption"), false);
} |
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.
This page will automatically be redirected to the sign-in page in 10 seconds.