using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; namespace PDFSettings { public class BackgroundTemplateList : List { } public class BackgroundItem : EventArgs { /// /// 模板名称 /// public string templateName = "Background"; /// /// 文档背景类型 /// public ComPDFKit.PDFDocument.C_Background_Type type = ComPDFKit.PDFDocument.C_Background_Type.BG_TYPE_COLOR; public int listIndex = 0; /// /// 背景颜色 /// public byte[] bgColor = new byte[] { 255, 0, 0 }; /// /// 页码范围 /// public string pageRange; /// /// 水平位置 /// public ComPDFKit.PDFDocument.C_Background_Horizalign horizalign = ComPDFKit.PDFDocument.C_Background_Horizalign.BG_HORIZALIGN_CENTER; /// /// 水平偏移量 /// public float horizOffset = 0; /// /// 图片水印内容 /// public byte[] imageArray = null; /// /// 预览缓存路径 /// public string previewImagePath = ""; /// /// 图片数据缓存路径 /// public string imagepath = ""; /// /// 图片宽 /// public int imageWidth; /// /// 图片高 /// public int imageHeight; /// /// 透明度 0-255 /// public byte opacity = 230; /// /// 旋转角度 /// public float rotation = 0; /// /// 图片缩放比例 /// public float scale = 1; /// /// 垂直位置 /// public ComPDFKit.PDFDocument.C_Background_Vertalign vertalign = ComPDFKit.PDFDocument.C_Background_Vertalign.BG_VERTALIGN_CENTER; /// /// 垂直偏移量 /// public float vertOffset = 0; /// /// 水平间距 /// public float horizontalSpacing = (float)(10 * Helpers.Dpi / 25.4); /// /// 垂直间距 /// public float verticalSpacing = (float)(20 * Helpers.Dpi / 25.4); /// /// 能否打印 /// public bool isCanPrint = true; public bool isCanView = true; /// /// 页面范围索引; /// 0:全部页面 /// 1:奇数页 /// 2;偶数页 /// 3:自定义页 /// public int PageRangeIndex = 0; public bool isRelativeScale = true; } }