WaterMarkTempleteList.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Security.Permissions;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows.Input;
  8. namespace PDFSettings
  9. {
  10. public class WaterMarkTempleteList:List<WaterMarkTemplete>
  11. {
  12. }
  13. public class WaterMarkTemplete:EventArgs
  14. {
  15. /// <summary>
  16. /// 模板名称
  17. /// </summary>
  18. public string templeteName = "Watermark";
  19. /// <summary>
  20. /// 水印类型
  21. /// </summary>
  22. public ComPDFKit.PDFWatermark.C_Watermark_Type type = ComPDFKit.PDFWatermark.C_Watermark_Type.WATERMARK_TYPE_TEXT;
  23. /// <summary>
  24. /// 字体名字
  25. /// </summary>
  26. public string fontName = "Helvetica";
  27. /// <summary>
  28. /// 字体大小
  29. /// </summary>
  30. public float fontSize = 48;
  31. /// <summary>
  32. /// 页码范围
  33. /// </summary>
  34. public string pageRange;
  35. /// <summary>
  36. /// 水平位置
  37. /// </summary>
  38. public ComPDFKit.PDFWatermark.C_Watermark_Horizalign horizalign = ComPDFKit.PDFWatermark.C_Watermark_Horizalign.WATERMARK_HORIZALIGN_CENTER;
  39. /// <summary>
  40. /// 水平偏移量
  41. /// </summary>
  42. public float horizOffset = 0 ;
  43. public string previeImagePath = "";
  44. /// <summary>
  45. /// 图片数据缓存路径
  46. /// </summary>
  47. public string imagepath = "";
  48. /// <summary>
  49. /// 图片宽
  50. /// </summary>
  51. public int imageWidth;
  52. /// <summary>
  53. /// 图片高
  54. /// </summary>
  55. public int imageHeight;
  56. /// <summary>
  57. /// 透明度 0-255
  58. /// </summary>
  59. public byte opacity =230;
  60. /// <summary>
  61. /// 旋转角度
  62. /// </summary>
  63. public float rotation = 0;
  64. /// <summary>
  65. /// 图片缩放比例
  66. /// </summary>
  67. public float scale = 1;
  68. /// <summary>
  69. /// 水印内容
  70. /// </summary>
  71. public string text="Watermark";
  72. /// <summary>
  73. /// 本文颜色
  74. /// </summary>
  75. public byte[] textcolor = new byte[] {255,0,0};
  76. /// <summary>
  77. /// 垂直位置
  78. /// </summary>
  79. public ComPDFKit.PDFWatermark.C_Watermark_Vertalign vertalign = ComPDFKit.PDFWatermark.C_Watermark_Vertalign.WATERMARK_VERTALIGN_CENTER;
  80. /// <summary>
  81. /// 垂直偏移量
  82. /// </summary>
  83. public float vertOffset = 0;
  84. /// <summary>
  85. /// 是否平铺
  86. /// </summary>
  87. public bool isFullScreen = false;
  88. /// <summary>
  89. /// 水平间距
  90. /// </summary>
  91. public float horizontalSpacing = (float)(10*Helpers.Dpi/25.4);
  92. /// <summary>
  93. /// 垂直间距
  94. /// </summary>
  95. public float verticalSpacing =(float)(20 *Helpers.Dpi / 25.4);
  96. /// <summary>
  97. /// 水印是否在前
  98. /// </summary>
  99. public bool isfront =true;
  100. /// <summary>
  101. /// 页面选择的范围 ALL ODD EVEN 1-5(传入用户输入的字符串)
  102. /// </summary>
  103. public string pageangeMode = "ALL";
  104. }
  105. }