mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +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
|
||||
// was reasonable enough to stick with the XML default charset,
|
||||
// which is UTF-8.
|
||||
metadata = stringToUTF8String(bytesToString(stream.getBytes()));
|
||||
try {
|
||||
metadata = stringToUTF8String(bytesToString(stream.getBytes()));
|
||||
} catch (e) {
|
||||
log('Skipping invalid metadata.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue