PSPDFProcessorItem

Objective-C


@interface PSPDFProcessorItem : NSObject

Swift

class ProcessorItem : 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.

  • Unavailable

    Not the designated initializer

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Unavailable

    Not the designated initializer

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Configures a ProcessorItem with a image and allows you to configure it using the builder.

    Declaration

    Objective-C

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

    Swift

    convenience init(image: NSImage, jpegCompressionQuality: CGFloat, builderBlock: ((PDFProcessorItemBuilder) -> Void)? = nil)
  • Configures a ProcessorItem 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: ((PDFProcessorItemBuilder) -> Void)? = nil)
  • The image that will be added to the page.

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic, readonly, 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 (nonatomic, readonly) 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.0 to 1.0.

    Note

    If you specify a JPEG image using itemURL, this will have no effect as image won’t be recompressed.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat jpegCompressionQuality;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFRectAlignment alignment;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL shouldUseAlignment;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFItemZPosition zPosition;

    Swift

    var zPosition: ProcessorItem.ZPosition { get }