1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 23:28:06 +02:00

Continuing fairexpand #6663

1. Expanding divs to improve text selection. (Yury)
2. Adding enhanceTextSelection as an option.
3. Moving feature functionality from text_layer_builder.js to text_layer.js.
4. Added expandTextDivs method to only load expanded divs on first click, and only show on subsequent clicks
This commit is contained in:
Jeremy Press 2016-08-16 16:06:35 -07:00
parent 31cd23a6df
commit 6faa84abdb
8 changed files with 433 additions and 36 deletions

View file

@ -90,9 +90,11 @@ var rasterizeTextLayer = (function rasterizeTextLayerClosure() {
var task = PDFJS.renderTextLayer({
textContent: textContent,
container: div,
viewport: viewport
viewport: viewport,
enhanceTextSelection: enhanceTextSelection,
});
Promise.all([stylePromise, task.promise]).then(function (results) {
task.expandTextDivs(true);
style.textContent = results[0];
svg.appendChild(foreignObject);