5. Convert to Presentation Document Formats

Introduction

GroupDocs.Conversion Cloud REST API allows to convert the supported document formats) to Presentation Document Formats and returns the output document storage URL and also support to get result as a stream.

Convert to Presentation Formats

You can convert the supported document formats) to Presentation Document Formats and get the Storage URL Output**.**

Resource

The following GroupDocs.Conversion Cloud REST API resource has been used in the convert to Slides format example.

cURL Example

curl -X POST "https://api.groupdocs.cloud/v2.0/conversion" -H  "accept: application/json" -H  "authorization: Bearer [Access Token]" -H  "Content-Type: application/json" -d "{  \"Storage\": \"MyStorage\",  \"FilePath\": \"conversions/sample.docx\",  \"Format\": \"pptx\",  \"LoadOptions\": {\"DocxLoadOptions\": {\"Password\": \"\",   \"HideWordTrackedChanges\":\"true\",   \"DefaultFont\":\"Arial\"   }},  \"ConvertOptions\": { \"Password\": \"\",      \"FromPage\": \"1\",     \"PagesCount\": \"2\",     \"Zoom\": \"1\"  },  \"OutputPath\": \"converted/toslides\"}"

  {
    "name": "sample.pptx",
    "size": 68540,
    "url": "MyStorage:converted/toslides/sample.pptx"
  }

SDKs

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.

Convert to Presentation Formats

Convert to Slides Formats

You can convert the supported document formats) to Presentation Document Formats and get the Stream Output**.**

Resource

The following GroupDocs.Conversion Cloud REST API resource has been used in the convert to Slides format example.

cURL Example

curl -X POST "https://api.groupdocs.cloud/v2.0/conversion" -H  "accept: application/json" -H  "authorization: Bearer [Access Token]" -H  "Content-Type: application/json" -d "{  \"Storage\": \"MyStorage\",  \"FilePath\": \"conversions/sample.docx\",  \"Format\": \"pptx\",  \"LoadOptions\": {\"DocxLoadOptions\": {\"Password\": \"\",   \"HideWordTrackedChanges\":\"true\",   \"DefaultFont\":\"Arial\"   }},  \"ConvertOptions\": { \"Password\": \"\",      \"FromPage\": \"1\",     \"PagesCount\": \"2\",     \"Zoom\": \"1\"  },  \"OutputPath\": \""}"

Code : 200
{
Download file
}
content-type: application/octet-stream

SDKs

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.

Convert to Slides Formats

Convert to Presentation Documents with Advanced Options

This example demonstrates how to convert word processing documents into presentation documents with advanced conversion options.

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 GroupDocs.Conversion Cloud Storage Operations) 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.

Resource

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 https://dashboard.groupdocs.cloud/#/apps. Kindly place App Key in "client_secret" and App SID in "client_id" argument.
curl -v "https://api.groupdocs.cloud/connect/token" \
-X POST \
-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 "https://api.groupdocs.cloud/v2.0/conversion/conversion" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <jwt token>"
-d "{
        'FilePath': 'WordProcessing/four-pages.docx',
        'Format': 'ppt',
        'ConvertOptions': {
            'FromPage': 2,
            'PagesCount': 1
        },
        'OutputPath': 'Output'
    }"


[
  {
    "name": "four-pages.ppt",
    "size": 29696,
    "path": "Output/four-pages.ppt",
    "url": "https://api.groupdocs.cloud/v2.0/conversion/storage/file/Output/four-pages.ppt"
  }
]

SDKs

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.

Convert to Presentation Documents with Advanced Options