Support for textLayerBuilder
This commit is contained in:
parent
4f65198eaa
commit
ef137dd6a7
@ -781,12 +781,13 @@ var PageView = function pageView(container, content, id, pageWidth, pageHeight,
|
|||||||
div.appendChild(canvas);
|
div.appendChild(canvas);
|
||||||
this.canvas = canvas;
|
this.canvas = canvas;
|
||||||
|
|
||||||
var textLayer = null;
|
var textLayerDiv = null;
|
||||||
if (!PDFJS.disableTextLayer) {
|
if (!PDFJS.disableTextLayer) {
|
||||||
textLayer = document.createElement('div');
|
textLayerDiv = document.createElement('div');
|
||||||
textLayer.className = 'textLayer';
|
textLayerDiv.className = 'textLayer';
|
||||||
div.appendChild(textLayer);
|
div.appendChild(textLayerDiv);
|
||||||
}
|
}
|
||||||
|
var textLayer = textLayerDiv ? new TextLayerBuilder(textLayerDiv) : null;
|
||||||
|
|
||||||
var scale = this.scale;
|
var scale = this.scale;
|
||||||
canvas.width = pageWidth * scale;
|
canvas.width = pageWidth * scale;
|
||||||
@ -810,7 +811,7 @@ var PageView = function pageView(container, content, id, pageWidth, pageHeight,
|
|||||||
|
|
||||||
cache.push(this);
|
cache.push(this);
|
||||||
callback();
|
callback();
|
||||||
}).bind(this), new TextLayerBuilder(textLayer)
|
}).bind(this), textLayer
|
||||||
);
|
);
|
||||||
|
|
||||||
setupAnnotations(this.content, this.scale);
|
setupAnnotations(this.content, this.scale);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user