REST API for developers to convert documents and images among supported file formats. Allows seamless integration into your applications.
Start Free TrialThe GroupDocs.Conversion Cloud SDK for PHP has been developed to help you get started with our document conversion REST API, which lets you seamlessly convert your documents to any format you need. With this single API, you can convert back and forth between over 50 types of documents and images, including all Microsoft Office and OpenDocument file formats, PDF documents, HTML, CAD, raster images and many more.
Configuration
.setAppSid
and setAppKey
methods of Configuration
instance.ConversionApi
using instance of Configuration
.ConvertSettings
.ConvertSettings->setFilePath
method.ConvertSettings->setFormat
method.ConvertSettings->setOutputPath
method.ConvertDocumentRequest
using ConvertSettings
instance.ConversionApi->convertDocument
to start conversion.getUrl
method.Check out GroupDocs.Conversion Cloud SDK for PHP at GitHub if you are looking for the source code to convert file in the Cloud.
You can try GroupDocs.Conversion Low-Code PHP APIs without any limitations.
GroupDocs.Conversion Cloud is also available as Docker image which can be used to self-host the service. Or you may build your own services using GroupDocs.Conversion High-code APIs which currently drive our REST APIs.
GroupDocs.Conversion REST API has the capability to convert documents to any of the supported formats, Using the SDK for PHP, we can perform this task with just a few lines of code.
//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
$configuration = new GroupDocs\Conversion\Configuration();
$configuration->setAppSid("xxxx-xxxx-xxxx");
$configuration->setAppKey("xxxxxxxxxxxxx");
$configuration->setApiBaseUrl("https://api.groupdocs.cloud");
$conversionApi = new GroupDocs\Conversion\ConversionApi($configuration);
$settings = new GroupDocs\Conversion\Model\ConvertSettings();
$settings->setStorageName("xxxxxxx xxxx");
$settings->setFilePath("document.docx");
$settings->setFormat("xlsx");
$settings->setOutputPath("converted docs");
$request = new GroupDocs\Conversion\Model\Requests\ConvertDocumentRequest($settings);
$response = $conversionApi->convertDocument($request);
echo "Converted document can be downloaded from: ", $response[0]->getUrl();
GroupDocs.Conversion Cloud 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 hides the REST API calls and lets you use GroupDocs.Conversion Cloud API features in a native way for your preferred language.
The GroupDocs.Conversion Cloud API is secured and requires authentication. Users need to register at GroupDocs Cloud and get their app access key ID (appSID) and app secret access key. Authenticated requests require a signature and AppSID query parameters or OAuth 2.0 authorization header.
GroupDocs.Conversion Cloud SDK is 100% tested and out of the box running. The SDK is open source and has an MIT license. You can use it, and even customize it for absolutely free of charge.