KMPDFMultipleManager.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //
  2. // KMPDFMorePagePrintManager.h
  3. // PDF Reader Pro Edition
  4. //
  5. // Created by 丁林圭 on 2018/5/17.
  6. //
  7. #import <Cocoa/Cocoa.h>
  8. #import <Quartz/Quartz.h>
  9. typedef NS_OPTIONS(NSUInteger, kKMPDFMultiplePageOrder) {
  10. kKMPDFMultiplePageOrder_Transverse = 0 ,
  11. kKMPDFMultiplePageOrder_TransverseAntitone,
  12. kKMPDFMultiplePageOrder_Longitudinal,
  13. kKMPDFMultiplePageOrder_LongitudinalAntitone,
  14. };
  15. typedef NS_OPTIONS(NSUInteger, kKMPDFMultiplePageDirection) {
  16. kKMPDFMultiplePageDirection_Portrait = 0 ,
  17. kKMPDFMultiplePageDirection_Landscape,
  18. };
  19. typedef NS_OPTIONS(NSUInteger, kKMPDFCommentsForms) {
  20. kKMPDFCommentsForms_Documents =0,
  21. kKMPDFCommentsForms_DocumentMarkups ,
  22. kKMPDFCommentsForms_DocumentStamps,
  23. };
  24. @interface KMEachPageProperties : NSObject
  25. @property (nonatomic,assign) NSInteger rowCount;
  26. @property (nonatomic,assign) NSInteger columnCout;
  27. @property (nonatomic, assign) kKMPDFMultiplePageOrder order;//页面顺序
  28. @property (nonatomic, assign) kKMPDFCommentsForms commentsForms;//页面顺序
  29. @property (nonatomic,assign) BOOL isAutoRotate;
  30. @property (nonatomic,assign) BOOL isHasBorder;
  31. @property (nonatomic,assign) BOOL isReversePage;
  32. @property (nonatomic,assign) kKMPDFMultiplePageDirection direction;
  33. @property (nonatomic,assign) CGSize pageSize;
  34. @property (nonatomic, assign) NSEdgeInsets edgeInsets;//裁剪区域周边大小
  35. @property (nonatomic, assign) CGFloat rowSpace;//行间距
  36. @property (nonatomic, assign) CGFloat columnSpace;//列间距
  37. @end
  38. @interface KMPDFMultipleManager : NSObject
  39. + (KMPDFMultipleManager *)defaultManager;
  40. - (void)drawPageToContext:(CGContextRef)context eachPages:(NSArray<PDFPage *> *)pages multipleOption:(KMEachPageProperties *)properties;
  41. - (void)savePDFDocumentPath:(NSString *)path drawPages:(NSArray<PDFPage *> *)pages multipleOption:(KMEachPageProperties *)properties completionHandler:(void (^)(BOOL isSuccessfully))handler;
  42. @end