Document editor REST API to build advanced documents editing and manipulating tools using Android Cloud SDK on web, mobile, desktop or cloud platforms.
Start Free TrialGroupDocs.Editor Cloud SDK for Android easily integrates with GroupDocs.Editor Cloud REST API, allowing to add documents editing features in Android applications without MS Office or other additional applications installed. Using the Android editor SDK – speed up the document manipulation task across a wide range of supported document formats including Microsoft Word, Excel spreadsheets, Presentations, TXT, HTML and XML. Simply fetch the document into any WYSIWYG HTML editor, edit it as needed and save it back to original document formats with true accuracy and efficiency.
Perform all most demanded document editing operations across the supported file formats. GroupDocs.Editor Cloud SDK for Android 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.
Check out GroupDocs.Editor Cloud SDK for Android at GitHub if you are looking for the source code to annotate file in the Cloud.
You can try GroupDocs.Editor Low-Code Android APIs without any limitations.
GroupDocs.Editor Cloud is also available as Docker image which can be used to self-host the service. Or you may build your own Android services using GroupDocs.Editor High-code APIs which currently drive our REST APIs.
//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
Configuration configuration = new Configuration(MyAppSid, MyAppKey);
// Create necessary API instances
EditApi editApi = new EditApi(configuration);
FileApi fileApi = new FileApi(configuration);
// The document already uploaded into the storage.
// Load it into editable state
FileInfo fileInfo = new FileInfo();
fileInfo.setFilePath("WordProcessing/password-protected.docx");
fileInfo.setPassword("password");
WordProcessingLoadOptions loadOptions = new WordProcessingLoadOptions();
loadOptions.setFileInfo(fileInfo);
loadOptions.setOutputPath("output");
LoadResult loadResult = editApi.load(new LoadRequest(loadOptions));
// Download html document
File file = fileApi.downloadFile(new DownloadFileRequest(loadResult.getHtmlPath(), null, null));
// Edit something...
List lines = Files.readAllLines(file.toPath());
List newLines = new ArrayList();
for (String line : lines) {
newLines.add(line.replaceAll("Sample test text", "Hello world"));
}
Files.write(file.toPath(), newLines);
// Upload html back to storage
fileApi.uploadFile(new UploadFileRequest(loadResult.getHtmlPath(), file, Common.MYStorage));
// Save html back to docx
WordProcessingSaveOptions saveOptions = new WordProcessingSaveOptions();
saveOptions.setFileInfo(fileInfo);
saveOptions.setOutputPath("output/edited.docx");
saveOptions.setHtmlPath(loadResult.getHtmlPath());
saveOptions.setResourcesPath(loadResult.getResourcesPath());
DocumentResult saveResult = editApi.save(new SaveRequest(saveOptions));
System.out.println("Document edited: " + saveResult.getPath());