Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CCITTStream regression by byte-aligning rows before checking EOL marker #5729

Merged
merged 1 commit into from
Feb 16, 2015

Conversation

timvandermeij
Copy link
Contributor

Fixes #5726.

It turns out that byte-aligning rows needs to happen before checking for an EOL marker. Older versions of the Poppler code did this (https://github.com/davidben/poppler/blob/master/poppler/Stream.cc#L1642), as well as libpdf++ (https://github.com/match41/sumpdf/blob/master/libpdfdoc/src/stream/CCITTFaxStream.cc#L403).

@timvandermeij
Copy link
Contributor Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/435fdf1a9176ca0/output.txt

@timvandermeij
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/ce69f3fe29aa66f/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://107.22.172.223:8877/6b5728fa20f1699/output.txt

@timvandermeij timvandermeij added this to the 2015 Q1 milestone Feb 13, 2015
@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/6b5728fa20f1699/output.txt

Total script time: 17.56 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/ce69f3fe29aa66f/output.txt

Total script time: 23.38 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@Snuffleupagus
Copy link
Collaborator

I can confirm that this fixes the regression, and I'm impressed with the quick turnaround, however I'm a bit nervous about this patch ;-)
@timvandermeij Since you (basically) revert one of the code changes from PR #5136, have you gone through all those files to ensure that this patch won't regress any of them (our test coverage is probably not perfect).
I've looked at most of those, and everything still appears to work, but I'd like you to reassurance me that you've looked at them too before I'm comfortable with merging this :-)

@timvandermeij
Copy link
Contributor Author

@Snuffleupagus I should indeed have mentioned that! I have tested all PDF files from the following issues:

All those PDFs render fine with this patch. The ones that were already fixed render the same with this patch and the one from your issue now renders completely with this patch.

@Snuffleupagus
Copy link
Collaborator

I figured that you did test them, but I just wanted to make sure. Thank you!

/botio makeref

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_makeref from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/141964a4dee7f07/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_makeref from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.22.172.223:8877/0347e4c8b711f05/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://107.22.172.223:8877/0347e4c8b711f05/output.txt

Total script time: 1.08 mins

  • Lint: Passed
  • Make references: FAILED

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/141964a4dee7f07/output.txt

Total script time: 22.98 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

Snuffleupagus added a commit that referenced this pull request Feb 16, 2015
Fix CCITTStream regression by byte-aligning rows before checking EOL marker
@Snuffleupagus Snuffleupagus merged commit 76a24d8 into mozilla:master Feb 16, 2015
@timvandermeij timvandermeij deleted the ccitt-bytealign branch February 16, 2015 18:30
speedplane pushed a commit to speedplane/pdf.js that referenced this pull request Feb 24, 2015
Fix CCITTStream regression by byte-aligning rows before checking EOL marker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CCITTFaxStream regression - only a small part of the image is rendered correctly
3 participants