Merge pull request #5729 from timvandermeij/ccitt-bytealign
Fix CCITTStream regression by byte-aligning rows before checking EOL marker
This commit is contained in:
commit
76a24d8a5b
@ -2044,6 +2044,10 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
|
|||||||
|
|
||||||
var gotEOL = false;
|
var gotEOL = false;
|
||||||
|
|
||||||
|
if (this.byteAlign) {
|
||||||
|
this.inputBits &= ~7;
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.eoblock && this.row === this.rows - 1) {
|
if (!this.eoblock && this.row === this.rows - 1) {
|
||||||
this.eof = true;
|
this.eof = true;
|
||||||
} else {
|
} else {
|
||||||
@ -2067,10 +2071,6 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.byteAlign && !gotEOL) {
|
|
||||||
this.inputBits &= ~7;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.eof && this.encoding > 0) {
|
if (!this.eof && this.encoding > 0) {
|
||||||
this.nextLine2D = !this.lookBits(1);
|
this.nextLine2D = !this.lookBits(1);
|
||||||
this.eatBits(1);
|
this.eatBits(1);
|
||||||
|
1
test/pdfs/issue5726.pdf.link
Normal file
1
test/pdfs/issue5726.pdf.link
Normal file
@ -0,0 +1 @@
|
|||||||
|
http://digipool.bib-bvb.de/bvb/info/OCR_with_TIFFG4.pdf
|
@ -1606,6 +1606,13 @@
|
|||||||
"lastPage": 1,
|
"lastPage": 1,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "issue5726",
|
||||||
|
"file": "pdfs/issue5726.pdf",
|
||||||
|
"md5": "f52f31ad3da316b599cade875ab049db",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": true,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "bug816075",
|
{ "id": "bug816075",
|
||||||
"file": "pdfs/bug816075.pdf",
|
"file": "pdfs/bug816075.pdf",
|
||||||
"md5": "7ec87c115c1f9ec41234cc7002555e82",
|
"md5": "7ec87c115c1f9ec41234cc7002555e82",
|
||||||
|
Loading…
Reference in New Issue
Block a user