PDF Viewer zoom issue

Hello,

my pdf viewer sometimes just jumps to e.g. 9% zoom, but most of the time to 100%, as desired

do you perhaps know how this can come about? it happens completely randomly

Here is a Video from this issue:

Issue Video

How im calling the Viewer:

<Syncfusion.Blazor.PdfViewerServer.SfPdfViewerServer DocumentPath="@DocumentPath" Height="640px" Width="100%" ZoomMode="ZoomMode.Default" ToolbarSettings="@ToolbarSettings"></Syncfusion.Blazor.PdfViewerServer.SfPdfViewerServer>


Thanks,

Nils


3 Replies

VS Vasugi Sivajothi Syncfusion Team August 11, 2021 12:02 PM UTC

Hi Nils, 
 
Thank you for contacting Syncfusion support. 
 
We suspect that the reported issue occurs if the viewer container not updated properly while opening the PDF Viewer component.  We need to update the viewer while opening the PDF Viewer component or loading the document using the updateViewerContainer() method. Please refer to the below code snippet and sample. 
 
Code Snippet: 
 
<DialogEvents OnOpen="OnOpen"></DialogEvents> 
<SfPdfViewerServer @ref="@viewer" ZoomMode="ZoomMode.Default"><PdfViewerEvents DocumentLoaded="@documentLoad"></PdfViewerEvents></SfPdfViewerServer> 
 
    public void OnOpen(BeforeOpenEventArgs args) 
    { 
        args.MaxHeight = null; 
        viewer.Load(DocumentPath, null); 
        viewer.UpdateViewerContainer(); 
 
    } 
 
    private void documentLoad(LoadEventArgs args) 
    { 
        viewer.UpdateViewerContainer(); 
    } 
 
 
 
 
Kindly try this and let us know if the issue resolves or not. If not, please share the modified sample and more details about the issue. This will be helpful to investigate further and provide the solution at the earliest. 
 
Regards, 
Vasugi. 



NS Nils Steinle October 6, 2021 11:52 AM UTC

Hey Vasugi,

this solution works for me. Thank you very much!

Regards,
Nils



VS Vasugi Sivajothi Syncfusion Team October 7, 2021 01:15 PM UTC

Hi Nils, 
 
Thank you for the update. We are glad to know that the issue was resolved. Please revert to us if you need any further assistance. 
 
Regards, 
Vasugi. 


Loader.
Up arrow icon