ViewOptions

ViewOptions data structure used as input parameters for Document Info working-with-viewer-api API and Document View working-with-viewer-api API.

Note
Not all options are supported by all document formats. Each option may correspond to one or more formats.

ViewOptions example

{
  "ViewFormat": "HTML",
  "FileInfo": {
    "FilePath": "string",
    "StorageName": "string",
    "VersionId": "string",
    "Password": "string"
  },
  "OutputPath": "string",
  "FontsPath": "string",
  "Watermark": {
    "Text": "string",
    "Color": "string",
    "Position": "string",
    "Size": 0
  },
  "RenderOptions": {
    "StartPageNumber": 0,
    "CountPagesToRender": 0,
	"ExternalResources": false,
	"ExtractText": false,
  }
}

ViewOptions fields

NameDescriptionAPI Version
ViewFormatAllows to set rendering format, available values are: HTML, JPG, PNG, PDF. Default value is “HTML”.
FileInfo.FilePathThe path of the document, located in the storage. Required.
FileInfo.StorageNameStorage name
FileInfo.VersionIdFile version Id
FileInfo.PasswordPassword for rendering password-protected documents
OutputPathThe output path for results. Default value is ‘viewer{input file path}_{file extension}'v19.4
FontsPathPath of the folder, containing fonts, used for documents rendering.
Watermark.TextThe watermark text.
Watermark.ColorThe watermark color. Supported formats “Magenta”, “(112,222,11)”, “(50,112,222,11)”. Default value is “Red”.
Watermark.PositionThe watermark position. Supported positions “Diagonal”, “TopLeft”, “TopCenter”, “TopRight”, “BottomLeft”, “BottomCenter” and “BottomRight”. Default value is “Diagonal”.
Watermark.SizeWatermark size in percents. Default value is 100.
RenderOptionsRenderOptionsin case of ViewFormat # PDF, HtmlOptions in case of ViewFormat # HTML, ImageOptionsin case of ViewFormat # PNG or JPG