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.
