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