From 3b05275598d2de66b5fba2ebc50896040f6f0618 Mon Sep 17 00:00:00 2001 From: Rishabh Date: Fri, 1 Nov 2013 02:21:40 -0700 Subject: [PATCH] TextLayerBuilder Constructor accepts an object of options. --- ...that-showcases-PDF-rendering-with-text-selection-enabled.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 7c97929..743c70d 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 @@ -398,8 +398,7 @@ window.onload = function () { $pdfContainer.append($textLayerDiv); page.getTextContent().then(function (textContent) { - var textLayer = new TextLayerBuilder($textLayerDiv.get(0), 0); //The second zero is an index identifying - //the page. It is set to page.number - 1. + var textLayer = new TextLayerBuilder({ textLayerDiv: $textLayerDiv.get(0) }); textLayer.setTextContent(textContent); var renderContext = {