Skip to content

DSpace 7 deployment and environmental variable changes causing PDF page canvases to be incomplete #154

@markpbaggett

Description

@markpbaggett

In order to get DSpace 7 manifests to work again, we changed the valued of IIIF_DSPACE_URL to https://oaktrust.library.tamu.edu/server from https://oaktrust.library.tamu.edu. This was mostly because /rdf was now at /server/rdf

After doing this, an interesting new problem has arisen, but only for PDFs. The dereferenceable Canvas resource returns something like this:

{
  "@id": "https://api.library.tamu.edu/iiif-service/dspace/canvas/1969.1/189387/1/VOL%20003-Number%2027.pdf",
  "@type": "sc:Canvas",
  "height": 0,
  "images": [
    
  ],
  "label": "1VOL 003-Number 27.pdf",
  "width": 0
}

What Should We Do?

Honestly, I think we have two choices here.

  1. We fix the Canvas responses for PDF pages to be like they were before (express the same information that we see for the Canvas in the manifest response. In this case, that would be something like:
{
          "@id": "https://api.library.tamu.edu/iiif-service/dspace/canvas/1969.1/189387/1/VOL%20003-Number%2027.pdf?page=1",
          "@type": "sc:Canvas",
          "height": 1313,
          "images": [
            {
              "@id": "https://api.library.tamu.edu/iiif/2/370c2e81-e129-34bb-8980-e16f3fe45a62;1/info.json",
              "@type": "oa:Annotation",
              "motivation": "sc:painting",
              "on": "https://api.library.tamu.edu/iiif-service/dspace/canvas/1969.1/189387/1/VOL%20003-Number%2027.pdf",
              "resource": {
                "@id": "https://api.library.tamu.edu/iiif/2/370c2e81-e129-34bb-8980-e16f3fe45a62;1/full/full/0/default.jpg",
                "@type": "dctypes:Image",
                "format": "application/pdf;charset=UTF-8",
                "height": 1313,
                "service": {
                  "label": "DSpace IIIF Image Resource Service",
                  "profile": "http://iiif.io/api/image/2/level0.json",
                  "@context": "http://iiif.io/api/image/2/context.json",
                  "@id": "https://api.library.tamu.edu/iiif/2/370c2e81-e129-34bb-8980-e16f3fe45a62;1"
                },
                "width": 825
              }
            }
          ],
          "label": "1VOL 003-Number 27.pdf?page=1",
          "width": 825
        }
  1. We make the canvas responses not dereferenceable. The presentation API does not expect that canvases are dereferenceable, but if they are, a viewer (like Mirador and Clover above) might assume their is additional information in the derefereneable body. Specifically, API docs for 2.0 say:
Canvases may be dereferenced separately from the manifest via their URIs, and the following representation information should be returned. This information should be embedded within the sequence, as per previously.

https://iiif.io/api/presentation/2.0/#canvas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions