From 680306226d50007eb5fd7b5e5c28ae69f4b54b69 Mon Sep 17 00:00:00 2001 From: Vivin Paliath Date: Fri, 7 Jun 2013 11:01:31 -0700 Subject: [PATCH] Updated Minimal example that showcases PDF rendering with text selection enabled (markdown) --- ...-that-showcases-PDF-rendering-with-text-selection-enabled.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Minimal-example-that-showcases-PDF-rendering-with-text-selection-enabled.md b/Minimal-example-that-showcases-PDF-rendering-with-text-selection-enabled.md index 4fa0842..7c97929 100644 --- a/Minimal-example-that-showcases-PDF-rendering-with-text-selection-enabled.md +++ b/Minimal-example-that-showcases-PDF-rendering-with-text-selection-enabled.md @@ -1,6 +1,6 @@ This page shows you how to render a PDF with text-selection enabled. To get the minimal example working, I extracted the parts relevant to text-selection from viewer.js. The text-selection code in viewer.js supports operations like text-search and match, but this minimal example does not. The reason is that the text-search and match operations depend on some view-specific components (like the find bar) in viewer.js and will not work in this minimal example. At some point in the future, the text-selection, search, and match operations can be pulled out of viewer.js into their own class. Then all these operations can be abstracted and exposed via an API. This example is also available in the examples directory. -For this example, we are going to be using a sample PDF that is available [here](http://vivin.net/pub/pdfjs/TestDocument.pdf) However, we will not be loading up this document directly in this example. Instead, we will be starting with the base64 representation of the PDF. +For this example, we are going to be using a sample PDF that is available [here](http://vivin.net/pub/pdfjs/TestDocument.pdf) However, we will not be loading up this document directly in this example. Instead, we will be starting with the base64 representation of the PDF. Of course, if you have the PDF file at your disposal you can simply do `PDFJS.getDocument('mypdf.pdf').then(...)` instead of using the base64-encoded data. First, let's take a look at the HTML file that we're going to use. It's very simple and looks like this: