Skip to main content

PDF

Element type: Dictionary

Availability: 2.0.6+
This component wil display a PDF document for the given URL (online or local).

Keys

NameTypePossible valuesRequired
TypeStringPDFRequired
URLString-Required
LinksAreEnabledBoolean-
MarginsDictionary (Margins)-
BorderDictionary (Border)-
Condition PRODictionary (Condition)-

Detail

Type Required

Type: String
Explanation: The type of the component which has to be PDF.

URL Required

Type: String
Explanation: The URL of the PDF document to display. Can be local or online.

LinksAreEnabled

Type: Boolean
Default: false
Explanation: If true, the link annotations in the PDF will be deactivated, preventing the user to open the URL and leave the app.

info

The plain URLs are automatically detected by the sytem, which will offer to preview and then open them. This behaviour could not be prevented so be careful with plain URLs in the PDF document if the user should not leave Octory.

Margins

Type: Dictionary (Margins)
Explanation: Add padding to the component's sides.

Border

Type: Dictionary (Border)
Explanation: Add a top or bottom border to a component.

Condition PRO

Type: Dictionary (Condition)
Explanation: Allows to hide or show the component using a boolean expression.

Example

Using an online PDF.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<key>Slides</key>
<array>
<dict>
<key>Containers</key>
<array>
<dict>
<key>Components</key>
<array>
<dict>
<key>Type</key>
<string>PDF</string>
<key>URL</key>
<string>https://www.octory.io/terms-and-conditions.pdf</string>
</dict>
</array>
</dict>
</array>
</dict>
</array>
<!-- ... -->
</dict>
</plist>

Locale PDF with a variable Docs in its URL. For instance, Docs could be /Users/jappleseed/Application Support/Octory/Resources/Docs. The links are enabled.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<key>Slides</key>
<array>
<dict>
<key>Containers</key>
<array>
<dict>
<key>Components</key>
<array>
<dict>
<key>Type</key>
<string>Image</string>
<key>URL</key>
<string>${Docs}/welcome.pdf</string>
<key>LinksAreEnabled</key>
<true/>
</dict>
</array>
</dict>
</array>
</dict>
</array>
<!-- ... -->
</dict>
</plist>