PSPDFPageInfo

Objective-C


@interface PSPDFPageInfo : NSObject <NSCopying, NSSecureCoding>

Swift

class PDFPageInfo : NSObject, NSCopying, NSSecureCoding

Represents PDF page data. Managed within PSPDFDocumentProvider.

  • 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
  • Referenced page, relative to the document provider.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFPageIndex pageIndex;

    Swift

    var pageIndex: PageIndex { get }
  • Referenced document provider.

    Declaration

    Objective-C

    @property (nonatomic, weak, readonly) PSPDFDocumentProvider *_Nullable documentProvider;

    Swift

    weak var documentProvider: PSPDFDocumentProvider? { get }
  • The visible size of the page. This considers page rotation.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGSize size;

    Swift

    var size: CGSize { get }
  • Saved clockwise rotation of page in degrees. The possible values are 0, 90, 180 and 270.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFRotation savedRotation;

    Swift

    var savedRotation: Rotation { get }
  • The manually set clockwise rotation of the page relative to its saved rotation.

    The orientation of a page may be modified for display using -[PSPDFDocumentProvider setRotationOffset:forPageAtIndex:] without writing to the PDF. The possible values are 0, 90, 180 and 270. The final rotation a page appears is the sum of rotation and rotationOffset.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFRotation rotationOffset;

    Swift

    var rotationOffset: Rotation { get }
  • Page transform matrix.

    This uses the rotation and CropBox to map from the raw PDF coordinate space to the normalized PDF coordinate space. Applying this transform to the CropBox will give a rectangle with zero origin and a size equal to the size property.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGAffineTransform transform;

    Swift

    var transform: CGAffineTransform { get }
  • Returns the media box that is set in the PDF. This is in PDF coordinates, straight from the PDF.

    Note

    This might return CGRectNull if there’s no MediaBox set.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGRect mediaBox;

    Swift

    var mediaBox: CGRect { get }
  • Returns the crop box that is set in the PDF. This is in PDF coordinates, straight from the PDF.

    Note

    This might return CGRectNull if there’s no CropBox set.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGRect cropBox;

    Swift

    var cropBox: CGRect { get }
  • Defines additional page actions. Key is PSPDFPageTriggerEvent, value a PSPDFAction instance.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSDictionary<NSNumber *, PSPDFAction *> *additionalActions;

    Swift

    var additionalActions: [NSNumber : PSPDFAction]? { get }
  • Can be used to selectively disable annotation creation on the page. This feature is a proprietary PSPDFKit extension. To disable annotation creation add a boolean key (PSPDF:AllowAnnotationCreation) to the PDF page dictionary and set it to false.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL allowAnnotationCreation;

    Swift

    var allowAnnotationCreation: Bool { get }