Convert N Consecutive Pages


This example demonstrates how to convert consecutive pages from word processing documents into pdf documents.

There are steps that usage of GroupDocs.Conversion Cloud consists of:

  1. Upload input document into cloud storage
  2. Convert document
  3. Download converted document from storage

Steps 1 and 3 are storage operations, please refer to this for usage details. Step 3 is not needed if the “OutputPath” option is not provided: the convert API method will return the converted document in the response body.

FileInfo.FilePathThe path of the document, located in the storage.Required.
FileInfo.StorageNameStorage nameIt could be omitted for default storage.
FileInfo.PasswordThe password to open fileIt should be specified only for password-protected documents.

Resource URI

HTTP POST ~/conversion

Swagger UI lets you call this REST API directly from the browser.

cURL Example

* First get JSON Web Token
* Please get your App Key and App SID from Kindly place App Key in "client_secret" and App SID in "client_id" argument.
curl -v "" \
-d "grant_type#client_credentials&client_id#xxxx&client_secret#xxxx" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json"

* cURL example to convert document
curl -v "" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <jwt token>"
-d "{
        'FilePath': 'WordProcessing/four-pages.docx',
        'Format': 'pdf',
        'ConvertOptions': {
            'FromPage': 2,
            'PagesCount': 2
        'OutputPath': 'Output/two-pages.pdf'

    "name": "two-pages.pdf",
    "size": 76532,
    "path": "Output/two-pages.pdf",
    "url": ""


Our API is completely independent of your operating system, database system or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone and time-consuming. Therefore, we have provided and support API SDKs in many development languages in order to make it easier to integrate with us. If you use SDK, it shows document information API calls and lets you use GroupDocs Cloud features in a native way for your preferred language.

SDK Examples