wonday / react-native-pdf

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

PDF View Full Screen #679

Closed kyagie closed 1 year ago

kyagie commented 2 years ago

React Native Version - 0.69.2 react-native-pdf - 6.6.2

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

Describe your issue as precisely as possible : PDF View does not cover the entire screen. Can we have the option to show the file over its entire width & height

Join a screenshot or video of the problem on the simulator or device? Simulator Screen Shot - iPhone 13 - 2022-08-08 at 14 40 52

Show us the code you are using?

kylefoo commented 2 years ago

Should just wrap a container around the pdf component, following works for me

pdfContainer: {
    flex: 1,
    height: '100%',
    flexDirection: 'column',
    display: 'flex',
  },
pdf: {
    flex: 1,
    width: '100%',
    height: '100%',
    maxHeight: windowHeight,
    flexDirection: 'column',
    display: 'flex',
    overflow: 'scroll',
  },
ajlee4 commented 2 years ago

maybe someone can tell you how to stretch the white area to the full height? image my code image