PSPDFProcessorItem


@interface PSPDFProcessorItem : NSObject

Represents an item that can be added to either a new page or an existing page. The item can either be a UIImage which will then be compressed as a JPEG using imageJpegCompressionQuality or a NSURL that points to a JPEG or PDF file.

  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFProcessorItem : NSObject
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFProcessorItem : NSObject
  • Configures a PSPDFProcessorItem with a image and allows you to configure it using the builder.

    Declaration

    Objective-C

    + (nonnull instancetype)
    processorItemWithImage:(nonnull UIImage *)image
    jpegCompressionQuality:(CGFloat)jpegCompressionQuality
              builderBlock:(nullable void (^)(PSPDFProcessorItemBuilder *_Nonnull))
                               builderBlock;

    Swift

    convenience init(image: UIImage, jpegCompressionQuality: CGFloat, builderBlock: ((PSPDFProcessorItemBuilder) -> Void)? = nil)
  • Configures a PSPDFProcessorItem with a itemURL and allows you to configure it using the builder. - note: itemURL must point to a local JPEG or PDF file.

    Declaration

    Objective-C

    + (nonnull instancetype)
    processorItemWithItemURL:(nonnull NSURL *)itemURL
                builderBlock:(nullable void (^)(
                                 PSPDFProcessorItemBuilder *_Nonnull))builderBlock;

    Swift

    convenience init(itemURL: URL, builderBlock: ((PSPDFProcessorItemBuilder) -> Void)? = nil)
  • The image that will be added to the page.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) UIImage *image;

    Swift

    var image: UIImage? { get }
  • The itemURL that will be added to the page. Can either be a JPEG or PDF file.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSURL *itemURL;

    Swift

    var itemURL: URL? { get }
  • The image or itemURL can be positioned, scaled and rotated with itemRect Defaults to the identity matrix. @note: If you specify a itemAlignment, only scale and rotation will be effective.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGAffineTransform transform;

    Swift

    var transform: CGAffineTransform { get }
  • The compression that should be used for the JPEG image when embedding into the PDF. Can be 0.0f to 1.0f. - note: If you specify a JPEG image using itemURL, this will have no effect as image won’t be recompressed.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGFloat jpegCompressionQuality;

    Swift

    var jpegCompressionQuality: CGFloat { get }
  • The PSPDFRectAlignment of the item.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFRectAlignment alignment;

    Swift

    var alignment: PSPDFRectAlignment { get }
  • Specifies if the itemAlignment should be used.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL shouldUseAlignment;

    Swift

    var shouldUseAlignment: Bool { get }
  • Specifies if the item is in the foreground or background.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFItemZPosition zPosition;

    Swift

    var zPosition: PSPDFItemZPosition { get }