Viewer Settings
These are the basic user interface settings of the viewer. They decide how the viewer renders client side. These settings can either be set server side and then serialized to a JSON object and sent to the client. Or you can create a JSON object and provide these settings to the client side viewer instance.
- ViewerSettings
- PageSettings
- ThumbSettings
- ZoomSettings
- SearchSettings
- MenuSettings
ViewerSettings
ShowThumbs = true;
ShowToolbar = true;
ShowToolTip = true;
ShowHyperlinks = true;
ShowTexts = true;
DebugMode = false;
IsMobile = false;
LargeDoc = true;
Format = string.Empty;
BasePath = string.Empty;
ResPath = "unoViewer";
LangFile = "lang.json";
PageSettings = new PageSettings();
ThumbSettings = new ThumbSettings();
ZoomSettings = new ZoomSettings();
MenuSettings = new MenuSettings();
SearchSettings = new SearchSettings();
ShowThumbs |
boolean |
Specify if the viewer should show thumbnail panel on left or not. The default value is true. |
ShowToolbar |
boolean |
Specify if the viewer should show a toolbar or not. The default value is true. |
ShowToolTip |
boolean |
Specify if the viewer should show a tooltip on page and thumbnail or not. The default value is true. |
ShowHyperlinks |
boolean |
Specify if the viewer should render clickable hyperlinks or not. Available for PDF format only. The default value is true. |
ShowTexts |
boolean |
Specify if the viewer should render selectable text sections or not. Available for PDF format only. The default value is true. |
DebugMode |
boolean |
When set to true the viewer will display detailed error log. The default value is false. |
IsMobile |
boolean |
Specify if the viewer will be used exclusively for mobile device. The default value is false. |
LargeDoc |
boolean |
When set as true the viewer will render the UI in chunks. The default value is true. |
Format |
string |
This the image format decided by server code. The default value is PNG. |
BasePath |
string |
This is the path of the app deployment. Set this value if your app is deployed to some custom path. The default value is "". |
ResPath |
string |
This is the name of unoViewer resources folder. The default value is "unoViewer". |
LangFile |
string |
This is the default language file name. The default value is "lang.json". |
PageSettings
AutoFitPage = true;
AutoFocusPage = true;
AutoLoadPages = false;
FitType = FitTypeEnum.width.ToString();
ShowPageBusy = false;
PageBusyOpacity = 0.5f;
PageLayout = PageLayoutEnum.multiplePages.ToString();
PageMode = PageModeEnum.pan.ToString();
ShowPageStatus = true;
PageStatusLocation = PageStatusLocationEnum.bottom_right.ToString();
AutoCopyText = true;
CopyTextColor = "green";
SelectTextColor = "skyblue";
AutoFitPage |
boolean |
Specify if the viewer should show refit the page when browser window is resized. The default value is true. |
AutoFocusPage |
boolean |
When set to true the viewer will focus the current page after any zoom action. The default value is true. |
AutoLoadPages |
boolean |
Specify if the viewer should keep loading subsequent pages automatically. The default value is false. |
FitType |
string |
Set the page fit type. Options are "width", "height" and "". The default value is "width". |
ShowPageBusy |
boolean |
When set to true the viewer will show a processing indication when busy with some action. The default value is false. |
PageBusyOpacity |
float |
The opacity of the processing animation. The default value is 0.5f. |
PageLayout |
string |
The default page layout. Options are "singlePage" and "multiplePages". The default value is "singlePage". |
PageMode |
string |
It is the current state of page interaction. Options are "pan" and "select". The default value is "pan". |
ShowPageStatus |
boolean |
Specify if the viewer should show a status on page regarding the current page number. The default value is true. |
PageStatusLocation |
string |
Specify the location of page status indicator. Options are "top_left", "top_right", "bottom_left" and "bottom_right" The default value is "bottom_right". |
AutoCopyText |
boolean |
When set to true the viewer will automatically copy the selected text to clipboard. The default value is true. |
CopyTextColor |
boolean |
Specify the color indication of the copied text. The default value is "green". |
SelectTextColor |
boolean |
Specify the color indication of the selected text. The default value is "skyblue". |
ThumbSettings
AutoFocusThumb = true;
ShowThumbsToolbar = true;
ShowThumbsLabel = true;
ThumbWidth = 180;
ThumbImageQuality = 20;
ThumbFixedZoom = true;
AutoFocusThumb |
boolean |
When set to true the viewer will focus the current page's thumbnail. The default value is true. |
ShowThumbsToolbar |
boolean |
Specify if the viewer should the thumb area toolbar. The default value is true. |
ShowThumbsLabel |
boolean |
Specify if the viewer should show a page index below each thumbnail. The default value is true. |
ThumbWidth |
integer |
Specify the default thumb width. Height is calculated automatically. The default value is 180. |
ThumbImageQuality |
integer |
Specify the quality / resolution of the thumbnail image. The default value is 20. |
ThumbFixedZoom |
boolean |
When set the true the thumbnail image is rendered just once from the server. The default value is true. |
ZoomSettings
MouseWheelZoom = true;
PageZoom = 50;
ZoomStep = 10;
MaxZoom = 200;
MinZoom = 20;
FixedZoom = true;
FixedZoomPercent = 100;
FixedZoomPercentMobile = 75;
MouseWheelZoom |
boolean |
When set to true the viewer zoom in or out with ALT + Mouse Wheel. The default value is true. |
PageZoom |
boolean |
Specify the intial zoom value when the viewer loads. The default value is 50. |
ZoomStep |
boolean |
The incremental or decremental step of the zoom value. The default value is 10. |
MaxZoom |
integer |
Maximum allowed value for the zoom. The default value is 200. |
MinZoom |
integer |
Minimum allowed value for the zoom. The default value is 20. |
FixedZoom |
boolean |
When set the true the page image is rendered just once from the server. The default value is true. |
FixedZoomPercent |
integer |
Specify the zoom value hence the page resolution of the rendered image. The default value is 100. |
FixedZoomPercentMobile |
integer |
Specify the zoom value hence the page resolution of the rendered image for mobile devices. The default value is 75. |
SearchSettings
ActiveColor = "red";
BorderStyle = "2px dashed black";
BackColor = "yellow";
ActiveColor |
string |
The color of the focussed search keyword. The default value is "red". |
BorderStyle |
string |
The border of the page having active search results. The default value is "2px dashed black". |
BackColor |
string |
The background color of the page having active search results. The default value is "yellow". |
ShowIcons = true;
ShowText = true;
File = true;
FileOpen = true;
FileClose = true;
Thumbs = true;
Navigation = true;
ZoomInOut = true;
Page = true;
PageFit = true;
PageLayout = true;
PageZoom = true;
PageMode = true;
Rotate = true;
Flip = true;
Search = true;
FullScreen = true;
Language = true;
Theme = true;
ShowIcons |
boolean |
Show SVG icons in the menu. The default value is true. |
ShowText |
boolean |
Show text along with the icons in the menu. The default value is true. |
File |
boolean |
Show file menu. The default value is true. |
FileOpen |
boolean |
Show file > open menu. The default value is true. |
FileClose |
boolean |
Show file > close menu. The default value is true. |
Thumbs |
boolean |
Show thumbnail menu. The default value is true. |
Navigation |
boolean |
Show navigation menu. The default value is true. |
ZoomInOut |
boolean |
Show zoom menu. The default value is true. |
Page |
boolean |
Show page menu. The default value is true. |
PageFit |
boolean |
Show page > fit menu. The default value is true. |
PageLayout |
boolean |
Show page > layout menu. The default value is true. |
PageZoom |
boolean |
Show page > zoom menu. The default value is true. |
Rotate |
boolean |
Show page > rotate menu. The default value is true. |
Flip |
boolean |
Show page > flip menu. The default value is true. |
PageMode |
boolean |
Show page mode menu. The default value is true. |
Search |
boolean |
Show search menu. The default value is true. |
FullScreen |
boolean |
Show full screen menu. The default value is true. |
Language |
boolean |
Show language menu. The default value is true. |
Theme |
boolean |
Show theme menu. The default value is true. |