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

Prevent PartialEvaluator_buildFormXObject from failing if the Matrix or BBox contains indirect objects #6485

Merged
merged 2 commits into from
Sep 29, 2015
Merged

Prevent PartialEvaluator_buildFormXObject from failing if the Matrix or BBox contains indirect objects #6485

merged 2 commits into from
Sep 29, 2015

Conversation

Snuffleupagus
Copy link
Collaborator

  • Add getArray method to Dict

    This method extend get, and will fetch all indirect objects (i.e. Refs) when the result is an Array.

  • Prevent PartialEvaluator_buildFormXObject from failing if the Matrix or BBox contains indirect objects

    This patch fixes yet another instance of bad PDF data, specifically a case where the BBox array contains indirect objects (i.e. Refs).

    Fixes the missing image in http://www.int.washington.edu/talks/WorkShops/int_08_37W/People/Franz_M/Franz.pdf#page=24. Note: There are missing images on a number of the pages in that file.


// Same as getAsync(),
// but dereferences all elements if the result is an Array.
getAsyncArray: function Dict_getAsyncArray(key1, key2, key3) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this function: not used and fetchIfRefs inside probably need to be async fetched as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this function: not used

Done. (I just added it for consistency with the other method, but since it's not used I agree with removing it.)

[...] and fetchIfRefs inside probably need to be async fetched as well.

This is an embarrassing oversight on my part :-)

This method extend `get`, and will fetch all indirect objects (i.e. `Ref`s) when the result is an `Array`.
…ix` or `BBox` contains indirect objects

This patch fixes yet another instance of bad PDF data, specifically a case where the `BBox` array contains indirect objects (i.e. `Ref`s).

Fixes the missing image in http://www.int.washington.edu/talks/WorkShops/int_08_37W/People/Franz_M/Franz.pdf#page=24. *Note:* There are missing images on a number of the pages in that file.
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/6b999d964c49fc3/output.txt

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/99a29b3e2791815/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/501e7d5dbdc2392/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/99a29b3e2791815/output.txt

Total script time: 18.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/501e7d5dbdc2392/output.txt

Total script time: 19.45 mins

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

@timvandermeij
Copy link
Contributor

/botio makeref

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/8476d82cf499f79/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/8476d82cf499f79/output.txt

Total script time: 18.74 mins

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

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

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

Total script time: 19.61 mins

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

timvandermeij added a commit that referenced this pull request Sep 29, 2015
Prevent `PartialEvaluator_buildFormXObject` from failing if the `Matrix` or `BBox` contains indirect objects
@timvandermeij timvandermeij merged commit a6761a5 into mozilla:master Sep 29, 2015
@timvandermeij
Copy link
Contributor

Good work!

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.

4 participants