cpdf_options.dart 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /// Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
  2. ///
  3. /// THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  4. /// AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  5. /// UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  6. /// This notice may not be removed from this file.
  7. enum CPreviewMode { viewer, annotations, contentEditor, forms, signatures }
  8. enum ToolbarAction { back, thumbnail, search, bota, menu }
  9. enum ToolbarMenuAction {
  10. viewSettings,
  11. documentEditor,
  12. security,
  13. watermark,
  14. flattened,
  15. documentInfo,
  16. save,
  17. share,
  18. openDocument
  19. }
  20. enum CPDFDisplayMode { singlePage, doublePage, coverPage }
  21. /// readerView background themes
  22. enum CPDFThemes {
  23. /// Bright mode, readerview background is white
  24. light,
  25. /// dark mode, readerview background is black
  26. dark,
  27. /// brown paper color
  28. sepia,
  29. /// Light green, eye protection mode
  30. reseda
  31. }
  32. enum CPDFAnnotationType {
  33. note,
  34. highlight,
  35. underline,
  36. squiggly,
  37. strikeout,
  38. ink,
  39. // only ios platform
  40. pencil,
  41. circle,
  42. square,
  43. arrow,
  44. line,
  45. freetext,
  46. signature,
  47. stamp,
  48. pictures,
  49. link,
  50. sound
  51. }
  52. enum CPDFConfigTool { setting, undo, redo }
  53. enum CPDFFormConfigTool { undo, redo }
  54. enum CPDFAnnotBorderStyle { solid, dashed }
  55. enum CPDFLineType { none, openArrow, closedArrow, square, circle, diamond }
  56. enum CPDFAlignment { left, center, right }
  57. enum CPDFTypeface { courier, helvetica, timesRoman }
  58. extension CPDFTypefaceExtension on CPDFTypeface {
  59. String getFontName() {
  60. switch (name) {
  61. case 'courier':
  62. return 'Courier';
  63. case 'helvetica':
  64. return 'Helvetica';
  65. case 'timesRoman':
  66. return 'Times-Roman';
  67. default:
  68. return 'Courier';
  69. }
  70. }
  71. }
  72. extension CPDFTypefaceEnumExten on Iterable<CPDFTypeface> {
  73. CPDFTypeface byFontName(String fontName) {
  74. switch (fontName.toLowerCase()) {
  75. case 'courier':
  76. return CPDFTypeface.courier;
  77. case 'helvetica':
  78. return CPDFTypeface.helvetica;
  79. case 'times-roman':
  80. return CPDFTypeface.timesRoman;
  81. default:
  82. return CPDFTypeface.courier;
  83. }
  84. }
  85. }
  86. enum CPDFContentEditorType { editorText, editorImage }
  87. enum CPDFFormType {
  88. textField,
  89. checkBox,
  90. radioButton,
  91. listBox,
  92. comboBox,
  93. signaturesFields,
  94. pushButton
  95. }
  96. enum CPDFCheckStyle { check, circle, cross, diamond, square, star }