PSPDFNewPageConfiguration

Objective-C


@interface PSPDFNewPageConfiguration : NSObject

Swift

class PDFNewPageConfiguration : NSObject

This class configures a new page for the PSPDFProcessor or PSPDFDocumentEditor. You can configure what type of page it should be and also add images or logos from a PDF.

  • 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
  • Instantiates a new page configuration from the provided template and configuration block.

    Declaration

    Objective-C

    + (nonnull instancetype)
        newPageConfigurationWithPageTemplate:
            (nonnull PSPDFPageTemplate *)pageTemplate
                                builderBlock:
                                    (nullable void (^)(
                                        PSPDFNewPageConfigurationBuilder *_Nonnull))
                                        builderBlock;

    Swift

    convenience init(pageTemplate: PageTemplate, builderBlock: ((NewPageConfigurationBuilder) -> Void)? = nil)

    Parameters

    pageTemplate

    The PSPDFPageTemplate to use for the new page configuration.

    builderBlock

    Block that’ll be executed to build the new page configuration.

    Return Value

    PSPDFNewPageConfiguration instance.

  • The configured page size. If this is CGSizeZero, the size of the first page in the resulting document will be used.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGSize pageSize;

    Swift

    var pageSize: CGSize { get }
  • The configured page rotation. Can only be 0, 90, 180 or 270.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFRotation pageRotation;

    Swift

    var pageRotation: Rotation { get }
  • The configured background color. If nil, no background color will be set in the resulting page.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSColor *backgroundColor;

    Swift

    var backgroundColor: NSColor? { get }
  • The page margins. This is mainly useful for aligning items.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSEdgeInsets pageMargins;

    Swift

    var pageMargins: NSEdgeInsets { get }
  • The tiled pattern that is configured.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) PSPDFPageTemplate *pageTemplate;

    Swift

    var pageTemplate: PageTemplate? { get }
  • The item that will be added to the new page.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) PSPDFProcessorItem *item;

    Swift

    var item: ProcessorItem? { get }