PDF viewer confusion

I have uploaded an PDF as media with an item. This PDF as media is viewable in a PDF viewer via Stadsrekeningen_toegangsnummer0001_invnr1141.pdf · Data · Gouda Tijdmachine

But in the item SAMH 0001.1141 Rekeningen van inkomsten en uitgaven van de tresoriers respectievelijk tresorier-ontvanger(s) over de jaren 1437 - 1815, 1477 en 1e kwartaal 1478 · Data · Gouda Tijdmachine, the PDF is shown as images in Universal Viewer - this is not what I want, but I can’t figure out why this is happening and what configuration to change - or modules which are competing.

I am now able to get an pdf viewer (by adding Viewer JS as shown below and as module), but the universal viewer (showing images of the pdf) is also still shown, see example

I have configured my resource pages as follows:

image

How can I tell the Universal Viewer module it should not render PDF files?

I wish you could add some render logic to Regions (e.g. if item has PDF then just use Viewer JS and not Universal Viewer, but use Universal Viewer if item only has IIIF image)…but I don’t think you can. If you just want to hide the universal viewer (and don’t mind that it still loads in memory), you can use CSS, like:

iframe + .universal-viewer {display:none;}

Not at all pretty, but might work for you.

I’ve worked with other systems that have a global setting that allows you to set the default file viewer based on extensions but also lets you override that at the individual file level so you can choose a viewer. I’m not aware of a similar feature in Omeka S, but it would be nice.