Convert Specific Pages

This example demonstrates how to convert specific 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 Client Id and Client Secret from Kindly place Client Id in "client_id" and Client Secret in "client_secret" 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': {
            'Pages': [1, 3]
        'OutputPath': 'Output/two-pages.pdf'
    "name": "two-pages.pdf",
    "size": 51598,
    "path": "Output/two-pages.pdf",
    "url": ""

SDK examples

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.