BatesHeaderFooterTemplateList.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using ComPDFKit.Import;
  7. namespace PDFSettings
  8. {
  9. public class HeaderFooterTemplateList: List<BatesHeaderFooterItem>
  10. {
  11. }
  12. public class BatesTemplateList : List<BatesHeaderFooterItem>
  13. {
  14. }
  15. public class BatesHeaderFooterItem
  16. {
  17. /// <summary>
  18. /// 模板名称
  19. /// </summary>
  20. public string ItemName = "";
  21. /// <summary>
  22. /// 内容
  23. /// </summary>
  24. public contentItem[] TextData = null;
  25. /// <summary>
  26. /// 间距
  27. /// </summary>
  28. ///
  29. public float[] margin = null;
  30. /// <summary>
  31. /// 页面范围
  32. /// </summary>
  33. public string PageRange = "0";
  34. /// <summary>
  35. /// 起始页
  36. /// </summary>
  37. public int StarPagetNumber = 1;
  38. /// <summary>
  39. /// 贝茨码:前缀
  40. /// </summary>
  41. public string Prefix = "";
  42. /// <summary>
  43. /// 贝茨码:后缀
  44. /// </summary>
  45. public string Suffix = "";
  46. ///// <summary>
  47. ///// 贝茨码:起始页
  48. ///// </summary>
  49. //public int StartWithPageNum { get; set; }
  50. /// <summary>
  51. /// 贝茨码:位数
  52. /// </summary>
  53. public int DigitNumber = 1;
  54. /// <summary>
  55. /// 页眉页脚:页码格式
  56. /// </summary>
  57. public string PageNumberFormat = "1";
  58. /// <summary>
  59. /// 页眉页脚:日期格式
  60. /// </summary>
  61. public string DateTimeFormat = "m/d";
  62. /// <summary>
  63. /// 页面范围索引;
  64. /// 0:全部页面
  65. /// 1:奇数页
  66. /// 2;偶数页
  67. /// 3:自定义页
  68. /// </summary>
  69. public int PageRangeIndex = 0;
  70. public int listIndex = 0;
  71. }
  72. public struct contentItem
  73. {
  74. public BateHeaderFooter_ContentType textTag;
  75. public string text;
  76. public string fontName;
  77. public float fontSize;
  78. public byte[] Color;
  79. public float fontColorR;
  80. public float fontColorG;
  81. public float fontColorB;
  82. }
  83. public enum BateHeaderFooter_ContentType
  84. {
  85. L_Header,
  86. C_Header,
  87. R_Header,
  88. L_Footer,
  89. C_Footer,
  90. R_Footer
  91. }
  92. }