The existing pdf.js "Hello World" example only shows you how to render a PDF. Unfortunately, it does not show you how to enable text-selection. This example shows you how to do both. The difficulty with text-selection was that the text-selection code was part of the "PDF Viewer" app created by Mozilla. There is no API documentation either, regarding the enabling of text selection. I was able to extricate the parts of the code necessary for text-selection to create this demo. The main file (minimal.js) has detailed comments and it should be pretty easy to follow.
Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
A minimal example that shows you how to render a PDF document and enable text-selection.
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|