Annotation Layer redering issue
juancarlos-cynch opened this issue · comments
Juan Carlos Jiménez commented
Before you start - checklist
- I followed instructions in documentation written for my React-PDF version
- I have checked if this bug is not already reported
- I have checked if an issue is not listed in Known issues
- If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo
Description
When opening a PDF file with annotated info, the values are being shown misaligned.
I'm seeing this issue even in the library demos.
Steps to reproduce
- Clone the
react-pdf
library - Go to
sample/vite/
folder and install the demo dependenciesnpm install
- Run the demo:
npm run dev
- Choose the attached file in this issue, using the file selector and load a PDF file with annotations.
- See the misaligned data and compare opening the file with another PDF reader (like Mac Preview)
Expected behavior
The form values should be showed correctly aligned as any other PDF reader software.
Actual behavior
The form values are incorrectly aligned.
Additional information
Sample Demo: https://github.com/wojtekmaj/react-pdf/tree/main/sample/vite
Test File: f1040--2022 (1).pdf
Environment
- Browser (if applicable):
- React-PDF version: latest
- React version: 18
- Webpack version (if applicable):
Yatin07 commented
Jigme Lodey commented
import 'react-pdf/dist/Page/TextLayer.css';
import 'react-pdf/dist/Page/AnnotationLayer.css';
you can import this two css which solved the issue but not sure where its good idea or not