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

Pages are incorrectly scaled when SVG height and width are specified - SDK #328

Open
rkwright opened this issue Aug 22, 2016 · 2 comments
Open

Comments

@rkwright
Copy link
Member

rkwright commented Aug 22, 2016

This issue is a Bug

Related issue(s) and/or pull request(s)

See also #327

Expected Behaviour

Should render the last page of the sample file 5 cm wide and 10 cm hight

Observed behaviour

Instead, Readium scales the page so it is (apparently) 10x the size of the container.

Steps to reproduce

  1. Open the test file
  2. Navigate to the last page
  3. Observe that the rendered page is huge, like this:

osx_scaling

when it should look like this: (Vital Source Reader)

vs_correct

Test file(s)

https://drive.google.com/open?id=0BzaNaBNAB6FjUG1ydF9RWllCM0U

Product

SDKLauncher-OSX, 0.24-alpha on OSX 10.11

Additional information

ReadiumJS scales it wrong as well, but differently. See #327 . Note it is scaled in the same wrong way on SDKLauncher-iOS as well.

@olivierkorner
Copy link
Contributor

If the size of SVG is not defined in percent, it is interpreted by Readium as being in pixels, even if another unit is specified (like 'cm' in the test file).
A way to convert units from 'cm' or 'in' to pixels is needed to properly handle this case.

@rkwright
Copy link
Member Author

@olivierkorner Thanks for looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants