wonday / react-native-pdf

A <Pdf /> component for react-native
MIT License
1.6k stars 557 forks source link

How do you prevent it from zooming in on initial load? #889

Closed trajano closed 1 day ago

trajano commented 1 day ago

What react-native version are you using?

"react": "18.2.0",
"react-native": "0.74.5"

What react-native-pdf version are you using?

"react-native-pdf": "^6.7.5",

What platform does your issue occur on? (android/ios/both)

Describe your issue as precisely as possible :

https://github.com/trajano/expo-experiments/blob/pdf-view/packages/my-app/src/app/secure/my-resume.tsx

Nothing really odd, I set the initial width to the screen width and height to 1

onLoad I set the view to have the proper height based on the aspect ratio of the PDF. But the page is zoomed in initially

fitWidth={true} doesn't work (and also isn't in the typings)

trajano commented 1 day ago
fitPolicy={0}

Would be nice if it was documented or had a proper type