pdfjs
Advanced tools
Comparing version 2.3.6 to 2.3.7
@@ -9,2 +9,7 @@ # Changelog | ||
## [2.3.7] - 2020-05-15 | ||
### Fixed | ||
- Update PDF parser to accept whitespace before `endstream` keywords | ||
- Update PDF parser to ignore trailer prev pointers that point to the document beginning (offset = `0`) | ||
## [2.3.6] - 2020-04-28 | ||
@@ -11,0 +16,0 @@ ### Fixed |
@@ -111,2 +111,6 @@ 'use strict' | ||
// not to be expected according to the PDF spec, but there are some PDF files that indent | ||
// the stream | ||
lexer.skipWhitespace(null, true) | ||
if (lexer.readString(9) !== 'endstream') { | ||
@@ -113,0 +117,0 @@ throw new Error('Invalid stream: `endstream` not found') |
@@ -44,2 +44,9 @@ 'use strict' | ||
while (trailer.has('Prev')) { | ||
const prevTrailerPos = trailer.get('Prev'); | ||
// Ignore prev pointers to the document beginning. This is not according to the PDF spec, but | ||
// there are PDFs out there doing it anyway. | ||
if (prevTrailerPos === 0) { | ||
break; | ||
} | ||
lexer.pos = trailer.get('Prev') | ||
@@ -46,0 +53,0 @@ const xref = PDF.Xref.parse(null, lexer) |
{ | ||
"name": "pdfjs", | ||
"author": "Markus Ast <npm.m@rkusa.st>", | ||
"version": "2.3.6", | ||
"version": "2.3.7", | ||
"description": "A Portable Document Format (PDF) generation library targeting both the server- and client-side.", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
340004
6560