import groupdocs.redaction as gr
import groupdocs.redaction.redactions as grr
import groupdocs.pydrawing as grd
# ปกปิดข้อความที่ละเอียดอ่อนใน POWERPOINT โดยใช้การทับซ้อน
# ตั้งค่าให้การแก้ไขทำงาน
# เลือกข้อความและสีให้ซ่อน
color = grd.Color.from_argb(255, 220, 20, 60)
repl_opt = grr.ReplacementOptions(color)
redaction = grr.ExactPhraseRedaction("Text to hide", repl_opt)
# ใช้ Redactor เพื่อโหลดงานนำเสนอของคุณ
with gr.Redactor("input.pptx") as redactor:
# ดำเนินการแก้ไขและบันทึกไฟล์
result = redactor.apply(redaction)
redactor.save()