Hi Tejinder,
Greetings from Syncfusion support.
We can move the scrollbar to the specified location using the
goToBookmark method. Please refer to the below sample and code snippet.
Code Snippet:
|
<button (click)="navigate()">Navigate</button>
<div class="control-section">
<div class="content-wrapper">
<ejs-pdfviewer
id="pdfViewer"
[serviceUrl]="service"
[documentPath]="document"
(documentLoad)="documentLoaded($event)"
style="height:640px;display:block"
></ejs-pdfviewer>
</div>
</div>
public documentLoaded(e: LoadEventArgs): void {
this.pageSize = <any>JSON.parse(e.pageData).pageSizes;
}
public navigate() {
var pdfviewer = (<any>document.getElementById('pdfViewer'))
.ej2_instances[0];
var pageNumber = 3;
var pageIndex = pageNumber - 1;
var X = this.pageSize[pageIndex].split(' ')[1];
var Y = 20;
pdfviewer.bookmarkViewModule.goToBookmark(pageIndex, X - Y);
}
|
Kindly try this and revert to us with more details if you have any concerns about this.
Regards,
Shamini