123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- 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<BackgroundItem>
- {
- }
- public class BackgroundItem : EventArgs
- {
- /// <summary>
- /// 模板名称
- /// </summary>
- public string templateName = "Background";
- /// <summary>
- /// 文档背景类型
- /// </summary>
- public ComPDFKit.PDFDocument.C_Background_Type type = ComPDFKit.PDFDocument.C_Background_Type.BG_TYPE_COLOR;
- public int listIndex = 0;
- /// <summary>
- /// 背景颜色
- /// </summary>
- public byte[] bgColor = new byte[] { 255, 0, 0 };
- /// <summary>
- /// 页码范围
- /// </summary>
- public string pageRange;
- /// <summary>
- /// 水平位置
- /// </summary>
- public ComPDFKit.PDFDocument.C_Background_Horizalign horizalign = ComPDFKit.PDFDocument.C_Background_Horizalign.BG_HORIZALIGN_CENTER;
- /// <summary>
- /// 水平偏移量
- /// </summary>
- public float horizOffset = 0;
- /// <summary>
- /// 图片水印内容
- /// </summary>
- public byte[] imageArray = null;
- /// <summary>
- /// 预览缓存路径
- /// </summary>
- public string previewImagePath = "";
- /// <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 ComPDFKit.PDFDocument.C_Background_Vertalign vertalign = ComPDFKit.PDFDocument.C_Background_Vertalign.BG_VERTALIGN_CENTER;
- /// <summary>
- /// 垂直偏移量
- /// </summary>
- public float vertOffset = 0;
- /// <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 isCanPrint = true;
- public bool isCanView = true;
- /// <summary>
- /// 页面范围索引;
- /// 0:全部页面
- /// 1:奇数页
- /// 2;偶数页
- /// 3:自定义页
- /// </summary>
- public int PageRangeIndex = 0;
- public bool isRelativeScale = true;
- }
- }
|