|
|
@ -62,7 +62,7 @@ var TextLayerBuilder = function textLayerBuilder(options) { |
|
|
|
this.renderLayer = function textLayerBuilderRenderLayer() { |
|
|
|
this.renderLayer = function textLayerBuilderRenderLayer() { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
var textDivs = this.textDivs; |
|
|
|
var textDivs = this.textDivs; |
|
|
|
var bidiTexts = this.textContent.bidiTexts; |
|
|
|
var bidiTexts = this.textContent; |
|
|
|
var textLayerDiv = this.textLayerDiv; |
|
|
|
var textLayerDiv = this.textLayerDiv; |
|
|
|
var canvas = document.createElement('canvas'); |
|
|
|
var canvas = document.createElement('canvas'); |
|
|
|
var ctx = canvas.getContext('2d'); |
|
|
|
var ctx = canvas.getContext('2d'); |
|
|
@ -149,7 +149,7 @@ var TextLayerBuilder = function textLayerBuilder(options) { |
|
|
|
this.divContentDone = true; |
|
|
|
this.divContentDone = true; |
|
|
|
|
|
|
|
|
|
|
|
var textDivs = this.textDivs; |
|
|
|
var textDivs = this.textDivs; |
|
|
|
var bidiTexts = this.textContent.bidiTexts; |
|
|
|
var bidiTexts = this.textContent; |
|
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < bidiTexts.length; i++) { |
|
|
|
for (var i = 0; i < bidiTexts.length; i++) { |
|
|
|
var bidiText = bidiTexts[i]; |
|
|
|
var bidiText = bidiTexts[i]; |
|
|
@ -181,7 +181,7 @@ var TextLayerBuilder = function textLayerBuilder(options) { |
|
|
|
this.convertMatches = function textLayerBuilderConvertMatches(matches) { |
|
|
|
this.convertMatches = function textLayerBuilderConvertMatches(matches) { |
|
|
|
var i = 0; |
|
|
|
var i = 0; |
|
|
|
var iIndex = 0; |
|
|
|
var iIndex = 0; |
|
|
|
var bidiTexts = this.textContent.bidiTexts; |
|
|
|
var bidiTexts = this.textContent; |
|
|
|
var end = bidiTexts.length - 1; |
|
|
|
var end = bidiTexts.length - 1; |
|
|
|
var queryLen = PDFFindController === null ? |
|
|
|
var queryLen = PDFFindController === null ? |
|
|
|
0 : PDFFindController.state.query.length; |
|
|
|
0 : PDFFindController.state.query.length; |
|
|
@ -240,7 +240,7 @@ var TextLayerBuilder = function textLayerBuilder(options) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var bidiTexts = this.textContent.bidiTexts; |
|
|
|
var bidiTexts = this.textContent; |
|
|
|
var textDivs = this.textDivs; |
|
|
|
var textDivs = this.textDivs; |
|
|
|
var prevEnd = null; |
|
|
|
var prevEnd = null; |
|
|
|
var isSelectedPage = PDFFindController === null ? |
|
|
|
var isSelectedPage = PDFFindController === null ? |
|
|
@ -355,7 +355,7 @@ var TextLayerBuilder = function textLayerBuilder(options) { |
|
|
|
// Clear out all matches.
|
|
|
|
// Clear out all matches.
|
|
|
|
var matches = this.matches; |
|
|
|
var matches = this.matches; |
|
|
|
var textDivs = this.textDivs; |
|
|
|
var textDivs = this.textDivs; |
|
|
|
var bidiTexts = this.textContent.bidiTexts; |
|
|
|
var bidiTexts = this.textContent; |
|
|
|
var clearedUntilDivIdx = -1; |
|
|
|
var clearedUntilDivIdx = -1; |
|
|
|
|
|
|
|
|
|
|
|
// Clear out all current matches.
|
|
|
|
// Clear out all current matches.
|
|
|
|