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

[api-minor] Add basic support for PageLayout in the API and the viewer #10709

Merged
merged 1 commit into from
Apr 5, 2019

Conversation

Snuffleupagus
Copy link
Collaborator

Please see the specification, https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G6.2393749, and refer to the inline comments for additional details.

Copy link
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

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

Looks good with the comment addressed and passing tests.

web/app.js Outdated
* Converts API PageLayout values to the format used by `PDFViewer`.
* NOTE: This is supported to the extent that the viewer implements the
* necessary Scroll/Spread modes (since SinglePage, TwoPageLeft,
and TwoPageRight all suggests using non-continuous scrolling).
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like an asterisk is missing here at the beginning of the line.

Copy link
Collaborator Author

@Snuffleupagus Snuffleupagus Apr 5, 2019

Choose a reason for hiding this comment

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

D'oh, fixed now :-)

Thinking about this patch I suppose that it might surprise users when some documents now opens with Spread mode enabled, but given that this is already controllable via existing prefs[1] I really didn't want to add any new ones here.


[1] In Firefox, setting pdfjs.spreadModeOnLoad = 0 in about:config is now guaranteed to never enable any Spread mode by default.

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Apr 5, 2019

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/21bc6bc1388cd27/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Apr 5, 2019

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/21bc6bc1388cd27/output.txt

Total script time: 1.80 mins

Published

@timvandermeij
Copy link
Contributor

/botio unittest

@pdfjsbot
Copy link

pdfjsbot commented Apr 5, 2019

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/0242a48a9ee030c/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Apr 5, 2019

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/116b86043cdf832/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Apr 5, 2019

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/0242a48a9ee030c/output.txt

Total script time: 2.84 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Apr 5, 2019

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/116b86043cdf832/output.txt

Total script time: 6.17 mins

  • Unit Tests: Passed

@timvandermeij timvandermeij merged commit b161050 into mozilla:master Apr 5, 2019
@timvandermeij
Copy link
Contributor

Nice addition!

@Snuffleupagus Snuffleupagus deleted the pageLayout branch April 5, 2019 21:16
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.

3 participants