TextLayerBuilder Constructor accepts an object of options.

Rishabh 2013-11-01 02:21:40 -07:00
parent 82f52d4e2d
commit 3b05275598

@ -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 = {