Documents Editor REST API & PHP Cloud SDK

Cloud REST API to quickly edit all popular document formats in any type of PHP application without installing any external software.‎

  • GroupDocs.Editor for cURL
  • GroupDocs.Editor for .NET
  • GroupDocs.Editor for Java
  • GroupDocs.Editor for Python
  • GroupDocs.Editor for Ruby
  • GroupDocs.Editor for Node.js
  • GroupDocs.Editor for Android
Start Free Trial

GroupDocs.Editor Cloud SDK for PHP supports editing and manipulating a bunch of popular document file formats within PHP applications. Simply integrate GroupDocs.Editor Cloud SDK for PHP with GroupDocs.Editor Cloud REST API, upload supported document in any third-party WYSIWYG HTML editor, manipulate the document and save it back to the original document format without disturbing the appearance after editing. The PHP editor library supports a variety of document formats including Microsoft Word (DOC, DOCX, WordML), Excel (XLS, XLSX, SpreadsheetML), Presentations (PPT, PPTX), HTML, XML, TXT and OpenDocument.

GroupDocs.Editor Cloud SDK for PHP is built as a layer on top of GroupDocs.Editor Cloud REST API that saves valuable development time by managing low-level requests and handling responses. The developers can focus on writing up the specific code only as needed in the project.

Frequently Asked Questions

I want to create my own PHP application to edit documents?

Check out GroupDocs.Editor Cloud SDK for PHP at GitHub if you are looking for the source code to annotate file in the Cloud.

Can I try GroupDocs.Editor REST APIs on PHP for free?

You can try GroupDocs.Editor Low-Code PHP APIs without any limitations.

I do not want to upload my confidential files anywhere for editing? What are my options?

GroupDocs.Editor 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.Editor High-code APIs which currently drive our REST APIs.

Advanced Document Editor REST API Features

Integrates easily within any WYSIWYG editor

Edit Word documents as a whole or define pages range

Multi-tabbed spreadsheet editing is supported

Optimized memory usage for large CSV or TSV files

Extract document information (type, size, page count etc)

Cloud REST API to be used with any language or platform

Working with WordProcessing Documents - PHP

//Get your App SID, App Key and Storage Name at (free registration is required).
$AppSid = ""; // Get AppKey and AppSID from
$AppKey = ""; // Get AppKey and AppSID from
$configuration = new GroupDocs\Editor\Configuration();

$editApi = new GroupDocs\Editor\EditApi($configuration);
$fileApi = new GroupDocs\Editor\FileApi($configuration);

// The document already uploaded into the storage
// Load it into editable state
$fileInfo = new Model\FileInfo();
$loadOptions = new Model\SpreadsheetLoadOptions();
$loadResult = $editApi->load(new Requests\loadRequest($loadOptions));

// Download html document
$htmlFile = $fileApi->downloadFile(new Requests\downloadFileRequest($loadResult->getHtmlPath()));
$html = file_get_contents($htmlFile->getRealPath());

// Edit something...
$html = str_replace("This is sample sheet", "This is sample sheep", $html);

// Upload html back to storage
file_put_contents($htmlFile->getRealPath(), $html);
$uploadRequest = new Requests\uploadFileRequest($loadResult->getHtmlPath(), $htmlFile->getRealPath());

// Save html back to xlsx
$saveOptions = new Model\SpreadsheetSaveOptions();
$saveResult = $editApi->save(new Requests\saveRequest($saveOptions));

// Done.
echo "Document edited: " . $saveResult->getPath();

GroupDocs.Editor offers document viewing APIs for other popular development environments