Hello.
Is it possible to enable a scroll feature by swiping the screen with a finger on a PDF file on mobile devices in the Blazor PDF Viewer?
Hi
Regarding the scrolling issue on mobile devices that you mentioned, we were unable to reproduce the problem. To help us investigate further, please provide additional information, such as screenshots, videos, or a modified version of the sample that replicates the issue. This will enable us to offer more targeted assistance.
Sample Link - Sample Link
Regards,
Priyadharshini
Hello Priyadharshini.
When running the sample, open the DevTools, then toggle the Device Toolbar and try to scrolling either using the scroll bar and the swiping movement. I wasn't able to do it.
Is there some way to activate this functionality?
Hi GuiGulmini,
Thank you for the
update. However, we were able to scroll the page without any issues, and it
worked correctly in our sample. We have included a demo below showcasing our
testing. Please provide a demo of the issue you are encountering, as it will
help us reproduce the problem and provide an appropriate solution.
Demo
on testing
Regards,
Sathiyaseelan K
Hello Sathiyaseelan.
I found the issue: I was debugging the web application incorrectly. I was loading the page with the Device Toolbar turned off and only enabling it after the page had loaded. I believe this caused the PDF Viewer to be rendered in desktop mode instead of mobile. When I loaded the page with the Device Toolbar already activated, the mobile mode was loaded from the start, and swiping worked.
Another question: In your example, were you able to perform the pinch-to-zoom gesture? Here, I couldn't do it.
Hi GuiGulmini,
Thank you for the
update. We tested the pinch zooming feature, and it is functioning correctly
without any issues on our end. Below, we have shared a demo of our testing.
Kindly provide a demo or a sample similar to the one we have provided so that
we can replicate the issue and offer further assistance.
Pinch
zooming demo
Regards,
Sathiyaseelan K
Hello Sathiyaseelan.
I am sending a recording where I try to zoom using Shift+mouse, but I can't. I will also include the Razor code I used.
However, just knowing that it is possible to enable this functionality and that I am probably testing it incorrectly, I already appreciate the help!
@page "/"
@using Syncfusion.Blazor;
@using Syncfusion.Blazor.Popups
@using Syncfusion.Blazor.SfPdfViewer;
@using Syncfusion.Blazor.Buttons
<SfButton @onclick="@OpenDialog">Open Modal Dialog</SfButton>
<SfDialog Width="85%" Height="calc(100% - 100px)" IsModal="true" @bind-Visible="@IsVisible">
<DialogEvents OnOverlayModalClick="@OnOverlayclick"></DialogEvents>
<DialogTemplates>
<Content>
<SfPdfViewer2 DocumentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
EnablePinchZoom="true"
Height="100%"
Width="100%">
</SfPdfViewer2>
</Content>
</DialogTemplates>
</SfDialog>
@code {
private bool IsVisible { get; set; } = false;
private void OpenDialog()
{
this.IsVisible = true;
}
private void OnOverlayclick(OverlayModalClickEventArgs arg)
{
this.IsVisible = false;
}
}
Hi GuiGulmini,
Thank
you for sharing the sample and demo. Please use the Ctrl key along with the
mouse scroll option for zooming in and out, instead of the Shift key. If you
continue to face any issues, feel free to reach out to us.
Regards,
Sathiyaseelan K