Skip to main content

11 - Documents and PDF files

Iris treats documents as media in their own right: they have a thumbnail, a description, a download counter, and a neat presentation on the site.

Thumbnails

Each document carries a sheet coloured by its family (text, spreadsheet, presentation, PDF, archive…), with its extension: you recognise them at a glance. A PDF also gets a real thumbnail of its first page, if the server has Imagick and Ghostscript. From Iris 3.0.210, this thumbnail is a WebP when the server can write one, a JPEG otherwise. On the site, the label of Word documents is always blue, whatever the site's main colour. The server status shows in Options → Formats, PDF thumbnails: you know straight away whether it is possible, and if not, what to ask your host.

On the site

A document inserted or shown in a gallery announces its format and size before anyone clicks, and offers Open and Download. Four layouts: Tiles, Image on the left, Image on top, Compact list. A single document takes half the width; the Layout of an inserted document setting sets the default layout.

In a gallery, from Iris 3.0.210: in Tiles, the buttons sit under the text, side by side, and the button simply says Download, without the file name. A link text you typed yourself is kept.

Posters (large preview) (3.0.302): a layout for posters to print. The first page of each PDF shows large, in portrait, and opens in the viewer: you read the poster before downloading it. It can be chosen for a gallery, in the Iris Galleries module, or for a document inserted on its own.

Downloads

Every download from the site is counted. The number shows in the document's details, and, if you wish, under the document on the site.

The digital fingerprint (SHA-256)

What it is. The fingerprint is a string of 64 digits and letters calculated from the exact content of a file. Two identical files have the same fingerprint; change a single comma in the document and the fingerprint changes completely. Iris uses the SHA-256 algorithm, the most common today.

What it is for. Shown under the document, it lets anyone check that the downloaded file is exactly the one the site published, untouched. It is useful for any document that is legally binding: a council's decisions and bylaws, rules, articles of association, terms and conditions, a price list.

Turning it on. It is off by default.

  • In a gallery: gallery settings, Documents, SHA-256 fingerprint set to Yes. The Iris Galleries module can keep the gallery's choice or override it.
  • For a document inserted on its own in an article: Iris Options, In Joomla tab, Fingerprint of an inserted document set to Yes. The setting applies to the whole site.

On the site, the line SHA-256 fingerprint: followed by the 64 characters appears under the document's format and size.

Checking a downloaded document. Compare the fingerprint shown on the site with the one calculated on your computer. They must match character for character (upper and lower case do not matter).

  • On Windows, in PowerShell: Get-FileHash .\file-name.pdf (SHA-256 is the default algorithm).
  • On macOS or Linux, in the Terminal: shasum -a 256 file-name.pdf.

What the fingerprint does not do. Say it clearly to those who read it:

  • It does not tell who wrote or signed the document. Proving the author needs an electronic signature of the PDF, applied before uploading it.
  • It proves that a downloaded file has not changed since it was published. It does not prove that the published file was never replaced: if someone replaces the document on the site, the fingerprint shown changes with it. To keep a record, write the fingerprint down elsewhere when publishing (register, minutes, letter), or have the document timestamped by a trusted service.
  • It encrypts nothing and does not protect the document: it stays readable and downloadable by everyone.

Cost for the site. The fingerprint is calculated once, the first time the document is shown, then kept in media/com_iris/empreintes. If the file is replaced (different date or size), it is recalculated. The folder is removed when Iris is uninstalled.

Up to date for Iris 3.0.302. Features added after 3.0.045 show the version that brings them.