RenderOptions

RenderOptions data structure used as part of ViewOptions data structure.

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

RenderOptions example

 {
    "StartPageNumber": 0,
    "CountPagesToRender": 0,
    "PagesToRender": [
      0
    ],
    "PageRotations": [
      {
        "PageNumber": 0,
        "RotationAngle": "On90Degree"
      }
    ],
    "DefaultFontName": "string",
    "DefaultEncoding": "string",
    "DetectEncoding": true,
    "RenderComments": true,
    "RenderNotes": true,
    "RenderHiddenPages": true,
    "SpreadsheetOptions": {
      "PaginateSheets": true,
      "CountRowsPerPage": 0,
      "CountColumnsPerPage": 0,
      "RenderGridLines": true,
      "RenderEmptyRows": true,
      "RenderEmptyColumns": true,
      "RenderHiddenRows": true,
      "RenderHiddenColumns": true,
      "RenderHeadings": true,
      "RenderPrintAreaOnly": true,
      "TextOverflowMode": "Overlay"
    },
    "CadOptions": {
      "ScaleFactor": 0,
      "Width": 0,
      "Height": 0,
      "Tiles": [
        {
          "StartPointX": 0,
          "StartPointY": 0,
          "Width": 0,
          "Height": 0
        }
      ],
      "RenderLayouts": true,
      "LayoutName": "string",
      "Layers": [
        "string"
      ]
    },
    "EmailOptions": {
      "PageSize": "Unspecified",
      "FieldLabels": [
        {
          "Field": "string",
          "Label": "string"
        }
      ],
      "DateTimeFormat": "string",
      "TimeZoneOffset": "string"
    },
    "ProjectManagementOptions": {
      "PageSize": "Unspecified",
      "TimeUnit": "Unspecified",
      "StartDate": "2024-03-25T06:24:32.674Z",
      "EndDate": "2024-03-25T06:24:32.674Z"
    },
    "PdfDocumentOptions": {
      "DisableCharsGrouping": true,
      "EnableLayeredRendering": true,
      "EnableFontHinting": true,
      "RenderOriginalPageSize": true,
      "ImageQuality": "Low",
      "RenderTextAsImage": true,
      "FixedLayout": true,
      "WrapImagesInSvg": true,
      "DisableFontLicenseVerifications": true
    },
    "WordProcessingOptions": {
      "RenderTrackedChanges": true,
      "LeftMargin": 0,
      "RightMargin": 0,
      "TopMargin": 0,
      "BottomMargin": 0
    },
    "OutlookOptions": {
      "Folder": "string",
      "TextFilter": "string",
      "AddressFilter": "string",
      "MaxItemsInFolder": 0
    },
    "ArchiveOptions": {
      "Folder": "string",
      "FileName": "string",
      "ItemsPerPage": 0
    },
    "TextOptions": {
      "MaxCharsPerRow": 0,
      "MaxRowsPerPage": 0
    },
    "MailStorageOptions": {
      "TextFilter": "string",
      "AddressFilter": "string",
      "MaxItems": 0
    },
    "VisioRenderingOptions": {
      "RenderFiguresOnly": true,
      "FigureWidth": 0
    },
    "WebDocumentOptions": {
      "PageSize": "Unspecified",
      "LeftMargin": 0,
      "RightMargin": 0,
      "TopMargin": 0,
      "BottomMargin": 0
    }
  }

RenderOptions fields

