GroupDocs.Editor for .NET API adalah pilihan yang tepat untuk mengedit dokumen dan presentasi Microsoft Word, Excel, PowerPoint, Open Office. GroupDocs.Editor adalah API mandiri yang cocok untuk sisi server dan sistem back-end yang membutuhkan kinerja tinggi. Itu tidak tergantung pada perangkat lunak apa pun seperti Microsoft atau Open Office.
GroupDocs.Editor for .NET menyediakan cara mudah dan langsung bagi pengembang untuk mengedit file OTP menggunakan beberapa baris kode.
Editor
dengan jalur file wajib atau aliran byte dan kelas PresentationLoadOptions
opsional dan muat file OTPPresentationEditOptions
untuk format file OTPEditor.Edit()
dan dapatkan dokumen OTP dalam format HTML yang mudah diedit dengan editor WYSIWYG apa pun.Editor.Save()
dan simpan file OTP yang telah diedit menggunakan kelas PresentationSaveOptions
Pengeditan dokumen dasar dengan GroupDocs.Editor for .NET API dapat dilakukan dengan menerapkan beberapa langkah mudah. API kami didukung di semua platform dan sistem operasi utama. Sebelum menjalankan kode di bawah ini, pastikan Anda telah menginstal prasyarat berikut di sistem Anda.
// Load the OTP file into Editor with the optional PresentationLoadOptions
Editor editor = new Editor("source.otp", delegate { return new PresentationLoadOptions(); });
// Create and adjust the edit options
PresentationEditOptions editOptions = new PresentationEditOptions();
editOptions.SlideNumber = 1;//select a slide to edit
// Open input OTP document for edit — obtain an intermediate document, that can be edited
EditableDocument beforeEdit = editor.Edit(editOptions);
// Grab OTP document content and associated resources from editable document
string content = beforeEdit.GetEmbeddedHtml();
// Send the content to WYSIWYG-editor, edit it there, and send edited content back to the server-side
// This step simulates a such operation
string updatedContent = content.Replace("Title", "Edited Title");
// Grab edited content and resources from WYSIWYG-editor and create a new EditableDocument instance from it
EditableDocument afterEdit = EditableDocument.FromMarkup(updatedContent, null);
// Create a save options and select a desired output format
PresentationSaveOptions saveOptions = new PresentationSaveOptions(Formats.PresentationFormats.Otp);
// Save edited OTP document to the file
editor.Save(afterEdit, "edited.otp", saveOptions);
Edit OTP sekarang juga dengan mengunjungi situs web GroupDocs.Editor Live Demos. Demo langsung memiliki manfaat sebagai berikut
Tidak perlu mengunduh API
Tidak perlu menulis kode apa pun
Cukup unggah file sumbernya
Dapatkan tautan unduhan untuk menyimpan file