If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.

Installation
Das Paket ist verfügbar bei Packagist und kann über Composer mit folgendem Befehl installiert werden:
composer require groupdocscloud/groupdocs-editor-cloud

Anforderungen
- PHP 8.2 oder höher
- Composer
- PHP-Erweiterungen — curl, json, mbstring
- GroupDocs Cloud-Anmeldeinformationen — Client ID and Client Secret vom Dashboard
Abhängigkeiten
Das SDK benötigt die folgenden Pakete:
| Package | Constraint |
|---|
| guzzlehttp/guzzle | ^6.5.8 or ^7.4.5 |
| ext-curl | * |
| ext-json | * |
| ext-mbstring | * |
Schnellstart
Um GroupDocs.Editor Cloud zu verwenden, registrieren Sie sich im GroupDocs.Cloud Dashboard und holen Sie sich Ihre Client ID und Client Secret.
API initialisieren
Verwenden Sie den folgenden Code, um mit dem GroupDocs.Editor Cloud SDK für PHP zu beginnen:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Get your ClientId and ClientSecret at https://dashboard.groupdocs.cloud
$configuration = new GroupDocs\Editor\Configuration();
$configuration->setAppSid("YourClientId");
$configuration->setAppKey("YourClientSecret");
$configuration->setApiBaseUrl("https://api.groupdocs.cloud");
$editApi = new GroupDocs\Editor\EditApi($configuration);
Siehe das vollständige Beispiel in CommonUtils.php.
Word-Dokument bearbeiten
Nach der Initialisierung können Sie mit diesem grundlegenden Beispiel ein kennwortgeschütztes Word-Dokument laden, dessen HTML-Darstellung bearbeiten und das Ergebnis speichern.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use GroupDocs\Editor\Model;
use GroupDocs\Editor\Model\Requests;
$configuration = new GroupDocs\Editor\Configuration();
$configuration->setAppSid("YourClientId");
$configuration->setAppKey("YourClientSecret");
$configuration->setApiBaseUrl("https://api.groupdocs.cloud");
$editApi = new GroupDocs\Editor\EditApi($configuration);
$fileApi = new GroupDocs\Editor\FileApi($configuration);
$fileInfo = new Model\FileInfo();
$fileInfo->setFilePath("WordProcessing/password-protected.docx");
$fileInfo->setPassword("password");
$loadOptions = new Model\WordProcessingLoadOptions();
$loadOptions->setFileInfo($fileInfo);
$loadOptions->setOutputPath("output");
$loadResult = $editApi->load(new Requests\loadRequest($loadOptions));
$htmlFile = $fileApi->downloadFile(new Requests\downloadFileRequest($loadResult->getHtmlPath()));
$html = file_get_contents($htmlFile->getRealPath());
$html = str_replace("Sample test text", "Hello world", $html);
file_put_contents($htmlFile->getRealPath(), $html);
$fileApi->uploadFile(new Requests\uploadFileRequest($loadResult->getHtmlPath(), $htmlFile->getRealPath()));
$saveOptions = new Model\WordProcessingSaveOptions();
$saveOptions->setFileInfo($fileInfo);
$saveOptions->setOutputPath("output/edited.docx");
$saveOptions->setHtmlPath($loadResult->getHtmlPath());
$saveOptions->setResourcesPath($loadResult->getResourcesPath());
$saveResult = $editApi->save(new Requests\saveRequest($saveOptions));
echo "Document edited: " . $saveResult->getPath() . "\n";
Siehe das vollständige Beispiel in EditWordProcessingDocument.php.
Tabellenkalkulationsdokument bearbeiten
Dieses Beispiel lädt das erste Arbeitsblatt einer XLSX-Datei, bearbeitet dessen HTML-Inhalt und speichert die Tabellenkalkulation.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use GroupDocs\Editor\Model;
use GroupDocs\Editor\Model\Requests;
$configuration = new GroupDocs\Editor\Configuration();
$configuration->setAppSid("YourClientId");
$configuration->setAppKey("YourClientSecret");
$configuration->setApiBaseUrl("https://api.groupdocs.cloud");
$editApi = new GroupDocs\Editor\EditApi($configuration);
$fileApi = new GroupDocs\Editor\FileApi($configuration);
$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));
$htmlFile = $fileApi->downloadFile(new Requests\downloadFileRequest($loadResult->getHtmlPath()));
$html = file_get_contents($htmlFile->getRealPath());
$html = str_replace("This is sample sheet", "This is sample sheep", $html);
file_put_contents($htmlFile->getRealPath(), $html);
$fileApi->uploadFile(new Requests\uploadFileRequest($loadResult->getHtmlPath(), $htmlFile->getRealPath()));
$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));
echo "Document edited: " . $saveResult->getPath() . "\n";
Siehe das vollständige Beispiel in EditSpreadsheetDocument.php.
Rufen Sie die Seitenanzahl eines kennwortgeschützten Word-Dokuments ab.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use GroupDocs\Editor\Model;
use GroupDocs\Editor\Model\Requests;
$configuration = new GroupDocs\Editor\Configuration();
$configuration->setAppSid("YourClientId");
$configuration->setAppKey("YourClientSecret");
$configuration->setApiBaseUrl("https://api.groupdocs.cloud");
$infoApi = new GroupDocs\Editor\InfoApi($configuration);
$fileInfo = new Model\FileInfo();
$fileInfo->setFilePath("WordProcessing/password-protected.docx");
$fileInfo->setPassword("password");
$response = $infoApi->getInfo(new Requests\getInfoRequest($fileInfo));
echo "Page Count = " . $response->getPageCount() . "\n";
Siehe das vollständige Beispiel in GetDocumentInformation.php.
Unterstützte Dateitypen abrufen
Rufen Sie die unterstützten Dateiformate ab.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$configuration = new GroupDocs\Editor\Configuration();
$configuration->setAppSid("YourClientId");
$configuration->setAppKey("YourClientSecret");
$configuration->setApiBaseUrl("https://api.groupdocs.cloud");
$infoApi = new GroupDocs\Editor\InfoApi($configuration);
$response = $infoApi->getSupportedFileFormats();
foreach ($response->getFormats() as $format) {
echo $format->getFileFormat() . " - " . $format->getExtension() . "\n";
}
Siehe das vollständige Beispiel in GetSupportedFileTypes.php.
Beispiele auf GitHub
Das Repository GroupDocs.Editor Cloud PHP Examples enthält sofort ausführbare Beispiele für:
| Category | Examples |
|---|
| File Types | Unterstützte Dateitypen |
| Document Information | Dokumentinformationen, Lizenzverbrauch |
| Edit Operations — Word | Textverarbeitungsdokumente bearbeiten, einschließlich kennwortgeschützter Dateien |
| Edit Operations — Spreadsheet | Tabellenkalkulationsdokumente mit Arbeitsblattauswahl bearbeiten |
| Edit Operations — Presentation | Präsentationsdokumente mit Folienauswahl bearbeiten |
| Edit Operations — DSV | Durch Trennzeichen getrennte Wertedokumente bearbeiten |
| Edit Operations — Text | Klartextdokumente bearbeiten |
Beispiele ausführen
- Klonen oder laden Sie das Beispiel-Repository herunter
- Bearbeiten Sie
Examples/CommonUtils.php und setzen Sie Ihre ClientId und ClientSecret - Wechseln Sie in das Verzeichnis
Examples - Führen Sie
composer update aus - Führen Sie
php RunExamples.php aus
Für weitere Details besuchen Sie Getting Started.

Document Editing API | PHP Cloud API | GroupDocs.Editor Cloud | REST API | Word Processing Formats | Spreadsheet Formats | Presentation Formats | Text Formats | CSV Files | DOCX Documents | XLSX Documents | PPTX Presentations | Password-Protected Files | Cloud Storage Integration | Document Info Retrieval | File Operations | WYSIWYG Editing | Multi-Platform Support | Secure API Access | HTML Editing | Cross-platform API