שפר את הכלים והיישומים שלך עם תכונות עריכת מסמכים באמצעות 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) בכל עורך HTML של WYSIWYG ולהמיר אותו בחזרה לפורמט המקורי שלו תוך שמירה על אותו מראה לאחר עריכת המסמך.
GroupDocs.Editor Cloud SDK עבור Node.js בנוי כשכבה על גבי GroupDocs.Editor Cloud REST API שחוסך זמן פיתוח יקר על ידי ניהול בקשות ברמה נמוכה וטיפול בתגובות. המפתחים יכולים להתמקד בכתיבת הקוד הספציפי רק לפי הצורך בפרויקט.
בדוק את GroupDocs.Editor Cloud SDK for Node.js ב-GitHub אם אתה מחפש את קוד המקור להוספת הערות לקובץ הענן.
אתה יכול לנסות GroupDocs.Editor ממשקי API של Node.js בקוד נמוך ללא כל הגבלה.
GroupDocs.Editor Cloud זמין גם כתמונת Docker שניתן להשתמש בה כדי אירוח עצמי את השירות. לחלופין, תוכל לבנות שירותים משלך באמצעות GroupDocs.Editor APIs High-code המניעים כעת את ממשקי ה-REST API שלנו.
//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);