KMPosterPrintManager.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //
  2. // KMPosterPrintManager.h
  3. // PDF Reader Pro Edition
  4. //
  5. // Created by 丁林圭 on 2018/4/3.
  6. //
  7. #import <Cocoa/Cocoa.h>
  8. #import <Quartz/Quartz.h>
  9. typedef NS_OPTIONS(NSUInteger, kKMPDFPosterPrintDirection) {
  10. kKMPDFPosterPrintDirection_Portrait = 0 ,
  11. kKMPDFPosterPrintDirection_Landscape,
  12. };
  13. typedef NS_OPTIONS(NSUInteger, kKMPDFPosterCommentsForms) {
  14. kKMPDFPosterCommentsForms_Documents =0,
  15. kKMPDFPosterCommentsForms_DocumentMarkups ,
  16. kKMPDFPosterCommentsForms_DocumentStamps,
  17. };
  18. typedef NS_OPTIONS(NSUInteger, kKMPDFPosterSplitType) {
  19. kKMPDFPosterSplitType_PageSize =0,
  20. kKMPDFPosterSplitType_PageNumber,
  21. };
  22. @interface KMPDFPosterPrint : NSObject
  23. @property (nonatomic, assign) kKMPDFPosterPrintDirection direction;
  24. @property (nonatomic, assign) CGFloat scale;
  25. @property (nonatomic, assign) CGFloat overlap;
  26. @property (nonatomic, assign) BOOL isLabel;
  27. @property (nonatomic, assign) BOOL isCut;
  28. @property (nonatomic,assign) BOOL isReversePage;
  29. @property (nonatomic, retain) NSArray * cropPages;
  30. @property (nonatomic, retain) NSString * labelString;
  31. @property (nonatomic, assign) CGSize splitSize;//选择裁剪大小
  32. @property (nonatomic, assign) NSEdgeInsets edgeInsets;//裁剪区域周边大小
  33. @property (nonatomic, assign) kKMPDFPosterCommentsForms commentsForms;
  34. @property (nonatomic, assign) kKMPDFPosterSplitType splitType;
  35. @property (nonatomic, assign) CGSize fullPageSize;//纸张大小
  36. @property (nonatomic, assign) NSEdgeInsets fullPageEdgeInsets;
  37. @property (nonatomic, assign) BOOL isOriginalPageSize;
  38. @property (nonatomic, assign) NSInteger lineCount; //行个数
  39. @property (nonatomic, assign) NSInteger columnCount; //列个数
  40. @end
  41. @interface KMPosterPrintManager : NSObject
  42. typedef void(^postPrintCallback)(NSArray *horizontals,NSArray *verticals);
  43. + (KMPosterPrintManager *)defaultManager;
  44. - (void)savePath:(NSString *)path posterPrint:(KMPDFPosterPrint *)print completionHandler:(void (^)(BOOL success))complet;
  45. - (void)posterPrintPage:(PDFPage *)page posterPrint:(KMPDFPosterPrint *)properties completionHandler:(postPrintCallback)handler;
  46. @end