PTContentItem

@interface PTContentItem : NSObject

Content items are graphical objects that exist in the document independently of the structure tree but are associated with structure elements.

Content items are leaf nodes of the structure tree.

  • Copy constructor and assignment operator.

    Declaration

    Objective-C

    - (instancetype)initWithArg0:(PTContentItem *)arg0;

    Swift

    init!(arg0: PTContentItem!)
  • Declaration

    Objective-C

    - (PTContentItemType)GetType;

    Swift

    func getType() -> PTContentItemType

    Return Value

    the content item type.

  • Find the parent structure element.

    Declaration

    Objective-C

    - (PTSElement *)GetParent;

    Swift

    func getParent() -> PTSElement!
  • The page on which the marked content is drawn, whether directly as part of page content or indirectly by being in a Form XObject or annotation drawn on that page.

    Declaration

    Objective-C

    - (PTPage *)GetPage;

    Swift

    func getPage() -> PTPage!
  • Declaration

    Objective-C

    - (PTObj *)GetSDFObj;

    Swift

    func getSDFObj() -> PTObj!

    Return Value

    Pointer to the underlying SDF/Cos object.

  • Note

    this method only applies to content items with types e_MCR or e_MCID.

    Declaration

    Objective-C

    - (int)GetMCID;

    Swift

    func getMCID() -> Int32

    Return Value

    mcid (marked-content identifier).

  • Note

    this method only applies to content items with type e_MCR.

    Declaration

    Objective-C

    - (PTObj *)GetContainingStm;

    Swift

    func getContainingStm() -> PTObj!

    Return Value

    The stream object that contains the marked-content sequence. The function will return a non-NULL object only if the marked-content sequence resides in a content stream other than the content stream for the page (e.g. in a form XObject).

  • Note

    this method only applies to content items with type e_MCR.

    Declaration

    Objective-C

    - (PTObj *)GetStmOwner;

    Swift

    func getStmOwner() -> PTObj!

    Return Value

    NULL or the PDF object owning the stream returned by GetContainingStm() (e.g. the annotation to which an appearance stream belongs).

  • Note

    this method only applies to content items with type e_OBJR.

    Declaration

    Objective-C

    - (PTObj *)GetRefObj;

    Swift

    func getRefObj() -> PTObj!

    Return Value

    The referenced object.