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

Attempt to handle collapsed outline items, in the default viewer, according to the specification (issue 12704, PR 10890 follow-up) #12712

Merged
merged 1 commit into from
Dec 9, 2020

Conversation

Snuffleupagus
Copy link
Collaborator

This patch attempts to actually implement what's described for the Count-entry in the PDF specification, see https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G11.2095911, which I mostly ignored back in PR #10890 since it seemed unnecessarily complicated[1].

Besides issue #12704, I've also tested a couple of other documents (e.g. the PDF specification) and these changes don't seem to break anything else; additional testing would be helpful though!

Fixes #12704


[1] At the time, all PDF documents that I tested worked even with a very simple approach and I thus hoped that it'd would suffice.

…ording to the specification (issue 12704, PR 10890 follow-up)

This patch *attempts* to actually implement what's described for the `Count`-entry in the PDF specification, see https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G11.2095911, which I mostly ignored back in PR 10890 since it seemed unnecessarily complicated[1].

Besides issue 12704, I've also tested a couple of other documents (e.g. the PDF specification) and these changes don't *seem* to break anything else; additional testing would be helpful though!

---
[1] At the time, all PDF documents that I tested worked even with a very simple approach and I thus hoped that it'd would suffice.
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Dec 9, 2020

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/838b9133c52dacf/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 9, 2020

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/838b9133c52dacf/output.txt

Total script time: 4.22 mins

Published

@timvandermeij timvandermeij merged commit 93b3ba2 into mozilla:master Dec 9, 2020
@timvandermeij
Copy link
Contributor

Looks good to me, also in my testing with some other PDF files. I did have to re-read the specification a couple of times to actually understand what they mean, so I share the feeling that the idea of the Count property is perhaps more complex than strictly necessary :-)

@Snuffleupagus Snuffleupagus deleted the issue-12704 branch December 10, 2020 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Outline items are not opened/closed correctly
3 participants