Rendering Document Pages

On this page

Note
Note:  The features listed in this page are supported only in GroupDocs.Viewer Cloud V1

This section provides API details to create document pages cache, retrieve pages, modify pages and delete document pages cache.

Get List of Links to Document Pages as HTML

You can retrieve list of links to document pages as HTML. The API returns an object which contains list of links to document pages.

The following GroupDocs.Viewer Cloud REST API resource has been used to get list of links to document pages as HTML.

cURL example

curl -v "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages" \
-X GET \
-H "Content-Type: application/json" \
-H "authorization: Bearer [Access Token]"
{
  "fileName": "one-page.docx",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "resources": [
        {
          "name": "font.woff",
          "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/1/resources/font.woff"
        },
        {
          "name": "styles.css",
          "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/1/resources/styles.css"
        },
        {
          "name": "styles1.css",
          "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/1/resources/styles1.css"
        }
      ],
      "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/1"
    },
    {
      "number": 2,
      "resources": [
        {
          "name": "font.woff",
          "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/2/resources/font.woff"
        },
        {
          "name": "styles.css",
          "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/2/resources/styles.css"
        },
        {
          "name": "styles1.css",
          "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/2/resources/styles1.css"
        }
      ],
      "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/2"
    },
    {
      "number": 3,
      "resources": [
        {
          "name": "font.woff",
          "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/3/resources/font.woff"
        },
        {
          "name": "styles.css",
          "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/3/resources/styles.css"
        },
        {
          "name": "styles1.css",
          "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/3/resources/styles1.css"
        }
      ],
      "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/3"
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Get List of Links to Document Pages as Image

You can retrieve list of links to document pages as images. The API returns an object which contains list of links to document pages as images or ZIP archive with actual pages as image when “application/zip” accept header specified.

The following GroupDocs.Viewer Cloud REST API resource has been used to get list of links to document pages as Image.

cURL example

curl -v "https://api.groupdocs.cloud/v1/viewer/one-page.docx/image/pages" \
-X GET \
-H "Content-Type: application/json" \
-H "authorization: Bearer [Access Token]"
{
  "fileName": "one-page.docx",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/image/pages/1"
    },
    {
      "number": 2,
      "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/image/pages/2"
    },
    {
      "number": 3,
      "url": "https://api.groupdocs.cloud/v1/viewer/one-page.docx/image/pages/3"
    }
  ],
  "url": null
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Download ZIP Archive with Document Pages as HTML

GroupDocs.Viewer Cloud can retrieve ZIP archive of Document pages as HTML. API returns ZIP archive with pages as HTML. Please check ZIP File Structurecommon-resources/zip-file-structure/) for more details.

The following GroupDocs.Viewer Cloud REST API resource has been used to get ZIP archive of document pages as HTML.

cURL example

curl -v "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/zip" \
-X GET \
-H "Content-Type: application/json" \
-H "authorization: Bearer [Access Token]"
ZIP archive with document pages as HTML

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Download ZIP Archive with Document Pages as Image

GroupDocs.Viewer Cloud can retrieve ZIP archive of Document pages as Image. The API returns ZIP archive with pages as Image. Please check ZIP File Structurecommon-resources/zip-file-structure/) for more details.

The following GroupDocs.Viewer Cloud REST API resource has been used to get zip archive of document pages as Image.

cURL example

curl -v "https://api.groupdocs.cloud/v1/viewer/one-page.docx/image/pages/zip" \
-X GET \
-H "Content-Type: application/json" \
-H "authorization: Bearer [Access Token]"
ZIP archive with document pages as Image

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

You can retrieve list of links to document pages of document at provided URL. The API returns an object that contains list of links to document pages as HTML.

The following GroupDocs.Viewer Cloud REST API resource has been used to get list of links to document pages from provided URL as HTML.

cURL example

