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

[breaking] Drop support for React content in customTextRenderer #1124

Merged
merged 1 commit into from Nov 5, 2022

Conversation

wojtekmaj
Copy link
Owner

@wojtekmaj wojtekmaj commented Nov 4, 2022

In #944, TextLayer was refactored to use pdf.js-native pdfjs.renderTextLayer for rendering text layer items.

Keeping support for React content in customTextRenderer adds a dependency on react-dom/server which we need to import renderToStaticMarkup from. This makes bundles heavier and keeping compatibility with Preact harder.

Users who still want to render React content may use renderToStaticMarkup on their side, inside customTextRenderer.

@wojtekmaj wojtekmaj force-pushed the no-server branch 2 times, most recently from 7b6d25e to f66b767 Compare November 4, 2022 14:16
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.

None yet

1 participant