CPDFKitConfig.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. //
  2. // CPDFKitConfig.h
  3. // ComPDFKit
  4. //
  5. // Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
  6. //
  7. // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  8. // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  9. // UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  10. // This notice may not be removed from this file.
  11. //
  12. #import <Foundation/Foundation.h>
  13. #import <ComPDFKit/CPDFKitPlatform.h>
  14. #import <ComPDFKit/CPDFView.h>
  15. #define CPDFKitShareConfig [CPDFKitConfig sharedInstance]
  16. @interface CPDFKitConfig : NSObject
  17. /**
  18. * The shared CPDFKitConfig configuration instance.
  19. */
  20. + (instancetype)sharedInstance;
  21. /**
  22. * Get the cache size.
  23. */
  24. - (unsigned long long)cacheSize;
  25. /**
  26. * Clear the cache.
  27. */
  28. - (void)clearCache;
  29. /**
  30. * Get the default view mode of CPDFView.
  31. * View Mode : Horizontally, Vertically
  32. *
  33. * @see CPDFDisplayDirection
  34. */
  35. - (CPDFDisplayDirection)displayDirection;
  36. /**
  37. * Set the default view mode of CPDFView.
  38. *
  39. * @see CPDFDisplayDirection
  40. */
  41. - (void)setDisplayDirection:(CPDFDisplayDirection)displayDirection;
  42. /**
  43. * Get the default reading mode of CPDFView.
  44. * Reading Mode : Night, Soft, Green, Other
  45. *
  46. * @see CPDFDisplayMode
  47. */
  48. - (CPDFDisplayMode)displayMode;
  49. /**
  50. * Set the default reading mode of CPDFView.
  51. *
  52. * @see CPDFDisplayMode
  53. */
  54. - (void)setDisplayMode:(CPDFDisplayMode)displayMode;
  55. /**
  56. * Get a custom background color for the rendered mode of CPDFView.
  57. */
  58. - (CPDFKitPlatformColor *)displayModeCustomColor;
  59. /**
  60. * Set a custom background color for the rendered mode of CPDFView.
  61. */
  62. - (void)setDisplayModeCustomColor:(CPDFKitPlatformColor *)displayModeCustomColor;
  63. /**
  64. * Get whether to allow to highlight link field in the CPDFView.
  65. */
  66. - (BOOL)enableLinkFieldHighlight;
  67. /**
  68. * Set whether to allow to highlight link field in the CPDFView.
  69. */
  70. - (void)setEnableLinkFieldHighlight:(BOOL)enableLinkFieldHighlight;
  71. /**
  72. * Get whether to allow to highlight form field in the CPDFView.
  73. */
  74. - (BOOL)enableFormFieldHighlight;
  75. /**
  76. * Set whether to allow to highlight form field in the CPDFView.
  77. */
  78. - (void)setEnableFormFieldHighlight:(BOOL)enableFormFieldHighlight;
  79. /**
  80. * Get whether to allow annotation rotation.
  81. */
  82. - (BOOL)enableAnnotationNoRotate;
  83. /**
  84. * If set, do not rotate the annotation’s appearance to match the rotation of the page.
  85. * The upper-left corner of the annotation rectangle shall remain in a fixed location on the page, regardless of the page rotation.
  86. */
  87. - (void)setEnableAnnotationNoRotate:(BOOL)enableAnnotationNoRotate;
  88. /**
  89. * Get the default author of annotations.
  90. */
  91. - (NSString *)annotationAuthor;
  92. /**
  93. * Set the default author of annotations.
  94. */
  95. - (void)setAnnotationAuthor:(NSString *)annotationAuthor;
  96. /**
  97. * Get whether to allow to add freehand annotation by PencilKit.
  98. */
  99. - (BOOL)enableFreehandPencilKit;
  100. /**
  101. * Set whether to allow to add annotation by PencilKit.
  102. */
  103. - (void)setEnableFreehandPencilKit:(BOOL)enableFreehandPencilKit;
  104. /**
  105. * Get the default color of highlight annotations.
  106. */
  107. - (CPDFKitPlatformColor *)highlightAnnotationColor;
  108. /**
  109. * Set the default color of highlight annotations.
  110. */
  111. - (void)setHighlightAnnotationColor:(CPDFKitPlatformColor *)highlightAnnotationColor;
  112. /**
  113. * Get the default color of underline annotations.
  114. */
  115. - (CPDFKitPlatformColor *)underlineAnnotationColor;
  116. /**
  117. * Set the default color of underline annotations.
  118. */
  119. - (void)setUnderlineAnnotationColor:(CPDFKitPlatformColor *)underlineAnnotationColor;
  120. /**
  121. * Get the default color of strikeout annotations.
  122. */
  123. - (CPDFKitPlatformColor *)strikeoutAnnotationColor;
  124. /**
  125. * Set the default color of strikeout annotations.
  126. */
  127. - (void)setStrikeoutAnnotationColor:(CPDFKitPlatformColor *)strikeoutAnnotationColor;
  128. /**
  129. * Get the default color of squiggly annotations.
  130. */
  131. - (CPDFKitPlatformColor *)squigglyAnnotationColor;
  132. /**
  133. * Set the default color of squiggly annotations.
  134. */
  135. - (void)setSquigglyAnnotationColor:(CPDFKitPlatformColor *)squigglyAnnotationColor;
  136. /**
  137. * Get the default opacity of markup annotations.
  138. */
  139. - (CGFloat)markupAnnotationOpacity;
  140. /**
  141. * Set the default opacity of markup annotations.
  142. */
  143. - (void)setMarkupAnnotationOpacity:(CGFloat)markupAnnotationOpacity;
  144. /**
  145. * Get the default color of shape annotations.
  146. */
  147. - (CPDFKitPlatformColor *)shapeAnnotationColor;
  148. /**
  149. * Set the default color of shape annotations.
  150. */
  151. - (void)setShapeAnnotationColor:(CPDFKitPlatformColor *)shapeAnnotationColor;
  152. /**
  153. * Get the default interior color of shape annotations.
  154. */
  155. - (CPDFKitPlatformColor *)shapeAnnotationInteriorColor;
  156. /**
  157. * Set the default interior color of shape annotations.
  158. */
  159. - (void)setShapeAnnotationInteriorColor:(CPDFKitPlatformColor *)shapeAnnotationInteriorColor;
  160. /**
  161. * Get the default opacity of shape annotations.
  162. */
  163. - (CGFloat)shapeAnnotationOpacity;
  164. /**
  165. * Set the default opacity of shape annotations.
  166. */
  167. - (void)setShapeAnnotationOpacity:(CGFloat)shapeAnnotationOpacity;
  168. /**
  169. * Get the default interior opacity of shape annotations.
  170. */
  171. - (CGFloat)shapeAnnotationInteriorOpacity;
  172. /**
  173. * Set the default interior opacity of shape annotations.
  174. */
  175. - (void)setShapeAnnotationInteriorOpacity:(CGFloat)shapeAnnotationInteriorOpacity;
  176. /**
  177. * Get the default border width of shape annotations.
  178. */
  179. - (CGFloat)shapeAnnotationBorderWidth;
  180. /**
  181. * Set the default border width of shape annotations.
  182. */
  183. - (void)setShapeAnnotationBorderWidth:(CGFloat)shapeAnnotationBorderWidth;
  184. /**
  185. * Get the default color of freehand annotations.
  186. */
  187. - (CPDFKitPlatformColor *)freehandAnnotationColor;
  188. /**
  189. * Set the default color of freehand annotations.
  190. */
  191. - (void)setFreehandAnnotationColor:(CPDFKitPlatformColor *)freehandAnnotationColor;
  192. /**
  193. * Get the default opacity of freehand annotations.
  194. */
  195. - (CGFloat)freehandAnnotationOpacity;
  196. /**
  197. * Set the default opacity of freehand annotations.
  198. */
  199. - (void)setFreehandAnnotationOpacity:(CGFloat)freehandAnnotationOpacity;
  200. /**
  201. * Get the default border width of freehand annotations.
  202. */
  203. - (CGFloat)freehandAnnotationBorderWidth;
  204. /**
  205. * Set the default border width of freehand annotations.
  206. */
  207. - (void)setFreehandAnnotationBorderWidth:(CGFloat)freehandAnnotationBorderWidth;
  208. @end