scientist-softserv / iiif_print

A gem for Hyrax/Samvera for displaying PDF pages in a IIIF Compliant viewer
Apache License 2.0
4 stars 1 forks source link

🐛 IiifPrint does not split or create relationships #343

Closed laritakr closed 3 months ago

laritakr commented 6 months ago

IiifPrint is not splitting appropriately. The purpose of this ticket is to handle PDFs appropriately.

Ref https://github.com/scientist-softserv/iiif_print/issues/341

Acceptance Criteria

On a properly configured tenant & work,

laritakr commented 6 months ago

Currently blocked by https://github.com/samvera/hyku/issues/2177

ShanaLMoore commented 4 months ago

TODO: LaRita may have a branch to merge, that also updates iiif print to these changes. cc @laritakr

i343-iiif-print-valkyrization

https://github.com/samvera/hyku/pull/2187/files

jillpe commented 4 months ago

Blocked: Waiting to be updated in hyku

laritakr commented 4 months ago

https://github.com/samvera/hyku/pull/2210

ShanaLMoore commented 3 months ago

QA RESULTS: BLOCKED

Pals knapsack importer is not working.

I first uploaded a csv that were missing headers and the errors did not get reported.

Sample CSV (missing headers) - i347-qa-error.zip

perhaps #status_info needs to be updated to #set_status_info

    def valid_import?
      missing_fields_by_model = records.each_with_object({}) do |record, hash|
        record.compact!
        record.transform_keys!(&:downcase).transform_keys!(&:to_sym)
        missing_fields = missing_fields_for(record)
        hash[record[:model]] = missing_fields if missing_fields.present?
      end

      raise_error_for_missing_fields(missing_fields_by_model) if missing_fields_by_model.keys.present?

      file_paths.is_a?(Array)
    rescue StandardError => e
      importer.set_status_info(e)
      false
    end

After that, I corrected the headers and imported, but get a NoMethodError:

find is returning false

Sample CSV:

image

image

ShanaLMoore commented 3 months ago

QA RESULTS: PASS ✅

Tested on HYKU STAGING

I manually imported a multi page pdf. Set the feature flag to use UV instead of PDF.js. It correctly split the PDF:

Image