1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Fixes text search for "secured" documents

This commit is contained in:
Yury Delendik 2013-02-03 15:03:59 -06:00
parent 3699c311bb
commit d5f65f5431
6 changed files with 21 additions and 5 deletions

View file

@ -1198,6 +1198,14 @@ canvas {
background-color: rgba(0, 100, 0, 0.2);
}
#viewerContainer.copy-protection .textLayer > div {
visibility: hidden;
}
#viewerContainer.copy-protection .textLayer > div > .highlight {
visibility: visible;
}
/* TODO: file FF bug to support ::-moz-selection:window-inactive
so we can override the opaque grey background when the window is inactive;
see https://bugzilla.mozilla.org/show_bug.cgi?id=706209 */

View file

@ -1350,6 +1350,14 @@ var PDFView = {
// AcroForm/XFA was found
PDFView.fallback();
}
if (info.IsTextCopyDisabled) {
document.getElementById('viewerContainer').classList
.add('copy-protection');
} else {
document.getElementById('viewerContainer').classList
.remove('copy-protection');
}
});
},