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] Support custom offsetX/offsetY values in PDFPageProxy.getViewport and PageViewport.clone #11273

Merged
merged 2 commits into from
Oct 23, 2019

Conversation

Snuffleupagus
Copy link
Collaborator

There's no good reason, as far as I can tell, to not also support offsetX/offsetY in addition to e.g. dontFlip.

Fixes #11239.

…o use a valid rotation angle

As can be seen in `PageViewport` only multiples of 90 degrees are really supported by the code, hence the unit-test doesn't really make sense.
(Possibly this should be enforced in the API, to avoid surprises, but given that this problem has always existed I'm passing on that for now.)
…y.getViewport` and `PageViewport.clone`

There's no good reason, as far as I can tell, to not also support `offsetX`/`offsetY` in addition to e.g. `dontFlip`.
@Snuffleupagus Snuffleupagus changed the title [api-minor] Support custom offsetX/offsetY values in PDFPageView.getViewport and PageViewport.clone [api-minor] Support custom offsetX/offsetY values in PDFPageProxy.getViewport and PageViewport.clone Oct 23, 2019
@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/2dfd800eb681090/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/b35f84ab2c41d12/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/2dfd800eb681090/output.txt

Total script time: 2.59 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/b35f84ab2c41d12/output.txt

Total script time: 5.30 mins

  • Unit Tests: Passed

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

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/a64cd980226f7fa/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/a64cd980226f7fa/output.txt

Total script time: 1.69 mins

Published

@timvandermeij timvandermeij merged commit 4a5a432 into mozilla:master Oct 23, 2019
@timvandermeij
Copy link
Contributor

Looks good to me; thank you for picking this up!

@Snuffleupagus Snuffleupagus deleted the getViewport-offsets branch October 24, 2019 08:14
@soadzoor
Copy link

soadzoor commented Oct 25, 2019

When does this become available for the npm package, so I can try it?

@timvandermeij
Copy link
Contributor

In the next release. The date for that is not yet determined.

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.

4 participants