CPDFStampAnnotation.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //
  2. // CPDFStampAnnotation.h
  3. // ComPDFKit
  4. //
  5. // Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
  6. //
  7. // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  8. // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  9. // UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  10. // This notice may not be removed from this file.
  11. //
  12. #import <ComPDFKit/CPDFAnnotation.h>
  13. typedef NS_ENUM(NSInteger, CPDFStampType) {
  14. CPDFStampTypeStandard = 0,
  15. CPDFStampTypeText = 1,
  16. CPDFStampTypeImage = 2,
  17. CPDFStampTypeDigital = 3
  18. };
  19. typedef NS_ENUM(NSInteger, CPDFStampStyle) {
  20. CPDFStampStyleWhite = 0,
  21. CPDFStampStyleRed = 1,
  22. CPDFStampStyleGreen = 2,
  23. CPDFStampStyleBlue = 3
  24. };
  25. typedef NS_ENUM(NSInteger, CPDFStampShape) {
  26. CPDFStampShapeRectangle = 0,
  27. CPDFStampShapeArrowLeft = 1,
  28. CPDFStampShapeArrowRight = 2,
  29. CPDFStampShapeNone = 3,
  30. };
  31. /**
  32. * A CPDFStampAnnotation object allows you to display a word or phrase in a PDF page.
  33. *
  34. * @discussion A CPDFStampAnnotation object should have an appearance stream associated with it; otherwise, nothing useful is rendered.
  35. */
  36. @interface CPDFStampAnnotation : CPDFAnnotation
  37. /**
  38. * Initializes CPDFStampAnnotation object with image.
  39. */
  40. - (instancetype)initWithDocument:(CPDFDocument *)document image:(CPDFKitPlatformImage *)image;
  41. /**
  42. * Initializes CPDFStampAnnotation object with standard type.
  43. */
  44. - (instancetype)initWithDocument:(CPDFDocument *)document type:(NSInteger)type;
  45. /**
  46. * Initializes CPDFStampAnnotation object with text.
  47. *
  48. * @see CPDFStampStyle
  49. * @see CPDFStampShape
  50. */
  51. - (instancetype)initWithDocument:(CPDFDocument *)document text:(NSString *)text detailText:(NSString *)detailText style:(CPDFStampStyle)style shape:(CPDFStampShape)shape;
  52. /**
  53. * Initializes CPDFStampAnnotation object with digital stamp type.
  54. */
  55. - (instancetype)initWithDocument:(CPDFDocument *)document text:(NSString *)text detailText:(NSString *)detailText dateText:(NSString *)dateText color:(CPDFKitPlatformColor *)color;
  56. /**
  57. * Gets the stamp type.
  58. *
  59. * @see CPDFStampType
  60. */
  61. - (CPDFStampType)stampType;
  62. /**
  63. * Gets image for the appearance stream of the stamp annotation.
  64. */
  65. - (CPDFKitPlatformImage *)stampImage;
  66. @end