mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
48.25k stars 9.96k forks source link

Just I require to show PDF with selectable text.. without `toolbar` and `thumbnails` #5859

Closed 3gwebtrain closed 9 years ago

3gwebtrain commented 9 years ago

My requirement is :

  1. Load the PDF by supplying url ( i am doing PDFViewerApplication.open('pdfs/xxxyy'+pNo+'.pdf');)
  2. Toolbar on the top, thumbnail not required
  3. User can select the text. (pdf should be select-able even selected text need to wrap in to span element)

From one of my question I had the answer, that there is a component facility to make customized pdf viewer. considering my above requirement any one show me the right way to build a viewer please? I am looking for minimal coding.

timvandermeij commented 9 years ago

All your requirements can be implemented using the "simple reader" example: see https://mozilla.github.io/pdf.js/examples/learning/prevnext.html and https://github.com/mozilla/pdf.js/tree/master/examples/learning. For a component-based approach (recommended) see https://github.com/mozilla/pdf.js/blob/master/examples/components/pageviewer.js.