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: Missing text and annotationlayer imports for React-PDF #185

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

pat721
Copy link
Contributor

@pat721 pat721 commented Oct 12, 2023

@cyntler
The PDFRender uses PDF-React as Library. There the imports for the Text and Annotationlayer are missing. This causes
incorrect render behaviour. I added the missing imports according to the PDF-React documentation: Support for text and annotationlayer . This issue was likely cause by updating the React-PDF dependency in #88 from 5.7.2 (no text and annotationlayer support) to 7.5.0.

Before:

The text and annotationlayer were improperly rendered below the pdf canvas. This also prevented from text being directly highlightable and therefore copyable from the rendered PDF.
grafik

After:

The text and annotationlayer are correctly rendered on top of the pdf canvas. The text is highlightable and copyable.
grafik

@cyntler cyntler merged commit bf7489d into cyntler:main Oct 19, 2023
@cyntler
Copy link
Owner

cyntler commented Oct 19, 2023

@pat721 Thank you for your support! Merged! I will release a new version with your changes.

@alantoa
Copy link
Contributor

alantoa commented Apr 10, 2024

Hey, this change is causing it's broken on Next.js because CSS it importing in the build..., a lot of users are facing this issue now.
For the previous issue, I think we can just update the react-pdf version. I'm sure it's fixed now. If we need these CSS, we can manually import them, right?

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.

3 participants