pdfviewer/pdfjs-text-selection-demo-master/pdfjs-text-selection-demo-master
2023-07-21 16:54:28 +05:30
..
css Initial Commit 2023-07-21 16:54:28 +05:30
js Initial Commit 2023-07-21 16:54:28 +05:30
index.html Initial Commit 2023-07-21 16:54:28 +05:30
README.md Initial Commit 2023-07-21 16:54:28 +05:30

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.