123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- //
- // CPDFConverterFPTool.m
- // KdanAuto
- //
- // Created by 朱东勇 on 2023/5/9.
- //
- #import "CPDFConverterFPTool.h"
- #import "CPDFConverterFP.h"
- @implementation CPDFConverterFPTool
- + (id)createConverterFP {
- Class cls = NSClassFromString(@"CPDFConverterFP");
- if (cls == NULL)
- return nil;
-
- return [[cls alloc] init];
- }
- + (void)setDelegate:(id<CPDFConverterFPToolDelegate> _Nullable)delegate forConverterFP:(id _Nullable)converterFP {
- Class cls = NSClassFromString(@"CPDFConverterFP");
- if (cls == NULL)
- return;
-
- if (converterFP != nil &&
- [converterFP isKindOfClass:cls] ) {
- [((CPDFConverterFPTool*)converterFP) setDelegate:delegate];
- }
- }
- + (void)stopConvertsionIfNeed:(NSObject* _Nullable)converterFP {
- Class cls = NSClassFromString(@"CPDFConverterFP");
- if (cls == NULL)
- return;
-
- if (converterFP != nil &&
- [converterFP isKindOfClass:cls]) {
- [((CPDFConverterFPTool*)converterFP) stopConvertsionIfNeed];
- }
- }
- + (void)convertPDFForConverterFP:(id _Nullable)converterFP
- path:(NSString *)pdfPathA
- pdfPassword:(NSString * _Nullable)pdfPasswordA
- pdfPageIndexs:(NSArray *)pdfPageIndexsA
- destDocType:(NSString *)destDocTypeA
- destDocPath:(NSString *)destDocPathA
- moreOptions:(NSDictionary*)moreOptionsA {
- Class cls = NSClassFromString(@"CPDFConverterFP");
- if (cls == NULL)
- return;
-
- if (converterFP != nil &&
- [converterFP isKindOfClass:cls]) {
- [((CPDFConverterFPTool*)converterFP) convertPDFAtPath:pdfPathA
- pdfPassword:pdfPasswordA
- pdfPageIndexs:pdfPageIndexsA
- destDocType:destDocTypeA
- destDocPath:destDocPathA
- moreOptions:moreOptionsA];
- }
- }
- - (void)setDelegate:(id<CPDFConverterFPToolDelegate> _Nullable)delegate {
-
- }
- - (void)stopConvertsionIfNeed {
-
- }
- - (void)convertPDFAtPath:(NSString *)pdfPathA
- pdfPassword:(NSString *)pdfPasswordA
- pdfPageIndexs:(NSArray *)pdfPageIndexsA
- destDocType:(NSString *)destDocTypeA
- destDocPath:(NSString *)destDocPathA
- moreOptions:(NSDictionary *)moreOptionsA {
-
- }
- @end
|