mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Suppress metadata decryption
This commit is contained in:
parent
40b9be137f
commit
413e5357b9
2 changed files with 11 additions and 2 deletions
|
@ -132,7 +132,14 @@ var Catalog = (function CatalogClosure() {
|
|||
|
||||
Catalog.prototype = {
|
||||
get metadata() {
|
||||
var stream = this.catDict.get('Metadata');
|
||||
var streamRef = this.catDict.getRaw('Metadata');
|
||||
if (!isRef(streamRef))
|
||||
return shadow(this, 'metadata', null);
|
||||
|
||||
var encryptMetadata = !this.xref.encrypt ? false :
|
||||
this.xref.encrypt.encryptMetadata;
|
||||
|
||||
var stream = this.xref.fetch(streamRef, !encryptMetadata);
|
||||
var metadata;
|
||||
if (stream && isDict(stream.dict)) {
|
||||
var type = stream.dict.get('Type');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue