mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Adds basic symbol dictionary and text region.
This commit is contained in:
parent
95bc99f698
commit
e09eb529d9
3 changed files with 450 additions and 21 deletions
|
@ -999,7 +999,14 @@ var Jbig2Stream = (function Jbig2StreamClosure() {
|
|||
|
||||
var jbig2Image = new Jbig2Image();
|
||||
|
||||
var data = jbig2Image.parseChunk(this.bytes, 0, this.bytes.length);
|
||||
var chunks = [], decodeParams = this.dict.get('DecodeParms');
|
||||
if (decodeParams && decodeParams.has('JBIG2Globals')) {
|
||||
var globalsStream = decodeParams.get('JBIG2Globals');
|
||||
var globals = globalsStream.getBytes();
|
||||
chunks.push({data: globals, start: 0, end: globals.length});
|
||||
}
|
||||
chunks.push({data: this.bytes, start: 0, end: this.bytes.length});
|
||||
var data = jbig2Image.parseChunks(chunks);
|
||||
var dataLength = data.length;
|
||||
|
||||
// JBIG2 had black as 1 and white as 0, inverting the colors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue