cpdf_options.dart 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. /// The [ToolbarAction.back] button will only be displayed on the leftmost side of the top toolbar on the Android platform
  9. enum ToolbarAction { back, thumbnail, search, bota, menu }
  10. enum ToolbarMenuAction {
  11. viewSettings,
  12. documentEditor,
  13. security,
  14. watermark,
  15. flattened,
  16. documentInfo,
  17. save,
  18. share,
  19. openDocument
  20. }
  21. enum CPDFDisplayMode { singlePage, doublePage, coverPage }
  22. /// readerView background themes
  23. enum CPDFThemes {
  24. /// Bright mode, readerview background is white
  25. light,
  26. /// dark mode, readerview background is black
  27. dark,
  28. /// brown paper color
  29. sepia,
  30. /// Light green, eye protection mode
  31. reseda
  32. }
  33. enum CPDFAnnotationType {
  34. note,
  35. highlight,
  36. underline,
  37. squiggly,
  38. strikeout,
  39. ink,
  40. // only ios platform
  41. pencil,
  42. circle,
  43. square,
  44. arrow,
  45. line,
  46. freetext,
  47. signature,
  48. stamp,
  49. pictures,
  50. link,
  51. sound
  52. }
  53. enum CPDFConfigTool { setting, undo, redo }
  54. enum CPDFFormConfigTool { undo, redo }
  55. enum CPDFAnnotBorderStyle { solid, dashed }
  56. enum CPDFLineType { none, openArrow, closedArrow, square, circle, diamond }
  57. enum CPDFAlignment { left, center, right }
  58. enum CPDFTypeface { courier, helvetica, timesRoman }
  59. extension CPDFTypefaceExtension on CPDFTypeface {
  60. String getFontName() {
  61. switch (name) {
  62. case 'courier':
  63. return 'Courier';
  64. case 'helvetica':
  65. return 'Helvetica';
  66. case 'timesRoman':
  67. return 'Times-Roman';
  68. default:
  69. return 'Courier';
  70. }
  71. }
  72. }
  73. extension CPDFTypefaceEnumExten on Iterable<CPDFTypeface> {
  74. CPDFTypeface byFontName(String fontName) {
  75. switch (fontName.toLowerCase()) {
  76. case 'courier':
  77. return CPDFTypeface.courier;
  78. case 'helvetica':
  79. return CPDFTypeface.helvetica;
  80. case 'times-roman':
  81. return CPDFTypeface.timesRoman;
  82. default:
  83. return CPDFTypeface.courier;
  84. }
  85. }
  86. }
  87. enum CPDFContentEditorType { editorText, editorImage }
  88. enum CPDFFormType {
  89. textField,
  90. checkBox,
  91. radioButton,
  92. listBox,
  93. comboBox,
  94. signaturesFields,
  95. pushButton
  96. }
  97. enum CPDFCheckStyle { check, circle, cross, diamond, square, star }