ViewResult

ViewResult data structure returned by Document View API working-with-viewer-api as output result

ViewResult example

{
  "pages": [
    {
      "number": 1,
      "resources": [],
      "path": "viewer/words/docx/four-pages_docx/p1.html",
      "downloadUrl": "https://api.groupdocs.cloud/v2.0/viewer/storage/file/viewer/words/docx/four-pages_docx/p1.html"
    },
    {
      "number": 2,
      "resources": [],
      "path": "viewer/words/docx/four-pages_docx/p2.html",
      "downloadUrl": "https://api.groupdocs.cloud/v2.0/viewer/storage/file/viewer/words/docx/four-pages_docx/p2.html"
    },
    {
      "number": 3,
      "resources": [],
      "path": "viewer/words/docx/four-pages_docx/p3.html",
      "downloadUrl": "https://api.groupdocs.cloud/v2.0/viewer/storage/file/viewer/words/docx/four-pages_docx/p3.html"
    },
    {
      "number": 4,
      "resources": [],
      "path": "viewer/words/docx/four-pages_docx/p4.html",
      "downloadUrl": "https://api.groupdocs.cloud/v2.0/viewer/storage/file/viewer/words/docx/four-pages_docx/p4.html"
    }
  ],
  "attachments": [],
  "file": null
}

ViewResult fields

NameDescription
pagesList of document pages
page.numberPage number, starts from 1
page.resourcesPage resources. Returned if HTML view format requested with ExternalResources option set to true
page.pathPage file path in the cloud storage. Use this value to download page using File API
page.downloadUrlPage file direct download link (Requires Authorization).
attachmentsList of document attachments
filePDF file path. Returned instead of pages, if PDF view format requested