Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the Initial Zoom bug in IOS #192

Merged
merged 1 commit into from Aug 3, 2022
Merged

Conversation

moazelsawaf
Copy link
Contributor

Hello ❤

There are three open issues reporting a bug causing an initial zoom at the PDF document in IOS, here is the link of the issues 😢:

#117, #150, and #166

I was also facing the same bug but I wanted to give my self a try to solve it and thanks god! I did it after hours of trial 💪🏻

This answer in Stack Overflow actually helped me a lot, so big thanks goes to @Nicholas Farmer

Kindly review the solution, I hope you like it.

Thanks ❤
Moaz El-sawaf

@endigo endigo merged commit e28fd42 into endigo:master Aug 3, 2022
@endigo
Copy link
Owner

endigo commented Aug 3, 2022

Awesome thanks

@moazelsawaf
Copy link
Contributor Author

Note: For anyone still facing the issue, make sure that you have set the value of autoSpacing to true to let the PDF auto scale it self to the size of the screen.

@flokleber
Copy link

Anyone also still facing this problem?

                filePath: widget.path,
                enableSwipe: true,
                swipeHorizontal: true,
                autoSpacing: true,
                pageFling: true,
                
                pageSnap: true,
                defaultPage: currentPage!,
                fitPolicy: FitPolicy.BOTH,

tried also diffrent parent Elements and diffrent combination of parameters like pageFling, fitEachPage,..
The PDF Viewer is a child of a ClipRRect widget.

Thnaks for any help i get!

@moazelsawaf
Copy link
Contributor Author

moazelsawaf commented Aug 30, 2022

@codingwald

Make sure you have read the comments in this Pull Request, you might be missing something

@flokleber
Copy link

@moazelsawaf

Setting pageFling to false results in a slightly enlarged pdf.
But it doesn't fit properly in the container. The pageFling setting also messes up the scrolling.

Still don't see the mistake i made.

@moazelsawaf
Copy link
Contributor Author

@codingwald

Please can you attach a minimal code to reproduce the issue?

@flokleber
Copy link

This is the minimal version of the widget. Showing the PDF and everything else is working on android and ios. But on ios it still doesnt fit in. If i activate pageFling it zooms in.

pdf_viewer.dart.zip

@neeluagrawal04
Copy link

It is still not working on ipad in landscape mode, the full pdf is opened in zoom out mode.
I did tried all alternative solution which is mentioned via enabling/ disabling flag variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants