Cloud REST API zum schnellen Bearbeiten aller gängigen Dokumentformate in jeder Art von PHP-Anwendung, ohne externe Software zu installieren.
Kostenlos testenGroupDocs.Editor Cloud SDK für PHP unterstützt das Bearbeiten und Manipulieren einer Reihe gängiger Dokumentdateiformate innerhalb von PHP-Anwendungen. Integrieren Sie einfach GroupDocs.Editor Cloud SDK für PHP mit GroupDocs.Editor Cloud REST API, laden Sie ein unterstütztes Dokument in einem beliebigen Drittanbieter-WYSIWYG-Editor HTML hoch, manipulieren Sie das Dokument und speichern Sie es wieder im ursprünglichen Dokumentformat, ohne das Aussehen nach der Bearbeitung zu verändern. Die PHP-Editor-Bibliothek unterstützt verschiedene Dokumentformate, darunter Microsoft Word (DOC, DOCX, WordML), Excel (XLS, XLSX, SpreadsheetML), Präsentationen (PPT, PPTX), HTML, XML, TXT und OpenDocument.
GroupDocs.Editor Cloud SDK für PHP ist als Schicht über GroupDocs.Editor Cloud REST API aufgebaut, die wertvolle Entwicklungszeit spart, indem sie Low-Level-Anfragen verwaltet und Antworten verarbeitet. Die Entwickler können sich darauf konzentrieren, nur den spezifischen Code zu schreiben, der im Projekt benötigt wird.
Schauen Sie sich GroupDocs.Editor Cloud SDK für PHP bei GitHub an, wenn Sie nach dem Quellcode zum Annotieren einer Datei in der Cloud suchen.
Sie können GroupDocs.Editor Low-Code PHP APIs ausprobieren, ohne Einschränkungen.
GroupDocs.Editor Cloud ist auch als Docker-Image verfügbar, das verwendet werden kann, um den Service zu self-host . Oder können Sie Ihre eigenen Services mit GroupDocs.Editor High-code APIs erstellen, die derzeit unser REST APIs antreiben.
//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
$AppSid = ""; // Get AppKey and AppSID from https://dashboard.groupdocs.cloud
$AppKey = ""; // Get AppKey and AppSID from https://dashboard.groupdocs.cloud
$configuration = new GroupDocs\Editor\Configuration();
$configuration->setAppSid($AppSid);
$configuration->setAppKey($AppKey);
$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();
$fileInfo->setFilePath("Spreadsheet/four-sheets.xlsx");
$loadOptions = new Model\SpreadsheetLoadOptions();
$loadOptions->setFileInfo($fileInfo);
$loadOptions->setOutputPath("output");
$loadOptions->setWorksheetIndex(0);
$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());
$fileApi->uploadFile($uploadRequest);
// Save html back to xlsx
$saveOptions = new Model\SpreadsheetSaveOptions();
$saveOptions->setFileInfo($fileInfo);
$saveOptions->setOutputPath("output/edited.xlsx");
$saveOptions->setHtmlPath($loadResult->getHtmlPath());
$saveOptions->setResourcesPath($loadResult->getResourcesPath());
$saveResult = $editApi->save(new Requests\saveRequest($saveOptions));
// Done.
echo "Document edited: " . $saveResult->getPath();