curl -v "https://api.groupdocs.cloud/v1/viewer/html/pages?url#https%3a%2f%2fwww.dropbox.com%2fs%2fumokluz338w4ng7%2fone-page.docx%3fdl%3d1&embeddedResources#true" \
-X GET \
-H "Content-Type: application/json" \
-H "authorization: Bearer [Access Token]"
{
  "fileName": "one-page.docx",
  "folder": null,
  "pages": [
     {
      "number": 1,
      "resources": [],
      "url": "http://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/1?embedResources#true"
     }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

You can retrieve list of links to document pages of document at provided URL. The API returns an object that contains list of links to document pages as Image.

The following GroupDocs.Viewer Cloud REST API resource has been used to get list of links to document pages from provided URL as Image.

cURL example

curl -v "https://api.groupdocs.cloud/v1/viewer/image/pages?url#https%3a%2f%2fwww.dropbox.com%2fs%2fumokluz338w4ng7%2fone-page.docx%3fdl%3d1" \
-X GET \
-H "Content-Type: application/json" \
-H "authorization: Bearer [Access Token]"
{
  "fileName": "one-page.docx",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "url": "http://api.groupdocs.cloud/v1/viewer/one-page.docx/image/pages/1"
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Download Document Page as HTML

You can download the document page as HTML. The API returns the actual data of document page as HTML.

The following GroupDocs.Viewer Cloud REST API resource has been used to download document page as HTML.

cURL example

curl -v  "https://api.groupdocs.cloud/v1.0/viewer/sample-one-page.docx/html/pages/1?ignoreResourcePathInResources#true&embedResources#true&renderComments#false&renderHiddenPages#true&appsid#XXXX&signature#XXX-XX"
-H "Content-Type: application/json"
-X GET -d "{}"
Contents of page as HTML

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Download Document Page as HTML

Download Document Page as Image

You can download the document page as Image. The API returns the actual data of document page as Image.

The following GroupDocs.Viewer Cloud REST API resource has been used to download document page as Image.

cURL example

curl -v  "https://api.groupdocs.cloud/v1.0/viewer/sample-one-page.docx/image/pages/1?extractText#true&renderComments#false&renderHiddenPages#true&appsid#XXXX&signature#XXX-XX"
-H "Content-Type: application/json"
-X GET -d "{}"
Contents of page as Image

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Create Document Cache as HTML

You can create the document pages as HTML and save them in cache. The API returns object which contains list of links to document pages along with ‘201 Created’ status and if pages already created will be removed from cache.

The following GroupDocs.Viewer Cloud REST API resource has been used to create document cache as HTML.

cURL example

curl -v  "https://api.groupdocs.cloud/v1.0/viewer/sample.docx/html/pages?storage#First%20Storage&appsid#XXXX&signature#XXX-XX"
-H "Content-Type: application/json"
-X POST -d "{'resourcePath': 'page/1/resource/style.css','embedResources': true,'startPageNumber': 1,'countPages': 3,'renderComments': false}"
{
  "fileName": "sample.docx",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "resources": [],
      "url": "http://api.groupdocs.cloud/v1.0/viewer/sample.docx/html/pages/1"
    },
    {
      "number": 2,
      "resources": [],
      "url": "http://api.groupdocs.cloud/v1.0/viewer/sample.docx/html/pages/2"
    },
    {
      "number": 3,
      "resources": [],
      "url": "http://api.groupdocs.cloud/v1.0/viewer/sample.docx/html/pages/3"
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Create Document Cache as Image

You can create the document pages as Images and save them in cache. The API returns object which contains list of links to document pages along with ‘201 Created’ status and if pages already created will be removed from cache.

The following GroupDocs.Viewer Cloud REST API resource has been used to create document cache as Image.

cURL example

curl -v  "https://api.groupdocs.cloud/v1.0/viewer/sample.docx/image/pages?storage#First%20Storage&appsid#XXXX&signature#XXX-XX"
-H "Content-Type: application/json"
-X POST -d "{'resourcePath': 'page/1/resource/style.css','embedResources': true,'startPageNumber': 1,'countPages': 3,'renderComments': false}"
{
 "fileName": "sample.docx",
 "folder": null,
 "pages": [
    {
      "number": 1,
      "url": ""
    },
    {
      "number": 2,
      "url": ""
    },
    {
      "number": 3,
      "url": ""
    }
  ],
  "url": null
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Rendering MS Project Document Pages as HTML

Starting from GroupDocs.Viewer Cloud 18.2 two new options have been added which allows to adjust Page Size and Time Unit when rendering MS Project documents. By default GroupDocs.Viewer API tries to find optimal output size and time unit, depending on the projects overall length, depending on the projects overall length. In case you need to set your own page size or time unit, you can specify ProjectOptions which provides two options PageSize and TimeUnit.  Time unit refers to smallest unit (days, third of a month or month) used in timescale bar, when the TimeUnit “Days” is set you will get the most detailed view of your tasks and opposite, when TimeUnit “Month” is set you will get more general representation of tasks. This example demonstrates how to create pages cache as HTML with provided ProjectOptions.

NOTE: ProjectOptions is supported by all methods which accepts DocumentInfoOptionsImageOptionsHtmlOptions and PdfFileOptions objects.

The following GroupDocs.Viewer Cloud REST API resource has been used to create document cache as HTML.

cURL example

curl -v "https://api.groupdocs.cloud/v1/viewer/sample.mpp/html/pages" \
-X POST \
-H "Content-Type: application/json" \
-d "{"projectOptions": {"pageSize": "A0","timeUnit": "unknown"}}" \
-H "authorization: Bearer [Access Token]"
{
  "fileName": "sample.mpp",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "resources": [],
      "url": "http://api.groupdocs.cloud/v1/viewer/sample.mpp/html/pages/1"
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Rendering MS Project Document Pages as Image

Starting from GroupDocs.Viewer Cloud 18.2 two new options have been added which allows to adjust Page Size and Time Unit when rendering MS Project documents. By default GroupDocs.Viewer API tries to find optimal output size and time unit, depending on the projects overall length, depending on the projects overall length. In case you need to set your own page size or time unit, you can specify ProjectOptions which provides two options PageSize and TimeUnit.  Time unit refers to smallest unit (days, third of a month or month) used in timescale bar, when the TimeUnit “Days” is set you will get the most detailed view of your tasks and opposite, when TimeUnit “Month” is set you will get more general representation of tasks. This example demonstrates how to create pages cache as Image with provided ProjectOptions.

NOTE: ProjectOptions is supported by all methods which accepts DocumentInfoOptionsImageOptionsHtmlOptions and PdfFileOptions objects.

The following GroupDocs.Viewer Cloud REST API resource has been used to create document cache as HTML.

cURL example

curl -v "https://api.groupdocs.cloud/v1/viewer/sample.mpp/image/pages" \
-X POST \
-H "Content-Type: application/json" \
-d "{"projectOptions": {"pageSize": "A0","timeUnit": "unknown"}}" \
-H "authorization: Bearer [Access Token]"
{
  "fileName": "sample.mpp",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "resources": [],
      "url": "http://api.groupdocs.cloud/v1/viewer/sample.mpp/html/pages/1"
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Create Document Cache as HTML from Document in Request Body

You can create the document pages as HTML from document in request body and saves them in cache. The API returns object which contains list of links to document pages along with ‘201 Created’ status and if pages already created will be removed from cache.

The following GroupDocs.Viewer Cloud REST API resource has been used to create document cache as HTML from document in request body.

cURL example

curl -v  "https://api.groupdocs.cloud/v1.0/viewer/html/pages?fileName#one-page.docx&appsid#XXXX&signature#XXX-XX"
-H "Content-Type: application/json"
-X POST
-H "Accept: application/json"
-d "{'resourcePath':'page/{page-number}/resource/{resource-name}"
{
  "fileName": "one-page.docx",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "resources": [
          {
            "resourceName": "font2.woff",
            "url": "http://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/1/resources/font2.woff"
          },
          {
            "resourceName": "fontFaces.css",
            "url": "http://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/1/resources/fontFaces.css"
          },
          {
            "resourceName": "styles.css",
            "url": "http://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages/1/resources/styles.css"
          }
      ]
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Create Document Cache as Image from Document in Request Body

You can create the document pages as Image from document in request body and saves them in cache. The API returns object which contains list of links to document pages along with ‘201 Created’ status and if pages already created will be removed from cache.

The following GroupDocs.Viewer Cloud REST API resource has been used to create document cache as Image from document in request body.

cURL example

curl -v "https://api.groupdocs.cloud/v1.0/viewer/image/pages?fileName#one-page.docx&appsid#XXXX&signature#XXX-XX"
-H "Content-Type: application/json"
-X POST
-H "Accept: application/json"
-d "{'format':'jpg','quality':90,'width':600,'height':800,'startPageNumber':1,'countPages':1,'extractText':true,'renderComments':true}"
{
  "fileName": "one-page.docx",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "url": "http://api.groupdocs.cloud/v1/viewer/one-page.docx/image/pages/1"
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Create Document Cache for Document URL with HtmlOptions as HTML

You can create the document pages as HTML and saves them in cache with HtmlOptions. The API returns object which contains list of links to document pages along with ‘201 Created’ status and if file name already exist then unique file name will be will be used for file.

The following GroupDocs.Viewer Cloud REST API resource has been used to create document cache for document url with HtmlOptions as HTML.

cURL example

curl -v "https://api.groupdocs.cloud/v1.0/viewer/html/pages?url#https%3A%2F%2Fwww.dropbox.com%2Fs%2Fumokluz338w4ng7%252fone-page.docx&fileName#one-page.docx&storage#First%20Storage&appsid#XXXX&signature#XXX-XX"
-H "Content-Type: application/json"
-X PUT -d "{'embedResources': true}"
{
  "fileName": "one-page.docx",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "resources": [],
      "url": "http://api.groupdocs.cloud/v1.0/viewer/one-page.docx/html/pages/1"
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Create Document Cache for Document URL with ImageOptions as Image

You can create the document pages as Image and saves them in cache with ImageOptions. The API returns object which contains list of links to document pages or ZIP archive with actual pages as image when “application/zip” accept header specified along with ‘201 Created’ status and if file name already exist then unique file name will be will be used for file.

The following GroupDocs.Viewer Cloud REST API resource has been used to create document cache for document url with ImageOptions as Image.

cURL example

curl -v "https://api.groupdocs.cloud/v1.0/viewer/html/pages?url#https%3A%2F%2Fwww.dropbox.com%2Fs%2Fumokluz338w4ng7%252fone-page.docx&fileName#one-page.docx&storage#First%20Storage&appsid#XXXX&signature#XXX-XX"
-H "Content-Type: application/json"
-X PUT -d "{'format': 'jpeg','quality': 70}"
{
  "fileName": "one-page3.docx",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "url": "http://api.groupdocs.cloud/v1.0/viewer/one-page3.docx/image/pages/1"
    }
  ],
  "url": null
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Rotate Document Pages for HTML Representation

GroupDocs.Viewer Cloud can rotate document page for HTML Representation. The API returns object with updated list of pages upon success. Please check RotateOptions Objectcommon-resources/options-objects/#HRotateOptionsObject) for request parameter.

The following GroupDocs.Viewer Cloud REST API resource has been used to rotate the document pages with HTML representation.

cURL example

curl -v "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages" \
-X PUT \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "{"pageNumber":1,"angle":90}" \
-H "authorization: Bearer [Access Token]"
{
  "pages": [
    {
      "number": 1,
      "name": null,
      "width": 612,
      "height": 792,
      "angle": 90,
      "visible": true,
      "rows": null
    },
    {
      "number": 2,
      "name": null,
      "width": 612,
      "height": 792,
      "angle": 0,
      "visible": true,
      "rows": null
    },
    {
      "number": 3,
      "name": null,
      "width": 612,
      "height": 792,
      "angle": 0,
      "visible": true,
      "rows": null
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Rotate Document Pages for Image Representation

GroupDocs.Viewer Cloud can rotate document page for Image Representation. The API returns object with updated list of pages upon success. Please check RotateOptions Objectcommon-resources/options-objects/#HRotateOptionsObject) for request body parameter.

The following GroupDocs.Viewer Cloud REST API resource has been used to rotate document pages with Image representation.

cURL example

curl -v "https://api.groupdocs.cloud/v1/viewer/one-page.docx/image/pages" \
-X PUT \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "{"pageNumber":1,"angle":90}" \
-H "authorization: Bearer [Access Token]"
{
  "pages": [
    {
      "number": 1,
      "name": null,
      "width": 612,
      "height": 792,
      "angle": 90,
      "visible": true,
      "rows": null
    },
    {
      "number": 2,
      "name": null,
      "width": 612,
      "height": 792,
      "angle": 0,
      "visible": true,
      "rows": null
    },
    {
      "number": 3,
      "name": null,
      "width": 612,
      "height": 792,
      "angle": 0,
      "visible": true,
      "rows": null
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Reorder Document Pages for HTML Representation

GroupDocs.Viewer Cloud can reorder document pages for HTML Representation. The API returns object with updated list of pages upon success. Please check ReorderOptions Objectcommon-resources/options-objects/) for request parameter.

The following GroupDocs.Viewer Cloud REST API resource has been used to reorder the document pages with HTML representation.

cURL example

curl -v "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages" \
-X PUT \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "{"pageNumber":1,"newPosition":3}" \
-H "authorization: Bearer [Access Token]"
{
  "pages": [
    {
      "number": 2,
      "name": null,
      "width": 612,
      "height": 792,
      "angle": 0,
      "visible": true,
      "rows": null
    },
    {
      "number": 3,
      "name": null,
      "width": 612,
      "height": 792,
      "angle": 0,
      "visible": true,
      "rows": null
    },
    {
      "number": 1,
      "name": null,
      "width": 612,
      "height": 792,
      "angle": 90,
      "visible": true,
      "rows": null
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Reorder Document Pages for Image Representation

GroupDocs.Viewer Cloud can reorder document page for Image Representation. The API returns object with updated list of pages upon success. Please check ReorderOptions Objectcommon-resources/options-objects/) for request body parameter.

The following GroupDocs.Viewer Cloud REST API resource has been used to reorder document pages with Image representation.

cURL example

curl -v "https://api.groupdocs.cloud/v1/viewer/one-page.docx/image/pages" \
-X PUT \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "{"pageNumber":1,"newPosition":3}" \
-H "authorization: Bearer [Access Token]"
{
  "pages": [
    {
      "number": 2,
      "name": null,
      "width": 612,
      "height": 792,
      "angle": 0,
      "visible": true,
      "rows": null
    },
    {
      "number": 3,
      "name": null,
      "width": 612,
      "height": 792,
      "angle": 0,
      "visible": true,
      "rows": null
    },
    {
      "number": 1,
      "name": null,
      "width": 612,
      "height": 792,
      "angle": 90,
      "visible": true,
      "rows": null
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Remove Document Cache for HTML Pages

You can remove the document HTML pages cache. The API returns an empty response with ‘204 No Content’ status will be returned to confirm deletion.

The following GroupDocs.Viewer Cloud REST API resource has been used to remove document cache for HTML pages.

cURL example

curl -v "https://api.groupdocs.cloud/v1/viewer/one-page.docx/html/pages" \
-X DELETE \
-H "authorization: Bearer [Access Token]"
Empty response with '204 No Content' status.

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Remove Document Cache for Page Images

You can remove the document page images cache. The API returns an empty response with ‘204 No Content’ status will be returned to confirm deletion.

The following GroupDocs.Viewer Cloud REST API resource has been used to remove document cache for page Images.

cURL example

curl -v "https://api.groupdocs.cloud/v1/viewer/one-page.docx/image/pages" \
-X DELETE \
-H "authorization: Bearer [Access Token]"
Empty response with '204 No Content' status.

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Specify Image Quality when Rendering PDF Documents as HTML

You can set image quality of PDF document when rendering as HTML. The API returns an object which contains list of links to document pages.

The following GroupDocs.Viewer Cloud REST API resource has been used to Specify Image Quality when Rendering PDF Documents as HTML.

cURL example

curl -v "http://api.groupdocs.cloud/v1/viewer/sample2.pdf/html/pages" \
-X GET \
-data '{"pdfOptions": {"imageQuality": "High"}' \
-H"Content-Type: application/json" \
-H "authorization: Bearer "
{
  "fileName": "sample2.pdf",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "resources": [
        {
          "name": "font.woff",
          "url": "http://api.groupdocs.cloud/v1/viewer/sample2.pdf/html/pages/1/resources/font.woff"
        },
        {
          "name": "font1.woff",
          "url": "http://api.groupdocs.cloud/v1/viewer/sample2.pdf/html/pages/1/resources/font1.woff"
        },
        {
          "name": "image.png",
          "url": "http://api.groupdocs.cloud/v1/viewer/sample2.pdf/html/pages/1/resources/image.png"
        },
        {
          "name": "styles.css",
          "url": "http://api.groupdocs.cloud/v1/viewer/sample2.pdf/html/pages/1/resources/styles.css"
        }
      ],
      "url": "http://api.groupdocs.cloud/v1/viewer/sample2.pdf/html/pages/1"
    },
    {
      "number": 2,
      "resources": [
        {
          "name": "font.woff",
          "url": "http://api.groupdocs.cloud/v1/viewer/sample2.pdf/html/pages/2/resources/font.woff"
        },
        {
          "name": "styles.css",
          "url": "http://api.groupdocs.cloud/v1/viewer/sample2.pdf/html/pages/2/resources/styles.css"
        }
      ],
      "url": "http://api.groupdocs.cloud/v1/viewer/sample2.pdf/html/pages/2"
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Exclude fonts when rendering as HTML

You can prevent adding fonts in resultant document when rendering as HTML, to decrease the file size. The API returns an object which contains list of links to document pages.

Note
ExcludeFontsList option allows to exclude specific fonts (that are commonly available on most of the devices). The example below shows how to prevent adding fonts into output HTML. Currently, it works only for Presentation documents. We are planning to extend support for this feature for all document types where it is applicable in the upcoming releases.–data ‘{“embedResources”: true, “excludeFontsList”: [“Arial”]}’

Resource

The following GroupDocs.Viewer Cloud REST API resource has been used to Prevent Adding Fonts in document when rendering as Html.

cURL example

 curl -v "http://api.groupdocs.cloud/v1/viewer/one-page1.docx/html/pages"  \
-X GET -data '{"excludeFonts": true }' \
-H "Content-Type: application/json"  \
-H "authorization: Bearer [Access Token]"
{
  "fileName": "one-page1.docx",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "resources": [
        {
          "name": "image.png",
          "url": "http://api.groupdocs.cloud/v1/viewer/one-page1.docx/html/pages/1/resources/image.png"
        },
        {
          "name": "styles.css",
          "url": "http://api.groupdocs.cloud/v1/viewer/one-page1.docx/html/pages/1/resources/styles.css"
        }
      ],
      "url": "http://api.groupdocs.cloud/v1/viewer/one-page1.docx/html/pages/1"
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Auto Fit column width rendering document as HTML

You can set property to auto fit column with depending upon content when rendering document as Html. The API returns an object which contains list of links to document pages.

The following GroupDocs.Viewer Cloud REST API resource has been used to Auto Fit column width rendering document as HTML.

cURL example

 curl -v "[http://api.groupdocs.cloud/v1/viewer/with-overflowed-text.xlsx/html/pages](http://api.groupdocs.cloud/v1/viewer/with-overflowed-text.xlsx/html/pages)" \
-X GET -data '{"cellsOptions": {"textOverflowMode": "AutoFitColumn"}'  \
-H "Content-Type: application/json"  \
-H "authorization: Bearer [Access Token]"
{
  "fileName": "with-overflowed-text.xlsx",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "resources": [
        {
          "name": "image.png",
          "url": "http://api.groupdocs.cloud/v1/viewer/one-page1.docx/html/pages/1/resources/image.png"
        },
        {
          "name": "styles.css",
          "url": "http://api.groupdocs.cloud/v1/viewer/one-page1.docx/html/pages/1/resources/styles.css"
        }
      ],
      "url": "http://api.groupdocs.cloud/v1/viewer/one-page1.docx/html/pages/1"
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Rendering only Print Area in Excel document as HTML

You can set property to render sections of the workshet(s) defined as [print area](https://support.office.com/en-us/article/set-or-clear-a-print-area-on-a-worksheet-27048af8-a321-416d-ba1b-e99ae2182a7e when rendering MS Excel document as Html. The API returns an object which contains list of links to document pages.

The following GroupDocs.Viewer Cloud REST API resource has been used to Rendering only Print Area in Excel document as HTML.

cURL example

 curl -v "[http://api.groupdocs.cloud/v1/viewer/with-overflowed-text.xlsx/html/pages](http://api.groupdocs.cloud/v1/viewer/with-overflowed-text.xlsx/html/pages)"  \
-X GET -data '{"cellsOptions": {"renderPrintAreaOnly": true, "renderHiddenColumns": true}}'  \
-H "Content-Type: application/json"  \
-H "authorization: Bearer [Access Token]"
{
  "fileName": "with-overflowed-text.xlsx",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "resources": [
        {
          "name": "image.png",
          "url": "http://api.groupdocs.cloud/v1/viewer/one-page1.docx/html/pages/1/resources/image.png"
        },
        {
          "name": "styles.css",
          "url": "http://api.groupdocs.cloud/v1/viewer/one-page1.docx/html/pages/1/resources/styles.css"
        }
      ],
      "url": "http://api.groupdocs.cloud/v1/viewer/one-page1.docx/html/pages/1"
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Include/exclude hidden content in Excel documents as HTML

You can set property to include/exclude hidden content when rendering MS Excel document as Html. The API returns an object which contains list of links to document pages.

The following GroupDocs.Viewer Cloud REST API resource has been used to include/exclude hidden content in Excel documents as HTML.

cURL example

 curl -v "[http://api.groupdocs.cloud/v1/viewer/with-overflowed-text.xlsx/html/pages](http://api.groupdocs.cloud/v1/viewer/with-overflowed-text.xlsx/html/pages)"  \
-X GET -data '{"cellsOptions": {"renderHiddenRows": true, "renderHiddenColumns": true}}'  \
-H "Content-Type: application/json" \
-H "authorization: Bearer [Access Token]"
{
  "fileName": "with-overflowed-text.xlsx",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "resources": [
        {
          "name": "image.png",
          "url": "http://api.groupdocs.cloud/v1/viewer/one-page1.docx/html/pages/1/resources/image.png"
        },
        {
          "name": "styles.css",
          "url": "http://api.groupdocs.cloud/v1/viewer/one-page1.docx/html/pages/1/resources/styles.css"
        }
      ],
      "url": "http://api.groupdocs.cloud/v1/viewer/one-page1.docx/html/pages/1"
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

Rendering PDF Documents into HTML with Setting (Default Font)

Since the version 18.7, it is possible to set default font when rendering PDF document into HTML. This setting may be useful when you would like to specify which font should be used in case PDF document missing some font(s)

The following GroupDocs.Viewer Cloud REST API resource has been used to Rendering PDF Document into Html.

cURL example


# Set default font name when rendering PDF document as HTML
curl request POST \
url http://api.groupdocs.cloud/v1/viewer/missing-font.pdf/html/pages \
header 'authorization: [Access Token]' \
header 'content-type: application/json' \
data '{"defaultFontName": "Arial"}'

# Retrieve created page

curl request GET \
  --url http://api.groupdocs.cloud/v1/viewer/missing-font.pdf/html/pages/1 \
  --header 'authorization: [Access Token]'
{
  "fileName": "sample.pdf",
  "folder": null,
  "pages": [
    {
      "number": 1,
      "resources": [
        {
          "name": "image.png",
          "url": "http://api.groupdocs.cloud/v1/viewer/sample.pdf/html/pages/1/resources/image.png"
        },
        {
          "name": "styles.css",
          "url": "http://api.groupdocs.cloud/v1/viewer/sample.pdf/html/pages/1/resources/styles.css"
        }
      ],
      "url": "http://api.groupdocs.cloud/v1/viewer/sample.pdf/html/pages/1"
    }
  ]
}

SDK examples

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

On this page