-
Notifications
You must be signed in to change notification settings - Fork 555
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
I can't center the pages of my pdf #874
Comments
|
I have a very similar issue to @juan-andres-valverde-endava. My first and last pages work well. But my middle pages are aligned to the top of the screen, rather than in the centre. This is only on Android, iOS is working perfectly. When i console.log the width and height after onLoadComplete, i am getting the same width and height regardless of what page i am on. Thanks @rajivchaulagain - any other ideas? |
@joffblack I think this package only sees all the pages of pdf as a single height and width so managing the height and width of individual is hard so, could you try using this code
|
Thanks again @rajivchaulagain but this didn't work. |
What
react-native
version are you using?0.75.0
What
react-native-pdf
version are you using?I have tried with the same behaviour in 6.7.5, 6.7.4, 6.6.2
What platform does your issue occur on?
Android
Describe your issue as precisely as possible :
I am having a problem when displaying a pdf within my application, when the pdf has more than 2 pages the intermediate pages, which are neither the first nor the last, are always displayed on the left edge of the container.
JustifyContent center does not solve the problem. I think that it is simply the behavior of the library, when activating the horizontal together with the enablePaging.
It works perfectly on IOS this error only occurs on Android.
Any thoughts, solutions, different approach?
Join a screenshot or video of the problem on the simulator or device?
This is how its supposed to should work, and how it does work in the first and last page
And this is the error and how it does works in the intermediate pages
Show us the code you are using?
The text was updated successfully, but these errors were encountered: