StampFileManager.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // StampFileManager.h
  3. // PDFReader
  4. //
  5. // Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved.
  6. //
  7. // The PDF Reader Sample applications are licensed with a modified BSD license.
  8. // Please see License for details. This notice may not be removed from this file.
  9. //
  10. #import <UIKit/UIKit.h>
  11. #define kPDFStampDataFolder [NSHomeDirectory() stringByAppendingPathComponent:@"Library/PDFKitResources/Stamp"]
  12. #define kPDFStampTextList [NSHomeDirectory() stringByAppendingPathComponent:@"Library/PDFKitResources/Stamp/stamp_text.plist"]
  13. #define kPDFStampImageList [NSHomeDirectory() stringByAppendingPathComponent:@"Library/PDFKitResources/Stamp/stamp_image.plist"]
  14. typedef enum : NSUInteger {
  15. PDFStampCustomType_Text,
  16. PDFStampCustomType_Image,
  17. } PDFStampCustomType;
  18. @interface StampFileManager : NSObject {
  19. NSMutableArray *_stampTextList;
  20. NSMutableArray *_stampImageList;
  21. //用来存放删除了的图片的路径,在类释放的时候将图片删掉
  22. NSMutableArray *_deleteList;
  23. }
  24. - (void)readStampDataFromFile;
  25. - (NSArray *)getTextStampData;
  26. - (NSArray *)getImageStampData;
  27. - (BOOL)saveStampDataToFile:(PDFStampCustomType)stampType;
  28. - (BOOL)insertStampItem:(NSDictionary *)stampItem type:(PDFStampCustomType)stampType;
  29. - (BOOL)removeStampItem:(NSInteger)index type:(PDFStampCustomType)stampType;
  30. - (NSString *)saveStampWithImage:(UIImage *)image;
  31. @end