Merge pull request #2547 from mduan/issue2085
Support corrupted pdfs that are encrypted but lack 'ID' in trailer
This commit is contained in:
commit
e61b104852
@ -342,8 +342,9 @@ var XRef = (function XRefClosure() {
|
||||
|
||||
var encrypt = trailerDict.get('Encrypt');
|
||||
if (encrypt) {
|
||||
var fileId = trailerDict.get('ID');
|
||||
this.encrypt = new CipherTransformFactory(encrypt, fileId[0], password);
|
||||
var ids = trailerDict.get('ID');
|
||||
var fileId = (ids && ids.length) ? ids[0] : '';
|
||||
this.encrypt = new CipherTransformFactory(encrypt, fileId, password);
|
||||
}
|
||||
|
||||
// get the root dictionary (catalog) object
|
||||
|
Loading…
Reference in New Issue
Block a user