قم بتعزيز أدواتك وتطبيقاتك باستخدام ميزات تحرير المستندات باستخدام REST API وNode.js Cloud SDK.
ابدأ التجربة المجانيةتدعم GroupDocs.Editor Cloud SDK for Node.js تحرير مجموعة واسعة من تنسيقات المستندات الشائعة في أي نوع من تطبيقات Node.js من خلال دمج GroupDocs.Editor Cloud SDK for Node.js مع واجهة برمجة تطبيقات GroupDocs.Editor Cloud REST. ما عليك سوى تحميل تنسيقات المستندات المدعومة ((Microsoft Word، وجداول بيانات Excel، وPowerPoint، وTXT، وHTML، وXML) في أي محرر HTML WYSIWYG وتحويلها مرة أخرى إلى تنسيقها الأصلي مع الحفاظ على نفس المظهر بعد تحرير المستند.
تم إنشاء GroupDocs.Editor Cloud SDK for Node.js كطبقة فوق واجهة برمجة تطبيقات GroupDocs.Editor Cloud REST التي توفر وقتًا ثمينًا للتطوير من خلال إدارة الطلبات منخفضة المستوى ومعالجة الاستجابات. يمكن للمطورين التركيز على كتابة الكود المحدد فقط حسب الحاجة في المشروع.
قم بإلقاء نظرة على GroupDocs.Editor Cloud SDK لـ Node.js على GitHub إذا كنت تبحث عن الكود المصدر لشرح ملف في السحابة.
يمكنك تجربة GroupDocs.Editor (https://purchase.groupdocs.cloud/trial) APIs Node.js منخفضة الكود دون أي قيود.
يتوفر GroupDocs.Editor Cloud أيضًا كصورة Docker يمكن استخدامها لاستضافة الخدمة ذاتيًا (https://purchase.groupdocs.cloud/self-hosting). أو يمكنك إنشاء خدماتك الخاصة باستخدام واجهات برمجة التطبيقات عالية الكود GroupDocs.Editor (https://products.groupdocs.com/editor/) التي تدير حاليًا واجهات برمجة التطبيقات REST الخاصة بنا.
//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);