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

Extra padding at top of PdfViewer #24

Closed
JingYenLoh opened this issue Jul 25, 2018 · 3 comments
Closed

Extra padding at top of PdfViewer #24

JingYenLoh opened this issue Jul 25, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@JingYenLoh
Copy link

Hi, thank you for this library 😃

I have an issue with additional padding at the top of the component. Using the following code:

const WebScreen = props => (
  <View style={styles.container}>
    <MyHeader name={props.navigation.getParam('name')} />
    <View style={{ flex: 1 }}>
      <PdfReader
        style={{ flex: 1, padding: 0, margin: 0 }}
        source={{ uri: props.navigation.getParam('uri') }}
      />
    </View>
    <BottomBar />
  </View>
);

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
  },
});

export default WebScreen;

I get the following result, with an extra 24px padding at the top.
photo_2018-07-26_01-42-56

After some inspection, I found the extra padding to be due to this line. By changing paddingTop to 0, I was able to achieve the following:
photo_2018-07-26_01-45-05

Would it be possible for us to control paddingTop via a prop? I believe #22 is a related issue (have not tested on iOS)

@xcarpentier xcarpentier added the bug Something isn't working label Sep 18, 2018
@luongbeta2
Copy link

Hi @xcarpentier. Please help me know when are you going to fix the bug ?

@vinitsood
Copy link

Any updates on this @xcarpentier? Awesome work btw :)

@xcarpentier
Copy link
Owner

Should be fixed now on v0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants