12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- //
- // CPDFConverterFPTool.h
- // KdanAuto
- //
- // Created by 朱东勇 on 2023/5/9.
- //
- #import <Foundation/Foundation.h>
- NS_ASSUME_NONNULL_BEGIN
- @protocol CPDFConverterFPToolDelegate <NSObject>
- @optional
- // Going to start the transformation
- - (void)FPPDFConverter:(id)converter didStartConversion:(NSError *)error;
- // Complete the conversion
- - (void)FPPDFConverter:(id)converter didEndConversion:(NSError *)error;
- // Page progress
- - (void)FPPDFConverter:(id)converter
- pageIndex:(NSUInteger)pageIndexA
- progress:(NSUInteger)progress;
- // Finish parsing a page
- - (void)FPPDFConverter:(id)converter
- convertPDFPageIndex:(NSUInteger)pdfPageIndexA
- writeWordPageIndex:(NSUInteger)wordPageIndexA
- finshedWordPageCount:(NSUInteger)wordPageCountA;
- // A page cannot be converted
- - (void)FPPDFConverter:(id)converter
- convertPDFPageIndex:(NSUInteger)pdfPageIndexA
- faildWithError:(NSError *)error;
- // The document will be saved to disk
- - (void)FPPDFConverter:(id)converter willSaveDoc:(NSError *)error;
- // Catch an anomaly
- - (void)FPPDFConverter:(id)converter
- catchException:(NSException *)exception;
- @end
- @interface CPDFConverterFPTool : NSObject
- + (id _Nullable)createConverterFP;
- + (void)setDelegate:(id<CPDFConverterFPToolDelegate> _Nullable)delegate forConverterFP:(id _Nullable)converterFP;
- - (void)setDelegate:(id<CPDFConverterFPToolDelegate> _Nullable)delegate;
- + (void)stopConvertsionIfNeed:(id _Nullable)converterFP;
- - (void)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;
- - (void)convertPDFAtPath:(NSString *)pdfPathA
- pdfPassword:(NSString *)pdfPasswordA
- pdfPageIndexs:(NSArray *)pdfPageIndexsA
- destDocType:(NSString *)destDocTypeA
- destDocPath:(NSString *)destDocPathA
- moreOptions:(NSDictionary *)moreOptionsA;
- @end
- NS_ASSUME_NONNULL_END
|