Hello,
I'm trying to programmatically set the zoom of the PDF-viewer. Adapting your example on the demo page I have:
<ejs-pdfviewer #viewerObj id="pdfViewer" [serviceUrl]='service' [documentPath]='document'
style="height:80vh; display:block" (downloadStart)="onInitialise()">
</ejs-pdfviewer>
@ViewChild('viewerObj')
public viewerObj: PdfViewerComponent;
public service = 'https://ej2services.syncfusion.com/production/web-services/api/pdfviewer';
public document = 'PDF_Succinctly.pdf';
constructor() {
}
ngOnInit(): void {
}
onInitialise(event) {
this.viewerObj.zoomMode = 'FitToPage';
}
However even when the FitToPage is set - nothing changes. If I refresh() the whole thing refreshes (as I would expect). Is there some other steps that are required to get this functionality working?
Thanks,
Sean