Rethrow MissingDataException when needed
@ -467,6 +467,9 @@ var PDFDocument = (function PDFDocumentClosure() {
}
} catch (ex) {
if (ex instanceof MissingDataException) {
throw ex;
info('Something wrong with AcroForm entry');
this.acroForm = null;
@ -104,6 +104,9 @@ var Catalog = (function CatalogClosure() {
try {
metadata = stringToUTF8String(bytesToString(stream.getBytes()));
} catch (e) {
if (e instanceof MissingDataException) {
throw e;
info('Skipping invalid metadata.');