עורך מסמכים REST API לבניית כלי עריכה ומניפולציה מתקדמים של מסמכים באמצעות Java Cloud SDK ברשת, במובייל, במחשב שולחני או בפלטפורמות ענן.
התחל ניסיון חינםGroupDocs.Editor Cloud SDK עבור Java משולב בקלות עם GroupDocs.Editor Cloud REST API, ומאפשר להוסיף תכונות עריכת מסמכים ביישומי Java ללא צורך ב-MS Office או יישומים נוספים מותקנים. באמצעות עורך Java SDK – האץ את משימת המניפולציה של המסמכים על פני מגוון רחב של פורמטים נתמכים כולל Microsoft Word, גיליונות Excel, מצגות, TXT, HTML ו-XML. פשוט הביא את המסמך לכל עורך WYSIWYG של HTML, ערוך אותו לפי הצורך ושמור אותו חזרה לפורמטים המקוריים של המסמך בדיוק וביעילות אמיתיים.
בצע את כל פעולות עריכת המסמכים הנפוצות ביותר על פני הפורמטים הנתמכים. GroupDocs.Editor Cloud SDK עבור Java נבנה כשכבה מעל GroupDocs.Editor Cloud REST API שחוסכת זמן פיתוח יקר על ידי ניהול בקשות ברמה נמוכה וטיפול בתגובות. המפתחים יכולים להתמקד בכתיבת הקוד הספציפי רק לפי הצורך בפרויקט.
עיין בGroupDocs.Editor Cloud SDK for Java at GitHub אם אתה מחפש את קוד המקור להוספת הערות לקובץ בענן.
אתה יכול לנסות GroupDocs.Editor Low-Code Java APIs ללא מגבלות.
GroupDocs.Editor Cloud זמין גם כתמונת Docker שניתן להשתמש בה כדי self-host את השירות. או שאתה יכול לבנות שירותי Java משלך באמצעות GroupDocs.Editor High-code APIs שמניעים כיום את 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());