CPDFKit.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. //
  2. // CPDFKit.h
  3. // ComPDFKit
  4. //
  5. // Copyright © 2014-2022 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. typedef NS_ENUM(NSInteger, CPDFKitFeatureType) {
  14. CPDFKitFeatureViewerOutline,
  15. CPDFKitFeatureViewerBookmark,
  16. CPDFKitFeatureViewerRender,
  17. CPDFKitFeatureViewerSearch,
  18. CPDFKitFeatureAnnotationNote,
  19. CPDFKitFeatureAnnotationLink,
  20. CPDFKitFeatureAnnotationFreeText,
  21. CPDFKitFeatureAnnotationShape,
  22. CPDFKitFeatureAnnotationMarkup,
  23. CPDFKitFeatureAnnotationStandardStamp,
  24. CPDFKitFeatureAnnotationCustomizedStamp,
  25. CPDFKitFeatureAnnotationInk,
  26. CPDFKitFeatureAnnotationSound,
  27. CPDFKitFeatureAnnotationDelete,
  28. CPDFKitFeatureAnnotationFlatten,
  29. CPDFKitFeatureAnnotationXFDF,
  30. CPDFKitFeatureForm,
  31. CPDFKitFeatureFormFill,
  32. CPDFKitFeatureEditorPage,
  33. CPDFKitFeatureEditorExtract,
  34. CPDFKitFeatureEditorInfo,
  35. CPDFKitFeatureEditorConvert,
  36. CPDFKitFeatureSecurityEncrypt,
  37. CPDFKitFeatureSecurityDecrypt,
  38. CPDFKitFeatureSecurityWatermark,
  39. CPDFKitFeatureConversionPDFA
  40. };
  41. @interface CPDFKit : NSObject
  42. /**
  43. * The shared ComPDFKit instance.
  44. */
  45. + (instancetype)sharedInstance;
  46. /**
  47. * Activate ComPDFKit with your license key and secret.
  48. */
  49. + (void)setLicenseKey:(NSString *)licenseKey secret:(NSString *)licenseSecret;
  50. /**
  51. * Returns the full ComPDFKit product version string. (e.g. "ComPDFKit 1.0.1 for iOS (101)")
  52. */
  53. @property(atomic,readonly) NSString *versionString;
  54. /**
  55. * Returns just the framework version. (e.g. 1.0.1)
  56. */
  57. @property(atomic,readonly) NSString *versionNumber;
  58. /**
  59. * The internal build number. Increments with every version.
  60. */
  61. @property(atomic,readonly) NSUInteger buildNumber;
  62. /**
  63. * Whether to allow to use specified features.
  64. *
  65. * @see CPDFKitFeatureType
  66. */
  67. - (BOOL)allowsFeature:(CPDFKitFeatureType)type;
  68. /**
  69. * Convert files (doc, docx, xls, xlsx, ppt, pptx, txt, jpeg, and png) to PDF.
  70. */
  71. - (void)convertFilePath:(NSString *)filePath toPath:(NSString *)pdfFilePath completion:(void (^)(BOOL result))completion;
  72. @end