After version 0.21.5

Hi @WR276, welcome to our community and sorry for the late answer! We have some explanation for that.

Before version 0.21.5, Tainacan always rendered PDF files in-browser using a third party JavaScript library: PDF.js - Home

Sadly, a couple months ago we got our plugin blocked in the WordPress repository due to a security breach that was originated in this library scripts. The security issue itself was fixed in more recent versions of the library, but in those versions they changed their build process, with changes that made impossible for us to adjust the mechanism used for finding PDF files that were attached to private items.

After a long debate around, we agreed to remove that library and leave the PDF rendering under the responsability of the Browser itself. Years ago, when we started Tainacan, this was really hard but today, most modern browsers do provide their built-in PDF readers. The greater exception to that are Mobile Browsers, because they favor dowloading the file for obtaining a better experience with native mobile PDF readers.

So if you’re trying to visualize PDF files in a desktop browser, possibly updating it will be enough (unless we’re talking Internet Explorer, in this case there would be even larger issues from us and other WordPress-related stuff).

If you’re trying to open PDF files in a smartphone, that is just the way most browsers prefer the experience, and we’re kinda dealing with that as a balanced way to keep things working and safe. Keep in mind that even with a build–in PDF library, you are downloading the file before visualizing it, things are just going to another folder in your system.

Hope this clarifies things :slight_smile: