Skip to content

Fix export to pdf #12782

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

Merged
merged 1 commit into from
Jun 23, 2025
Merged

Fix export to pdf #12782

merged 1 commit into from
Jun 23, 2025

Conversation

FelixMalfait
Copy link
Member

@FelixMalfait FelixMalfait commented Jun 23, 2025

Export to PDF was throwing an error due to fonts not being registered. Maybe linked to the async loading changes or blocknote upgrades.

I wasn't a fan of hardcoding the fonts here (makes a second source of truth for Inter), but after a few tests this seemed like the best compromise

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Fixed PDF export functionality by implementing proper font registration for the Inter font family in BlockNote editor exports.

  • Added singleton pattern in packages/twenty-front/src/modules/action-menu/actions/record-actions/single-record/utils/exportBlockNoteEditorToPdf.ts to ensure Inter font is registered only once
  • Resolved font loading issues that were causing PDF export failures
  • Change aligns with existing font usage in email templates and Storybook preview

1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile

Copy link

sentry-io bot commented Jun 23, 2025

Sentry Issue: TWENTY-FRONT-4ET

Copy link
Contributor

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:20321

This environment will automatically shut down when the PR is closed or after 5 hours.

@FelixMalfait FelixMalfait merged commit 2e296e7 into main Jun 23, 2025
56 checks passed
@FelixMalfait FelixMalfait deleted the fix-export-to-pdf branch June 23, 2025 14: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

Successfully merging this pull request may close these issues.

1 participant