Trình chỉnh sửa tài liệu REST API để xây dựng các công cụ chỉnh sửa và thao tác tài liệu nâng cao bằng Android Cloud SDK trên web, di động, máy tính để bàn hoặc nền tảng đám mây.
Bắt đầu dùng thử miễn phíGroupDocs.Editor Cloud SDK cho Android dễ dàng tích hợp với GroupDocs.Editor Cloud REST API, cho phép thêm tính năng chỉnh sửa tài liệu vào các ứng dụng Android mà không cần cài đặt MS Office hoặc các ứng dụng bổ sung khác. Sử dụng trình chỉnh sửa Android SDK – tăng tốc nhiệm vụ thao tác tài liệu trên nhiều định dạng tài liệu được hỗ trợ, bao gồm Microsoft Word, bảng tính Excel, Bản trình chiếu, TXT, HTML và XML. Chỉ cần lấy tài liệu vào bất kỳ trình chỉnh sửa WYSIWYG HTML nào, chỉnh sửa theo nhu cầu và lưu lại dưới định dạng tài liệu gốc với độ chính xác và hiệu quả cao.
Thực hiện tất cả các thao tác chỉnh sửa tài liệu được yêu cầu nhiều nhất trên các định dạng tệp được hỗ trợ. GroupDocs.Editor Cloud SDK cho Android được xây dựng như một lớp trên GroupDocs.Editor Cloud REST API, giúp tiết kiệm thời gian phát triển quý giá bằng cách quản lý các yêu cầu cấp thấp và xử lý phản hồi. Các nhà phát triển có thể tập trung vào việc viết mã cụ thể chỉ khi cần trong dự án.
Hãy xem GroupDocs.Editor Cloud SDK cho Android tại GitHub nếu bạn đang tìm mã nguồn để chú thích tệp trong đám mây.
Bạn có thể dùng thử GroupDocs.Editor Low-Code Android APIs không giới hạn.
GroupDocs.Editor Cloud cũng có sẵn dưới dạng ảnh Docker có thể được dùng để self-host dịch vụ. Hoặc bạn có thể xây dựng các dịch vụ Android của riêng mình bằng cách sử dụng GroupDocs.Editor High-code APIs hiện đang điều khiển REST APIs của chúng tôi.
//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());