When combining permissions, they should be separated by comma in string and by bitwise 'or' operator in code (| in C# and OR in VB).
[FlagsAttribute]
public enum DocumentViewerPermissions
<FlagsAttribute>
Public Enumeration DocumentViewerPermissions
Setting document viewer permissions in code:
//allow all set of permissions (default value)
documentViewer.AllowedPermissions = DocumentViewerPermissions.All;
//allow only Download and Print permissions
documentViewer.AllowedPermissions = DocumentViewerPermissions.Download | DocumentViewerPermissions.Print;
//allow all except Download and Print permissions
documentViewer.AllowedPermissions = DocumentViewerPermissions.All;
documentViewer.DeniedPermissions = DocumentViewerPermissions.Download | DocumentViewerPermissions.Print;
'allow all set of permissions (default value)
documentViewer.AllowedPermissions = DocumentViewerPermissions.All
'allow only Download and Print permissions
documentViewer.AllowedPermissions = DocumentViewerPermissions.Download Or DocumentViewerPermissions.Print
'allow all except Download and Print permissions
documentViewer.AllowedPermissions = DocumentViewerPermissions.All
documentViewer.DeniedPermissions = DocumentViewerPermissions.Download Or DocumentViewerPermissions.Print
Setting document viewer permissions in ASPX markup:
<%-- allow all set of permissions (default value) --%>
<GleamTech:DocumentViewerControl runat="server"
Width="800"
Height="600"
Document="~/Documents/Document.docx"
AllowedPermissions="All" />
<%-- allow only Download and Print permissions --%>
<GleamTech:DocumentViewerControl runat="server"
Width="800"
Height="600"
Document="~/Documents/Document.docx"
AllowedPermissions="Download, Print" />
<%-- allow all except Download and Print permissions --%>
<GleamTech:DocumentViewerControl runat="server"
Width="800"
Height="600"
Document="~/Documents/Document.docx"
AllowedPermissions="All"
DeniedPermissions="Download, Print" />
None | None of the permissions (unset). |
Download | Ability to download the original document. Downloading can be disabled for security (DRM) purpose. |
DownloadAsPdf | Ability to download a PDF version of the original document . Downloading as PDF can be disabled for additional security (DRM) purpose. |
Ability to print the displayed document Printing can be disabled for additional security (DRM) purpose. | |
SelectText | Ability to select and copy text in the displayed document Text selection can be disabled for additional security (DRM) purpose. |
NavigatePages | Ability to navigate pages, e.g. next page, previous page and jump to page. |
NavigateHistory | Ability to navigate UI history, e.g. go back and go forward. |
Zoom | Ability to zoom in or out of the document. |
Pan | Ability to pan the document. |
ChangeFitMode | Ability to change fit mode of the document, e.g. fit width and fit page. |
ChangeLayoutMode | Ability to change layout mode of the document, e.g. continuous, facing etc. |
Rotate | Ability to rotate the page or document, e.g. rotate clockwise and rotate counterclockwise. |
Find | Ability to find text (simple search) within the document. |
GoFullScreen | Ability to switch the document viewer to full screen. |
ViewThumbnails | Ability to view thumbnails for the document pages. |
ViewBookmarks | Ability to view bookmarks/outlines of the document. |
Search | Ability to search text (advanced search) within the document. |
ViewAnnotations | Ability to view annotations of the document. |
FillForms | Ability to fill values into form fields of the document. |
ViewAttachments | Ability to view attachments of the document. |
All | All the permissions combined. |