قم بتحسين أدواتك وتطبيقاتك بميزات تحرير المستندات باستخدام 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);