WebViewer Version: 10.5.0
Do you have an issue with a specific file(s)?
Can you reproduce using one of our samples or online demos?
Are you using the WebViewer server? no
Does the issue only happen on certain browsers? no
Is your issue related to a front-end framework? no
Is your issue related to annotations?
[Short Text Similarity with Word Embeddings.pdf|attachment]
Please describe your issue and provide steps to reproduce it:
I use electron with React,but some PDF select Text error;
(upload://nQj4wB4BlK9NaWFARu9VOfdDRnD.pdf) (841.7 KB)
Right fragment of the fourth page of the above PDF
Hello @clearluvmoki ,
To investigate further, please provide the following:
- It looks like you tried to attached the sample PDF you used, but I’m unable to open/download it. Could you re-provide this file?
- We’ve made some fixes to our text selection since 10.5. Are you able to reproduce the issue on our latest release (10.9)?
- Are you also able to reproduce this issue on our electron sample? You can find it here: GitHub - PDFTron/webviewer-electron-sample: Sample to demonstrate integrating WebViewer into an Electron App
- The WebViewer constructor, with all options defined.
Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer
Apryse Software Inc.
Can you download the PDF here? It may be inconvenient to upgrade.
Short Text Similarity with Word Embeddings.pdf (841.7 KB)
Hello @clearluvmoki ,
I was able to download the PDF you provided. Using that, I was able to reproduce the issue you were mentioning.
Please try the following snippet:
instance.Core.documentViewer.addEventListener('documentLoaded', async () => {
const doc = await instance.Core.documentViewer.getDocument();
doc.setTextExtractorProcessingFlags([instance.Core.TextExtractorProcessingFlags.EXTRACT_USING_ZORDER]);
console.log('z-order');
});
This code snippet enables z-order reading order, which helps read documents such as these. I was unable to reproduce the issue with this code.
Let me know if this works for you!
Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer
Apryse Software Inc.