Support corrupted pdfs that are encrypted but lack 'ID' in trailer
This commit is contained in:
parent
2ccad4ca45
commit
48fa0172ed
1 changed files with 3 additions and 2 deletions
|
@ -342,8 +342,9 @@ var XRef = (function XRefClosure() {
|
||||||
|
|
||||||
var encrypt = trailerDict.get('Encrypt');
|
var encrypt = trailerDict.get('Encrypt');
|
||||||
if (encrypt) {
|
if (encrypt) {
|
||||||
var fileId = trailerDict.get('ID');
|
var ids = trailerDict.get('ID');
|
||||||
this.encrypt = new CipherTransformFactory(encrypt, fileId[0], password);
|
var fileId = (ids && ids.length) ? ids[0] : '';
|
||||||
|
this.encrypt = new CipherTransformFactory(encrypt, fileId, password);
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the root dictionary (catalog) object
|
// get the root dictionary (catalog) object
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue