REST API と Node.js Cloud SDK を使用して、お客様のツールやアプリケーションに文書編集機能を強化できます。
無料トライアルを開始GroupDocs.Editor Cloud SDK for Node.js は、GroupDocs.Editor Cloud SDK for Node.js と GroupDocs.Editor Cloud REST API を統合することで、あらゆるタイプの Node.js アプリケーションにおいて、幅広い一般的な文書フォーマットの編集をサポートします。対応する文書フォーマット(Microsoft Word、Excel スプレッドシート、PowerPoint、TXT、HTML、XML)を任意の WYSIWYG HTML エディタにアップロードし、編集後も同じ外観を保ったまま元のフォーマットに変換するだけです。GroupDocs.Editor Cloud SDK for Node.js は、GroupDocs.Editor Cloud REST API の上にレイヤーとして構築されており、低レベルのリクエスト管理やレスポンス処理を行うことで、貴重な開発時間を節約します。開発者はプロジェクトで必要な特定のコードの記述にのみ集中できます。
クラウドでファイルに注釈を付けるためのソースコードをお探しの場合は、GroupDocs.Editor Cloud SDK(Node.js用、GitHub)(https://github.com/groupdocs-editor-cloud/groupdocs-editor-cloud-node)をご確認ください。
制限なくLow-Code Node.js APIsをGroupDocs.Editor(https://purchase.groupdocs.cloud/trial)で試すことができます。
GroupDocs.Editor Cloud は、Docker イメージとしても利用でき、サービスを self-host する際に使用できます。また、現在弊社の REST APIs を駆動している GroupDocs.Editor High-code 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);