0 Votes

View File Macro

Version 1.1 by Ryan C on 2025/03/06 16:46

The view-file macro displays attachments in a document, in place or as thumbnail and offers a preview.

Limitation: the thumbnail is actually only an icon for now.

Parameters

ParameterDescriptionRequiredDefault
displayKind of display. "button" for a button, "thumbnail" for a thumbnail, "full" to render the document in placenothumbnail (button in inline mode)
nameThe attachment reference to displayif att-filename is not given
pageThe page from where you want the attachments to be displayed. Modifying this parameter will reset the selected file valueno
widthThe width of the view in % or px (e.g. 100%, 100px)no100% for the full view or 100px for the thumbnail
heightThe height of the view in % or px (e.g. 100%, 100px)no1000px for the full view or 100px for the thumbnail
att-filenameAlias of nameIf name is not given

Example Usage

Thumbnails side by side:

#viewFile($name $page $display $width $height) #viewFile($name $page $display $width $height)

Or standalone:

#viewFile($name $page $display $width $height)

In a paragraph: #viewFile($name $page $display $width $height)

Full PDF:

#viewFile($name $page $display $width $height)

Full Presentation:

#viewFile($name $page $display $width $height)