שפר את הכלים והיישומים שלך עם תכונות עריכת מסמכים באמצעות REST API ו-Node.js Cloud SDK.
התחל ניסיון חינםGroupDocs.Editor Cloud SDK עבור Node.js תומך בעריכת מגוון רחב של פורמטים פופולריים של מסמכים בכל סוג של יישום Node.js על-ידי אינטגרציה של GroupDocs.Editor Cloud SDK עבור Node.js עם GroupDocs.Editor Cloud REST API.
הדבר היחיד שעליך לעשות הוא להעלות פורמטים נתמכים של מסמכים ((Microsoft Word, גיליונות עבודה של Excel, PowerPoint, TXT, HTML, XML) בכל עורך WYSIWYG של HTML ולהמיר אותם חזרה לפורמט המקורי תוך שמירה על המראה זהה לאחר עריכת המסמך.
GroupDocs.Editor Cloud SDK עבור Node.js נבנה כשכבה מעל GroupDocs.Editor Cloud REST API שחוסכת זמן פיתוח יקר על-ידי ניהול בקשות ברמת-הנמוכה וטיפול בתגובות. המפתחים יכולים להתמקד בכתיבת הקוד הספציפי רק לפי הצורך בפרויקט.
היכנס לGroupDocs.Editor Cloud SDK for Node.js at GitHub אם אתה מחפש את קוד המקור להוספת הערות לקובץ בענן.
אתה יכול נסה GroupDocs.Editor Low-Code Node.js APIs ללא מגבלות.
GroupDocs.Editor Cloud זמין גם בתור תמונת Docker שניתן להשתמש בה כדי self-host את השירות. לחלופין, באפשרותך לבנות שירותים משלך באמצעות 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).
global.editApi = editor_cloud.EditApi.fromKeys(appSid, appKey);
global.fileApi = editor_cloud.FileApi.fromKeys(appSid, appKey);
// The document already uploaded into the storage.
// Load it into editable state
let fileInfo = new editor_cloud.FileInfo();
fileInfo.filePath = "WordProcessing/password-protected.docx";
fileInfo.password = "password";
let loadOptions = new editor_cloud.WordProcessingLoadOptions();
loadOptions.fileInfo = fileInfo;
loadOptions.outputPath = "output";
let loadResult = await editApi.load(new editor_cloud.LoadRequest(loadOptions));
// Download html document
let buf = await fileApi.downloadFile(new editor_cloud.DownloadFileRequest(loadResult.htmlPath));
let htmlString = buf.toString("utf-8");
// Edit something...
htmlString = htmlString.replace("Sample test text", "Hello world");
// Upload html back to storage
await fileApi.uploadFile(new editor_cloud.UploadFileRequest(loadResult.htmlPath, new Buffer(htmlString, "utf-8")));
// Save html back to docx
let saveOptions = new editor_cloud.WordProcessingSaveOptions();
saveOptions.fileInfo = fileInfo;
saveOptions.outputPath = "output/edited.docx";
saveOptions.htmlPath = loadResult.htmlPath;
saveOptions.resourcesPath = loadResult.resourcesPath;
let saveResult = await editApi.save(new editor_cloud.SaveRequest(saveOptions));
// Done.
console.log("Document edited: " + saveResult.path);