pdf.js/src/core
Jonas Jenwald a39d636eb8 [api-minor] Always allow e.g. rendering to continue even if there are errors, and add a stopAtErrors parameter to getDocument to opt-out of this behaviour (issue 6342, issue 3795, bug 1130815)
Other PDF readers, e.g. Adobe Reader and PDFium (in Chrome), will attempt to render as much of a page as possible even if there are errors present.
Currently we just bail as soon the first error is hit, which means that we'll usually not render anything in these cases and just display a blank page instead.

NOTE: This patch changes the default behaviour of the PDF.js API to always attempt to recover as much data as possible, even when encountering errors during e.g. `getOperatorList`/`getTextContent`, which thus improve our handling of corrupt PDF files and allow the default viewer to handle errors slightly more gracefully.
In the event that an API consumer wishes to use the old behaviour, where we stop parsing as soon as an error is encountered, the `stopAtErrors` parameter can be set at `getDocument`.

Fixes, inasmuch it's possible since the PDF files are corrupt, e.g. issue 6342, issue 3795, and [bug 1130815](https://bugzilla.mozilla.org/show_bug.cgi?id=1130815) (and probably others too).
2017-04-11 08:59:22 +02:00
..
annotation.js [api-minor] Always allow e.g. rendering to continue even if there are errors, and add a stopAtErrors parameter to getDocument to opt-out of this behaviour (issue 6342, issue 3795, bug 1130815) 2017-04-11 08:59:22 +02:00
arithmetic_decoder.js Adds UMD headers to core, display and shared files. 2015-12-15 13:24:39 -06:00
bidi.js Fix inverted calculation of RTL text percentage in bidi. 2017-01-12 23:54:06 +08:00
cff_parser.js Handle cff fonts with erroneous stackSize 2017-03-06 19:28:46 -05:00
charsets.js Adds UMD headers to core, display and shared files. 2015-12-15 13:24:39 -06:00
chunked_stream.js Adjust the brace-style ESLint rule to disallow single lines (and also enable no-iterator) 2017-02-04 15:53:08 +01:00
cmap.js Improve the error handling when loading of built-in CMap files fail (PR 8064 follow-up) 2017-03-29 22:38:29 +02:00
colorspace.js Enable the no-else-return ESLint rule 2017-01-09 20:27:39 +01:00
crypto.js Enable the no-unused-vars ESLint rule 2017-01-29 23:23:17 +01:00
document.js Use a proper MessageHandler for PartialEvaluator.getTextContent to avoid errors for fonts relying on built-in CMap files (PR 8064 follow-up) 2017-03-24 17:39:33 +01:00
encodings.js Refactor Encodings 2016-01-28 11:32:59 -06:00
evaluator.js [api-minor] Always allow e.g. rendering to continue even if there are errors, and add a stopAtErrors parameter to getDocument to opt-out of this behaviour (issue 6342, issue 3795, bug 1130815) 2017-04-11 08:59:22 +02:00
font_renderer.js Enable the no-unused-vars ESLint rule 2017-01-29 23:23:17 +01:00
fonts.js Don’t skip glyph 0 in cmap. 2017-04-05 15:17:38 -07:00
function.js Enable the spaced-comment ESLint rule 2017-01-19 16:41:59 +01:00
glyphlist.js Add TeX-specific glyph names to glyphlist.js to improve both glyph mapping and text selection for mathematic fonts (issue 2594) 2016-10-26 16:39:58 +02:00
image.js Enable the no-else-return ESLint rule 2017-01-09 20:27:39 +01:00
jbig2.js Enable the no-unused-vars ESLint rule 2017-01-29 23:23:17 +01:00
jpg.js Try harder to find the next valid JPEG marker when decoding Scan data (issue 8182, issue 8189) 2017-03-27 15:55:21 +02:00
jpx.js Adjust the yoda ESLint rule to apply to inequalities as well 2017-03-19 13:27:14 +01:00
metrics.js Lazify Metrics 2016-01-28 12:11:46 -06:00
murmurhash3.js Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00
network.js Network: use the current location to prevent errors when using CSP headers 2017-03-03 23:18:51 +01:00
obj.js Use a simple RefSetCache to significantly improve the performance of Catalog.getPageDict for certain long documents (PR 8105 follow-up) 2017-03-28 21:39:55 +02:00
parser.js Consume the current character when encountering illegal characters in Lexer.getObject, in order to prevent infinite loops during reading of streams (issue 8061) 2017-02-11 19:32:48 +01:00
pattern.js Adjust the yoda ESLint rule to apply to inequalities as well 2017-03-19 13:27:14 +01:00
pdf_manager.js Refactor the password handling so that it's stored in the PdfManagers, instead of in the XRef 2017-01-03 20:29:52 +01:00
primitives.js Move EOF/isEOF from core/parser.js to core/primitives.js 2017-01-27 13:37:48 +01:00
ps_parser.js Move EOF/isEOF from core/parser.js to core/primitives.js 2017-01-27 13:37:48 +01:00
standard_fonts.js Improve rendering of non-embedded NuptialScript font 2016-11-22 17:56:17 +01:00
stream.js Merge pull request #7972 from Snuffleupagus/eslint_no-unused-vars 2017-02-01 23:50:23 +01:00
type1_parser.js Font ascent descent calculation fix 2017-02-11 01:25:05 -05:00
unicode.js Enable the spaced-comment ESLint rule 2017-01-19 16:41:59 +01:00
worker.js [api-minor] Always allow e.g. rendering to continue even if there are errors, and add a stopAtErrors parameter to getDocument to opt-out of this behaviour (issue 6342, issue 3795, bug 1130815) 2017-04-11 08:59:22 +02:00