Document Viewer

Functional reference for the Document Viewer, including the folder and user group matrix that decides which documents it may show, and the supported settings available in the design environment.

Updated 5 min read
On this page (9 sections)
  1. Functional explanation
  2. Object name
  3. Settings
  4. Which documents can be shown
  5. Where documents come from
  6. Position / Size
  7. Border
  8. Access Control
  9. Visibility

Functional explanation

The Document Viewer shows a document inside a runtime page. The file is requested over an authenticated address, so it stays behind the login and does not have to be published for anonymous access.

The object holds the full path of the file. Which files may be shown is decided in one place, the Document viewer access parameter, where an administrator lists the folders that may be served and the user groups that may see them. A file outside those folders is never served, whoever asks for it.

Use it to put a rendered report, a batch record, a manual or a drawing directly on an operator page.

The following file types are shown: PDF, PNG, JPG, JPEG, GIF, TXT, CSV, XLSX, XLS, DOCX, DOC, PPTX and PPT.

A CSV file is shown as plain text.

XLSX, XLS, DOCX, DOC, PPTX and PPT files are displayed by an Office viewer extension in the browser of the client. On a client without such an extension the browser downloads the file.

Object name

Set the object name shown in the Document Viewer decorator context.

SettingDescriptionExampleUnits
Object NameName used to identify the Document Viewer object.PumpManualViewerText

Settings

Configure which document the frame shows. The frame loads a new document whenever the resolved path changes, so binding Document Path to a variable is all that is needed to switch documents at runtime.

Document Path accepts either a full path or the name of a variable. When the value is the name of a variable, the value of that variable is used as the path. A client variable is the usual choice, so the operator can select what the frame shows through a button, a drop down or an input on the same page. A value that contains a space is always used as a path, so a document at D:/Manuals/Pump 1.pdf works as typed.

The Document Path button opens the variable picker, as it does on every setting.

SettingDescriptionExampleUnits
Document PathFull path of the document, or the name of a variable holding one.D:/Reports/Daily_2026-07-28.pdfPath or variable
Show ToolbarShows the viewer toolbar of the browser. This is presentation only and does not restrict what the operator can do with the file.trueBoolean
Status VariableClient variable receiving the state of the frame: ok, nopath when nothing is configured or the bound value is empty, unavailable when the document cannot be shown, and signin when the session has ended. Use it to show a message of your own instead of an empty frame.client.DocumentStatusText

Which documents can be shown

Open Parameters, section Engineering Settings, and complete Document viewer access. Each rule is one folder and the user groups that may see it. A rule covers the folder and everything below it.

The field is empty by default, and while it is empty the Document Viewer shows nothing at all. This is deliberate: the object holds a path, so the list of folders is what keeps that path inside the documents you intended to publish.

RuleResult
D:/Reports = Operators,SupervisorsMembers of Operators and Supervisors see the files in that folder and below it.
D:/Manuals =Every logged in user group sees the files in that folder and below it.
D:/Reports/Batch = SupervisorsTogether with the first rule, only Supervisors see the Batch sub folder, while Operators keep the rest.

Leave the user groups of a rule empty to allow every user group. When several rules match, the most specific folder decides, so a rule on a sub folder can be stricter than the rule on its parent folder. Guests never have access. Administrators are not exempt either: an administrator who needs another folder adds it to the list, where everyone can read it.

Where documents come from

Any folder works, as long as it is listed in Document viewer access and the server can reach it. A folder on the server, a folder on another drive, or a network share are all valid.

For rendered reports, list the folder configured as Output to on the report itself. The report writes a new file for every run, named after the report and the period start date, so the file name of a specific run is what goes in Document Path.

Files are read where they are. On a redundant system the two nodes serve their own copies, so use a shared network folder when both nodes have to show the same documents.

Position / Size

Configure the position and size of the Document Viewer object.

SettingDescriptionExampleUnits
TopTop position of the object.100px
LeftLeft position of the object.220px
WidthWidth of the object.600px
HeightHeight of the object.800px
Z-indexLayer order of the object. Higher values appear in front of lower values.10Number

Border

Configure the border drawn around the Document Viewer object.

SettingDescriptionExampleUnits
Border ColorBorder color of the object.#355B8DColor
Border Color StatesColor states evaluated at runtime to color the border.PLC1.ReportReady == 1 : #2E7D32Expression
Border WidthWidth of the border. Default 1.1px
Border RadiusCorner radius of the border. Default 5.5px
Border VisibilityExpression controlling whether the border is drawn.PLC1.ReportReadyExpression
Border BlinkExpression or boolean controlling border blinking.PLC1.ReportFailedBoolean or expression
Border Blink SpeedBlink speed used during runtime.500ms
Border Blink OffsetBlink offset used to stagger blinking between objects.falseBoolean

Access Control

Configure access control for the Document Viewer object. This decides whether the object is shown on the page for a user group. The Document viewer access parameter decides whether the server hands out the file, and applies on top of it.

SettingDescriptionExampleUnits
Access Control EnableEnables access control evaluation for the object.trueBoolean
Access ControlExpression controlling who can use or see the object.SYSTEM.UserGroups == "Operators"Expression
Access Control FilterCSS filter applied when access control is used to alter the object appearance.blur(0px) contrast(30%)CSS filter

Visibility

Configure the runtime visibility and blinking behavior for the Document Viewer object.

SettingDescriptionExampleUnits
VisibilityExpression controlling whether the object is visible.PLC1.ShowReportExpression
BlinkExpression or boolean controlling frame blinking.PLC1.NewReportAvailableBoolean or expression
Blink SpeedBlink speed used during runtime.500ms
Blink OffsetBlink offset used to stagger blinking between objects.falseBoolean
Something missing or wrong in this article? Contact us