mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 18:25:37 +02:00
Skipping incorrectly encoded metadata
This commit is contained in:
parent
413e5357b9
commit
48811f362b
1 changed files with 5 additions and 1 deletions
|
@ -152,7 +152,11 @@ var Catalog = (function CatalogClosure() {
|
||||||
// arbitrary charsets, let's just hope that the author of the PDF
|
// arbitrary charsets, let's just hope that the author of the PDF
|
||||||
// was reasonable enough to stick with the XML default charset,
|
// was reasonable enough to stick with the XML default charset,
|
||||||
// which is UTF-8.
|
// which is UTF-8.
|
||||||
|
try {
|
||||||
metadata = stringToUTF8String(bytesToString(stream.getBytes()));
|
metadata = stringToUTF8String(bytesToString(stream.getBytes()));
|
||||||
|
} catch (e) {
|
||||||
|
log('Skipping invalid metadata.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue