cpdf_options.dart 2.6 KB

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