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.‎

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.

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();

Support and Learning Resources

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