Comments (7)
This is a known limitation. Because PDF.js uses absolute positioning, the chunks of text are sometimes merged. What can be done: the code which gets the text from the range can be improved to take the rectangle positions into the account https://github.com/agentcooper/react-pdf-highlighter/blob/master/src/components/PdfHighlighter.js#L485.
from react-pdf-highlighter.
Hi thanks for quick reply.
When I tried to open PDF and copy text with Google Chrome Default PDf viewer, I am not getting this issue.
As you said earlier the problem in PDF.js, do you have some work around code samples to solve this or do you aware of how Google Chrome able to solve this.
from react-pdf-highlighter.
Chrome's built-in viewer is not PDF.JS, they use a custom PDF renderer: https://opensource.google.com/projects/pdfium.
from react-pdf-highlighter.
Hi once again thanks for quick reply.
Do you have any sample to fix this issue? Because you aware of this and you might have tried some approach to solve this.
If you have anything please share it, I can continue from there, because I have to fix this issue on priority now.
from react-pdf-highlighter.
I don't have anything working, sorry. As I said earlier, I would start with exploring the distance between the rectangles.
from react-pdf-highlighter.
Thanks, will implement and get back to you.
from react-pdf-highlighter.
Did this problem get solved @SelvaSurukam ?
from react-pdf-highlighter.
Related Issues (20)
- How to reset/remove a single Highlight by ID? HOT 1
- Loading testHighlights sample with viewport
- Chinese does not display HOT 2
- Bounding rectangle calculation / transformation HOT 1
- Unable to load larger PDF files from URL
- Array of strings to automatically create highlights HOT 3
- Supply option to set textLayerMode HOT 1
- can't load the PdfLoader component HOT 1
- Handle large pdfs > 500 pages
- How to listen to scroll events HOT 1
- selection coordinate error HOT 1
- is it possible to convert the synctex coordinate to react-pdf-highlighter coordinate
- requirement: will one day this tool support overlapping two highlight part ? HOT 1
- Dockerfile for deployment
- Adding JWT to request headers when PDF is retrieved HOT 2
- Issue with Scrolling to Runtime-Added Highlight HOT 1
- PDF Reloads when highlights are added/modified HOT 3
- Area Highlight is misaligned on container resize HOT 1
- After Upgade The Package Getting `No Such File Or Directory Warning` HOT 2
- Is this project still active? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-pdf-highlighter.