PresentationWatermarkBaseSlideOptions
内容
[
隐藏
]
PresentationWatermarkBaseSlideOptions class
用于向演示文稿文档添加选项的水印基类。
public abstract class PresentationWatermarkBaseSlideOptions : PresentationWatermarkOptions
特性
姓名 | 描述 |
---|---|
AlternativeText { get; set; } | 获取或设置将与形状关联的描述性(替代)文本。 |
Effects { get; set; } | 获取或设置一个值PresentationImageEffects or PresentationTextEffects 对于应该应用于水印的效果。 |
IsLocked { get; set; } | 获取或设置一个值,该值指示是否禁止在 PowerPoint 中编辑形状。 |
Name { get; set; } | 获取或设置形状的名称。 |
ProtectWithUnreadableCharacters { get; set; } | 获取或设置文本水印字符是否混有不可读字符的值。 |
评论
了解更多:
例子
将水印添加到 Power Point 演示文稿的不同服务幻灯片。
PresentationLoadOptions loadOptions = new PresentationLoadOptions();
using (Watermarker watermarker = new Watermarker(@"D:\test.pptx", loadOptions))
{
TextWatermark watermark = new TextWatermark("Test watermark", new Font("Arial", 8));
// 为所有母版幻灯片添加水印
PresentationWatermarkMasterSlideOptions masterSlideOptions = new PresentationWatermarkMasterSlideOptions();
masterSlideOptions.MasterSlideIndex = -1; // 默认
watermarker.Add(watermark, masterSlideOptions);
// 为所有布局幻灯片添加水印
PresentationWatermarkLayoutSlideOptions layoutSlideOptions = new PresentationWatermarkLayoutSlideOptions();
layoutSlideOptions.LayoutSlideIndex = -1; // 默认
watermarker.Add(watermark, layoutSlideOptions);
// 为所有笔记幻灯片添加水印
PresentationWatermarkNoteSlideOptions noteSlideOptions = new PresentationWatermarkNoteSlideOptions();
noteSlideOptions.SlideIndex = -1; // 默认
watermarker.Add(watermark, noteSlideOptions);
// 给讲义母版加水印
PresentationWatermarkMasterHandoutSlideOptions masterHandoutSlideOptions = new PresentationWatermarkMasterHandoutSlideOptions();
watermarker.Add(watermark, masterHandoutSlideOptions);
// 给笔记大师添加水印
PresentationWatermarkMasterNotesSlideOptions masterNotesSlideOptions = new PresentationWatermarkMasterNotesSlideOptions();
watermarker.Add(watermark, masterNotesSlideOptions);
watermarker.Save();
}