using System; using System.Collections.Generic; using System.Linq; using System.Security.Permissions; using System.Text; using System.Threading.Tasks; using System.Windows.Input; namespace PDFSettings { public class WatermarkTemplateList : List { } public enum EnumPageRangeIndex { StatusOne = 0, StatusTwo, StatusThree, StatusFour, } public class WatermarkItem : EventArgs { /// /// 模板名称 /// public string templateName = "Watermark"; /// /// 水印类型 /// public ComPDFKit.PDFWatermark.C_Watermark_Type type = ComPDFKit.PDFWatermark.C_Watermark_Type.WATERMARK_TYPE_TEXT; public int listIndex = 0; /// /// 字体名字 /// public string fontName = "Helvetica"; /// /// 字体大小 /// public float fontSize = 48; /// /// 字体大小 /// public float imageSize = 1; /// /// 页码范围 /// public string pageRange; /// /// 水印页面范围索引; /// 0:全部页面 /// 1:奇数页 /// 2;偶数页 /// 3:自定义页 /// public int pageRangeIndex = 0; /// /// 水平位置 /// public ComPDFKit.PDFWatermark.C_Watermark_Horizalign horizalign = ComPDFKit.PDFWatermark.C_Watermark_Horizalign.WATERMARK_HORIZALIGN_CENTER; /// /// 水平偏移量 /// public float horizOffset = 0; /// /// 预览缓存路径 /// public string previewImagePath = ""; /// /// 图片数据缓存 /// public byte[] imageArray = null; /// /// 图片数据缓存路径 /// public string imagepath = ""; /// /// 图片宽 /// public int imageWidth; /// /// 图片高 /// public int imageHeight; /// /// 透明度 0-255 /// public byte opacity = 230; /// /// 旋转角度 /// public float rotation = 0; /// /// 图片缩放比例 /// public float scale = 1; /// /// 水印内容 /// public string text = "Watermark"; /// /// 本文颜色 /// public byte[] textcolor = new byte[] { 255, 0, 0 }; /// /// 垂直位置 /// public ComPDFKit.PDFWatermark.C_Watermark_Vertalign vertalign = ComPDFKit.PDFWatermark.C_Watermark_Vertalign.WATERMARK_VERTALIGN_CENTER; /// /// 垂直偏移量 /// public float vertOffset = 0; /// /// 是否平铺 /// public bool isFullScreen = false; /// /// 水平间距 /// public float horizontalSpacing = (float)(10 * Helpers.Dpi / 25.4); /// /// 垂直间距 /// public float verticalSpacing = (float)(20 * Helpers.Dpi / 25.4); /// /// 水印是否在前 /// public bool isfront = true; /// /// 页面选择的范围 ALL ODD EVEN 1-5(传入用户输入的字符串) /// public string pageangeMode = "ALL"; /// /// 水印是否自适应比例; /// public bool isRelativeScale = false; } }