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

fix: download pdf shows multiple pages #9889

Merged
merged 3 commits into from
Jun 27, 2024
Merged

Conversation

nickoferrall
Copy link
Contributor

Fix #9862

In production, download to pdf just downloads the first page, rather than all pages. This is because window.print() just shows the visible part of the web page in a SPA.

In this PR, I'm opening a new window and rending the HTML as a static snapshot so that all of the content is visible.

The pdf shows "about:blank" at the bottom left of the page. I don't think this can be removed as the browser checks the URL. And there's some box shadow at the end of the summary in the PDF, but I think that's fine.

To test

  • Create a retro with a lot of content
  • In the meeting summary, click "Download to PDF"
  • See that it downloads every page, not just the first

Copy link
Contributor

@Dschoordsch Dschoordsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@@ -18,6 +18,7 @@ const contentStyle = {
borderStyle: 'solid',
borderWidth: '1px',
boxSizing: 'content-box',
breakInside: 'avoid',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I snuck in this to avoid having a page break in a reflection card.

@nickoferrall nickoferrall merged commit edb7e58 into master Jun 27, 2024
5 checks passed
@nickoferrall nickoferrall deleted the fix/9862/multi-page-pdf branch June 27, 2024 14:05
@github-actions github-actions bot mentioned this pull request Jun 27, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PDF Downloads are only showing the first page of a summary
2 participants