Document Media Entity PDF.js Viewer Display Mode

Created on 7 June 2023, over 1 year ago
Updated 4 September 2024, 15 days ago

From @Rosie Le Faive

Here's an example of how I would like to be able to use recipes. It's based on Islandora (and there are several other things we'd want to do but this is the starting point that seems to make sense as a generic recipe sharable with the rest of the Drupal community)

Example recipe for PDFs in an Islandora Site

  1. Require the PDF module , which provides a viewer (field formatter).
  2. Ensure “Document” media type exists. If not, get it from (standard install profile?)
  3. Ensure that ‘pdf’ is an allowed extension on the field config of field_media_document on the “Document” media type, and if not, add it to the existing list of extensions.
  4. Create a view mode for Media called “PDFjs” if it doesn't exist.
  5. Set the Document media type to use “Custom Display Settings” for the “PDFjs” view mode.
  6. Set the Document Media type’s display settings for the PDFjs view mode. Set it to display only the field_media_document field, and to display it using the “PDFjs: Default Viewer” formatter.
Feature request
Status

Closed: won't fix

Version

11.0

Component

Code

Created by

🇺🇸United States thejimbirch Cape Cod, Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024