|
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
<SfPdfViewerServer @ref="viewer" DocumentPath="@DocumentPath" Height="30%" Width="100%">
</SfPdfViewerServer>
@code{
SfPdfViewerServer viewer;
private string DocumentPath { get; set; } = "wwwroot/Data/PDF_Succinctly.pdf";
private void IncrementCount()
{
viewer.GetMagnification().ZoomTo(200); //It will gets zoomed to the 200 percentage.
// viewer.GetMagnification().ZoomIn(); // The control will gets zoomed in.
// viewer.GetMagnification().ZoomOut();//The control will gets zoomed out.
}
}
Note: you can use any of the method for performing zooming. |
Hi. I also need the function Leonardo wants. Don't you still support that function? :(
|
function SearchTextZoom() {
var viewer = document.getElementById('pdfviewer1').ej2_instances[0];
viewer.textSearchModule.searchText('Resources', false);
viewer.magnificationModule.zoomTo(125);
}
|