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

Content Overlap with Footer in PDF Generation #140

Open
Rajat-Autofacets opened this issue Sep 5, 2024 · 0 comments
Open

Content Overlap with Footer in PDF Generation #140

Rajat-Autofacets opened this issue Sep 5, 2024 · 0 comments

Comments

@Rajat-Autofacets
Copy link

Rajat-Autofacets commented Sep 5, 2024

Issue:
I’m experiencing an issue with react-pdf where dynamic content in my PDF is sometimes hidden under the footer section. When the content length exceeds a certain limit, it overlaps with the footer, causing part of the content to be obscured.

Expected Behavior:
The content should adjust dynamically to avoid overlapping with the footer. There should be enough space between the content and the footer to ensure that all content is visible.

Environment:
"@react-pdf/renderer": "^3.0.2"
"react": "^18.2.0"

<Document> <Page style={{ fontFamily: fontFamily, paddingBottom: 40 }} wrap={true}> <Header data={props.header} /> <ComponentA data={props} /> <ComponentB data={props} /> <ComponentC data={props} /> <Footer data={props.footer} /> </page> </Document>

const FooterStyle: Style = { backgroundColor: backgroundCard, position: 'absolute', bottom: 0, padding: '5 15', };

const Footer = (props) => { <View fixed style={FooterStyle}> // Footer content here </View> }

const Header = (props) => { return ( <View fixed> // Header content here </View> ); };

Screenshot from 2024-09-05 11-46-27

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

No branches or pull requests

1 participant