Make an effort to adhere the spec 7.6.3.2
This commit is contained in:
parent
43d6c6f1ab
commit
724add2ffd
@ -295,7 +295,7 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
|
||||
}
|
||||
|
||||
var gfx = new CanvasGraphics(params.canvasContext, this.commonObjs,
|
||||
this.objs, params.textLayer);
|
||||
this.objs, !this.pageInfo.disableTextLayer && params.textLayer);
|
||||
try {
|
||||
this.display(gfx, params.viewport, complete, continueCallback);
|
||||
} catch (e) {
|
||||
|
@ -560,6 +560,7 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
|
||||
var ownerPassword = stringToBytes(dict.get('O'));
|
||||
var userPassword = stringToBytes(dict.get('U'));
|
||||
var flags = dict.get('P');
|
||||
this.disableTextLayer = !(flags & 16);
|
||||
var revision = dict.get('R');
|
||||
var encryptMetadata = algorithm == 4 && // meaningful when V is 4
|
||||
dict.get('EncryptMetadata') !== false; // makes true as default value
|
||||
|
@ -212,11 +212,13 @@ var WorkerMessageHandler = {
|
||||
handler.on('GetPageRequest', function wphSetupGetPage(data) {
|
||||
var pageNumber = data.pageIndex + 1;
|
||||
var pdfPage = pdfModel.getPage(pageNumber);
|
||||
var encrypt = pdfModel.xref.encrypt;
|
||||
var page = {
|
||||
pageIndex: data.pageIndex,
|
||||
rotate: pdfPage.rotate,
|
||||
ref: pdfPage.ref,
|
||||
view: pdfPage.view
|
||||
view: pdfPage.view,
|
||||
disableTextLayer: encrypt ? encrypt.disableTextLayer : false
|
||||
};
|
||||
handler.send('GetPage', {pageInfo: page});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user