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

Issue 74b: IABookreader, please cooperate with old friend PDF? #83

Merged
merged 7 commits into from
Jul 15, 2020

Conversation

DiegoPino
Copy link
Member

See #74

What is this?

Some JS magic to deal with missing/partial/missunderstood Manifests. It does the following

  • If service level is > 0 (means we have an info.json), append the get arguments to it (?page=1)
  • If width/height is present but level == 0 (like static image or one we want o set because we are like that) then use the Canvas width/height ratio to calculate the missing one. (either height or width)
  • If service level == 0 don't even bother trying to figure out an .info.json and in the worst possible condition just use the generic 3/4 ration and console it out so the webmaster/admin/can have nightmares and fix its Twig Template.

Gosh! @giancarlobi i know you out but someone needs to see this even if in 2 days. @alliomeria i need to introduce you IIIF Manifests sooner than later.

In conclusion. This allows Bookreader to display individual pages for PDFs without any issue, even if we don't want to fake the size

I think a lot of folks have missread the IIIF API Presentation V2.1 specs. Canvas width and height are there for aspect ration. Means we can deduce one of the missing dimensions of a resource based on that. I will try to do that. This is all for LEVEL0 service (no info.json)
I wish i knew how to document this!
@DiegoPino DiegoPino self-assigned this Jul 15, 2020
@DiegoPino DiegoPino added enhancement New feature or request IIIF Specs/Manifests/Implementations Javascript Favourite language of a PHP developer Twig Twig template processing labels Jul 15, 2020
@DiegoPino DiegoPino added this to the 1.0.0-beta3 milestone Jul 15, 2020
@DiegoPino
Copy link
Member Author

Merging folks. No time to loose. Also going to bed. Have been up more than it's legal 😴

@DiegoPino DiegoPino merged commit 7282a3b into 8.x-1.0-beta3 Jul 15, 2020
@DiegoPino DiegoPino deleted the ISSUE-74b branch July 15, 2020 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request IIIF Specs/Manifests/Implementations Javascript Favourite language of a PHP developer Twig Twig template processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant