Clarification on PDF Highlighting Issue with PDF.js
Last Updated on July 17, 2024 | 3 min read
Observed Behavior
Users may experience two common issues when highlighting text in PDFs displayed within the NIVOMAX Viewer, which uses the PDF.js library to render and display PDF content:
- Highlighting Hyperlinks: When attempting to highlight text that includes hyperlinks, the hyperlink itself cannot be highlighted if the starting point of the selection is within the hyperlink area. However, the selection can end inside the hyperlink area.
- Inadvertent Selection of Adjacent Content: It is common to unintentionally select adjacent content when highlighting text near hyperlinks due to the way PDF.js renders the document. This can result in more content being highlighted than intended. This behavior can vary based on how the PDF was originally created.
Why PDF.js?
PDF.js is a robust and widely compatible JavaScript library developed by Mozilla and maintained as an open-source project. It is designed to render PDF documents directly within web browsers without the need for plugins. The benefits of PDF.js include:
- Compatibility: Works seamlessly across various browsers that support JavaScript, without requiring external plugins.
- Open Source: Being open source fosters transparency, community-driven improvements, and customization opportunities.
- Accessibility: Enhances accessibility features, making PDF content more accessible to users with disabilities.
Testing the Issues
To verify these behaviors, users can save the PDF and then open it in Firefox outside of NIVOMAX. The content highlighting behavior will be the same as observed within the NIVOMAX Viewer.
- Highlighting Hyperlinks: Try starting the selection slightly after the hyperlink and highlighting backwards. This method often results in more accurate selections and minimizes the inclusion of adjacent content.
How to Use
Given the current behavior, users are advised to adjust their highlighting technique as described above to achieve the desired results. This process leverages the PDF.js rendering behavior to improve the accuracy of text selection.
Request for Improvement
If this behavior is a major concern, users are recommended to report these issues as improvement requests to Mozilla. Improvements to these behaviors will enhance the highlighting functionality in future versions of PDF.js. Additionally, we will be advocating for enhancements to these behaviors to improve the highlighting functionality in future versions of PDF.js.
Next Steps
The PDF.js library will continue to be updated as newer versions are released. If the requested improvement is implemented in PDF.js, it will be available within the NIVOMAX Viewer, and we will make a note to identify this improvement in the related Release Notes at that time. We understand the importance of efficient PDF usage within your workflows and appreciate your patience as we work towards enhancing the user experience when viewing PDF documents within the NIVOMAX Viewer.
Note:
Your feedback is invaluable to us. This FAQ has been created based on input from users like you. We appreciate your continued feedback and encourage you to keep sharing your experiences. For further questions or additional assistance, please contact our support team.