// // StampFileManager.h // PDFReader // // Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved. // // The PDF Reader Sample applications are licensed with a modified BSD license. // Please see License for details. This notice may not be removed from this file. // #import #define kPDFStampDataFolder [NSHomeDirectory() stringByAppendingPathComponent:@"Library/PDFKitResources/Stamp"] #define kPDFStampTextList [NSHomeDirectory() stringByAppendingPathComponent:@"Library/PDFKitResources/Stamp/stamp_text.plist"] #define kPDFStampImageList [NSHomeDirectory() stringByAppendingPathComponent:@"Library/PDFKitResources/Stamp/stamp_image.plist"] typedef enum : NSUInteger { PDFStampCustomType_Text, PDFStampCustomType_Image, } PDFStampCustomType; @interface StampFileManager : NSObject { NSMutableArray *_stampTextList; NSMutableArray *_stampImageList; //用来存放删除了的图片的路径,在类释放的时候将图片删掉 NSMutableArray *_deleteList; } - (void)readStampDataFromFile; - (NSArray *)getTextStampData; - (NSArray *)getImageStampData; - (BOOL)saveStampDataToFile:(PDFStampCustomType)stampType; - (BOOL)insertStampItem:(NSDictionary *)stampItem type:(PDFStampCustomType)stampType; - (BOOL)removeStampItem:(NSInteger)index type:(PDFStampCustomType)stampType; - (NSString *)saveStampWithImage:(UIImage *)image; @end