Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

DynaPDF.SetViewerPreferences

Sets viewer preferences.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.SetViewerPreferences"; PDF; Value { ; AddVal } )   More

Parameters

Parameter Description Example Flags
PDF The PDF reference returned from DynaPDF.New. $pdf
Value The preference to set.
Can be number value or list of names.
"HideToolBar, HideMenuBar"
AddVal Additional value for the preference. Optional

Result

Returns OK or error.

Description

Sets viewer preferences.
This controls certain features in PDF viewers, such as hiding the toolbar or menu bar.
The parameters Value and AddVal are both bitmasks or lists. Multiple values can be set by using a Math.BitwiseOR. It is also possible to call the function multiple times to set each preference separately; the flags are combined with already existing one in this case. Already defined flags can be deleted with the flag UseNone (0). A few flags require an additional parameter that must be added to AddVal.
See DynaPDF help for possible values.

See also SetViewerPreferences function in DynaPDF manual.

Examples

Remove toolbar:

MBS( "DynaPDF.SetViewerPreferences"; $PDF; "HideToolBar" )

The document title must be displayed for PDF/UA

Set Variable [ $r ; Value: MBS("DynaPDF.SetViewerPreferences"; $pdf; "DisplayDocTitle"; "None") ]

See also

Release notes

Example Databases

Blog Entries

This function checks for a license.

Created 19th March 2019, last changed 10th March 2023


DynaPDF.SetUserUnit - DynaPDF.SetWMFDefExtent