โปรแกรมแก้ไขเอกสาร REST API เพื่อแก้ไขรูปแบบเอกสารยอดนิยมโดยใช้ตัวแก้ไข HTML แบบ WYSIWYG โดยไม่ต้องขอให้ติดตั้งแอปพลิเคชันภายนอก
เริ่มทดลองใช้งานฟรีGroupDocs.Editor Cloud SDK สำหรับ Python ช่วยให้นักพัฒนาสามารถรวมฟีเจอร์การแก้ไขเอกสารในแอปพลิเคชันที่ใช้ Python ได้ง่ายขึ้นโดยการผสานรวมกับ GroupDocs.Editor Cloud REST API ดำเนินการแก้ไขเอกสารขั้นสูงโดยเพียงแค่ดึงประเภทเอกสารที่รองรับ (Microsoft Word, สเปรดชีต Excel, PowerPoint, TXT, HTML, XML) ในโปรแกรมแก้ไข HTML ฟรอนต์เอนด์ใดๆ โดยใช้ GroupDocs.Editor Cloud API แล้วบันทึกกลับเป็นรูปแบบเอกสารเดิมหลังจากแก้ไขเอกสาร
GroupDocs.Editor Cloud SDK สำหรับ Python ถูกสร้างขึ้นเป็นเลเยอร์บน GroupDocs.Editor Cloud REST API ซึ่งช่วยประหยัดเวลาในการพัฒนาที่มีค่าด้วยการจัดการคำขอในระดับต่ำและการจัดการการตอบกลับ นักพัฒนาสามารถมุ่งเน้นไปที่การเขียนโค้ดเฉพาะตามที่จำเป็นในโครงการเท่านั้น
ลองดู GroupDocs.Editor Cloud SDK สำหรับ Python ที่ GitHub หากคุณกำลังมองหาโค้ดต้นฉบับเพื่อใส่คำอธิบายประกอบไฟล์บน Cloud
คุณสามารถลองใช้ GroupDocs.Editor (https://purchase.groupdocs.cloud/trial) Low-Code Python API โดยไม่มีข้อจำกัดใดๆ
GroupDocs.Editor Cloud ยังพร้อมใช้งานเป็นอิมเมจ Docker ซึ่งสามารถใช้ในการโฮสต์บริการด้วยตนเอง (https://purchase.groupdocs.cloud/self-hosting) หรือคุณอาจสร้างบริการของคุณเองโดยใช้ GroupDocs.Editor High-code APIs (https://products.groupdocs.com/editor/) ซึ่งปัจจุบันควบคุม REST API ของเรา
//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
editApi = groupdocs_editor_cloud.EditApi.from_keys(app_sid, app_key)
fileApi = groupdocs_editor_cloud.FileApi.from_keys(app_sid, app_key)
# The document already uploaded into the storage.
# Load it into editable state
fileInfo = groupdocs_editor_cloud.FileInfo("WordProcessing/password-protected.docx", None, None, "password")
loadOptions = groupdocs_editor_cloud.WordProcessingLoadOptions()
loadOptions.file_info = fileInfo
loadOptions.output_path = "output"
loadResult = editApi.load(groupdocs_editor_cloud.LoadRequest(loadOptions))
# Download html document
htmlFile = fileApi.download_file(groupdocs_editor_cloud.DownloadFileRequest(loadResult.html_path))
html = ""
with open(htmlFile, 'r') as file:
html = file.read()
# Edit something...
html = html.replace("Sample test text", "Hello world")
# Upload html back to storage
with open(htmlFile, 'w') as file:
file.write(html)
fileApi.upload_file(groupdocs_editor_cloud.UploadFileRequest(loadResult.html_path, htmlFile))
# Save html back to docx
saveOptions = groupdocs_editor_cloud.WordProcessingSaveOptions()
saveOptions.file_info = fileInfo
saveOptions.output_path = "output/edited.docx"
saveOptions.html_path = loadResult.html_path
saveOptions.resources_path = loadResult.resources_path
saveResult = editApi.save(groupdocs_editor_cloud.SaveRequest(saveOptions))
# Done
print("Document edited: " + saveResult.path)