NameDescription
StartPageNumberPage number, from which to start rendering. Rendering starts from first page by default.
CountPagesToRenderNumber of pages to render. All document pages rendered by default (or rest of pages, if StartPageNumber provided).
DefaultFontNameThe name of the default font. Default font name may be specified in following cases: You want to generally specify the default font to fall back on, if particular font in the document cannot be found during rendering. Your document uses fonts, that contain non-English characters and you want to make sure any missing font is replaced with one that has the same character set available.
DefaultEncodingDocument encoding
RenderCommentsIndicates whether to render comments.
RenderHiddenPagesIndicates whether hidden pages should be rendered.
SpreadsheetOptions.PaginateSheetsEnables worksheets pagination. By default one worksheet is rendered into one page.
SpreadsheetOptions.CountRowsPerPageThe number of rows rendered into one page when PaginateSheets = true. Default value is 50.
SpreadsheetOptions.RenderGridLinesIndicates whether to render grid lines.
SpreadsheetOptions.RenderEmptyRowsIndicates whether empty rows should be rendered.
SpreadsheetOptions.RenderEmptyColumnsIndicates whether empty columns should be rendered.
SpreadsheetOptions.RenderHiddenRowsEnables rendering of hidden rows.
SpreadsheetOptions.RenderHiddenColumnsEnables rendering of hidden columns.
SpreadsheetOptions.RenderPrintAreaOnlyEnables rendering worksheet(s) sections which is defined as print area. Renders each print area in a worksheet as a separate page.
CadOptions.ScaleFactorThe scale factor affects the size of an output document.
CadOptions.WidthThe width of the render result in pixels.
CadOptions.HeightThe height of the render result in pixels.
EmailOptions.PageSizeThe size of the output page when rendering as PDF or image.Supported values {Unknown,Letter,Ledger,A0,A1,A2,A3}: 1. Unknown - the default, unspecified page size. 2. Letter - the size of the Letter page in points is 792x612.3. Ledger - the size of the Letter page in points is 1224x792. 4. A0 - the size of the A0 page in points is 3371x2384. 5. A1 - the size of the A1 page in points is 2384x1685. 6. A2 - the size of the A2 page in points is 1684x1190. 7. A3 - the size of the A3 page in points is 1190x842. 8. A4 - the size of the A4 page in points is 842x595.
EmailOptions.FieldLabelsThe list of supported email message field labels.
EmailOptions.DateTimeFormatTime Format (can be include TimeZone) for example: ‘MM d yyyy HH:mm tt’, if not set - current system format is used.
EmailOptions.TimeZoneOffsetMessage time zone offset. Format should be compatible with .net TimeSpan
ProjectManagementOptions.PageSizeThe size of the page. Supported values {Unknown,Letter,A0,A1,A2,A3}: 1. Unknown - the default, unspecified page size. 2. Letter - the size of the Letter page in points is 792 × 612. 3. Ledger - the size of the Letter page in points is 1224 × 792. 4. A0 - the size of the A0 page in points is 3371 × 2384. 5. A1 - the size of the A1 page in points is 2384 × 1685. 6. A2 - the size of the A2 page in points is 1684 × 1190. 7. A3 - the size of the A3 page in points is 1190 × 842. 8. A4 - the size of the A4 page in points is 842 × 595.
ProjectManagementOptions.TimeUnitThe time unit to use as minimal point. Supported values {Unknown,Days,ThirdsOfMonths,Months}: 1. Unknown - unknown, unspecified time scale. 2. Days - one day interval. 3. ThirdsOfMonths - one third of the month. 4. Months - one month interval.
ProjectManagementOptions.StartDateThe start date of a Gantt Chart View to render.
ProjectManagementOptions.EndDateThe end date of a Gantt Chart View to render.
PdfDocumentOptions.DisableCharsGroupingDisables chars grouping to keep maximum precision during chars positioning when rendering the page.
PdfDocumentOptions.EnableLayeredRenderingEnables rendering of text and graphics according to z-order in original PDF document when rendering into HTML.
PdfDocumentOptions.EnableFontHintingEnables font hinting. The font hinting adjusts the display of an outline font. Supported only for TTF fonts when these fonts are used in source document.
PdfDocumentOptions.RenderOriginalPageSizeWhen this option enabled the output pages will have the same size in pixels as page size in a source PDF document. By default GroupDocs.Viewer calculates output image page size for better rendering quality. This option is supported when rendering into PNG or JPG formats.
PdfDocumentOptions.ImageQualitySpecifies output image quality for image resources when rendering into HTML. The default value is Low.
PdfDocumentOptions.RenderTextAsImageWhen this option is set to true, the text is rendered as an image in the output HTML. Enable this option to make text unselectable or to fix characters rendering and make HTML look like PDF. The default value is false. This option is supported when rendering into HTML.
PdfDocumentOptions.FixedLayoutEnables rendering the PDF and EPUB documents to HTML with a fixed layout.
PdfDocumentOptions.WrapImagesInSvgEnables wrapping each image in the output HTML document in SVG tag to improve the output quality.
PdfDocumentOptions.DisableFontLicenseVerificationsDisables any license restrictions for all fonts in the current XPS/OXPS document.
WordProcessingOptions.RenderTrackedChangesEnables tracked changes (revisions) rendering.
WordProcessingOptions.LeftMarginLeft page margin (for HTML rendering only).
WordProcessingOptions.RightMarginRight page margin (for HTML rendering only).
WordProcessingOptions.TopMarginTop page margin (for HTML rendering only).
WordProcessingOptions.BottomMarginBottom page margin (for HTML rendering only).
OutlookOptions.FolderThe name of the folder (e.g. Inbox, Sent Item or Deleted Items) to render.
OutlookOptions.TextFilterThe keywords used to filter messages.
OutlookOptions.AddressFilterThe email-address used to filter messages by sender or recipient.
OutlookOptions.MaxItemsInFolderThe maximum number of messages or items, that can be rendered from one folder.
ArchiveOptions.FolderThe folder inside the archive to be rendered.
ArchiveOptions.FileNameThe filename to display in the header. By default the name of the source file is displayed.
ArchiveOptions.ItemsPerPageNumber of records per page (for rendering to HTML only).
TextOptions.MaxCharsPerRowMax chars per row on page. Default value is 85.
TextOptions.MaxRowsPerPageMax rows per page. Default value is 55.
MailStorageOptions.TextFilterThe keywords used to filter messages.
MailStorageOptions.AddressFilterThe email-address used to filter messages by sender or recipient.
MailStorageOptions.MaxItemsThe maximum number of messages or items for render. Default value is 0 - all messages will be rendered.
VisioRenderingOptions.RenderFiguresOnlyRender only Visio figures, not a diagram.
VisioRenderingOptions.FigureWidthFigure width, height will be calculated automatically. Default value is 100.
WebDocumentOptions.PageSizeThe size of the output page. The default value is GroupDocs.Viewer.Options.PageSize.Letter 792 x 612 points. When contents does not fit set a larger page size e.g. GroupDocs.Viewer.Options.PageSize.A3.
WebDocumentOptions.LeftMarginThe distance (in points) between the left edge of the page and the left boundary of the body text. The default value is 5 points.
WebDocumentOptions.RightMarginThe distance (in points) between the right edge of the page and the left boundary of the body text. The default value is 5 points.
WebDocumentOptions.TopMarginThe distance (in points) between the top edge of the page and the left boundary of the body text. The default value is 5 points.
WebDocumentOptions.BottomMarginThe distance (in points) between the bottom edge of the page and the left boundary of the body text. The default value is 5 points.