PDFix SDK  9.0.0
Loading...
Searching...
No Matches
PdfObjectInfo Struct Referenceabstract

PdfObjectInfo class. More...

#include <pdfix.h>

Public Member Functions

virtual PdfObjectInfoType GetType ()=0
 Gets the type of the parsed object reference.
virtual int GetPageNum ()=0
 Gets the page number associated with the parsed object path.
virtual int GetCount ()=0
 Gets the number of parsed path entries.
virtual void GetBBox (int index, PdfRect *bbox)=0
 Gets the bounding box of a parsed entry.
virtual int GetAnnotIndex (int index)=0
 Gets the annotation index for a parsed entry.
virtual int GetContentStreamId (int index)=0
 Gets the content stream identifier for a parsed entry.
virtual int GetContentId (int index)=0
 Gets the content identifier for a parsed entry.
virtual int GetNumContentItemIds (int index)=0
 Gets the number of content item identifiers for a parsed entry.
virtual int GetContentItemId (int index, int index2)=0
 Gets a content item identifier for a parsed entry.
virtual int GetOperatorId (int index)=0
 Gets the content operator identifier for a parsed entry.
virtual int GetMcid (int index)=0
 Gets the marked-content identifier (MCID) for a parsed entry.
virtual int GetObjectIdCount ()=0
 Gets the number of COS object identifiers referenced by the parsed path.
virtual int GetObjectId (int index)=0
 Gets a COS object identifier by index.
virtual int Release ()=0
 Releases the PdfObjectInfo object.

Detailed Description

PdfObjectInfo class.

PdfObjectInfo represents parsed information about a PDF object identified by a string path.

This object is used to resolve object references returned by external validators such as veraPDF. A typical input is a full error path describing the location of an object in the PDF object model, for example:

root/document[0]/pages[0](2432 0 obj PDPage)/annots[0](2428 0 obj PDLinkAnnot)

PdfObjectInfo parses this identification path and exposes information about the referenced object, such as the page number, annotation index, content stream identifiers, marked-content identifiers, COS object identifiers, and bounding boxes of individual parsed entries.

The parsed information can then be used by higher-level API methods to retrieve the actual PDF object represented by the validation path. For example, if the path points to an annotation entry, the annotation can be obtained from the corresponding page using the annotation index returned by PdfObjectInfo::GetAnnotIndex.

Member Function Documentation

◆ GetAnnotIndex()

virtual int PdfObjectInfo::GetAnnotIndex ( int index)
pure virtual

Gets the annotation index for a parsed entry.

Returns the zero-based annotation index for the specified entry. This value can be used to retrieve the annotation from the corresponding page.

Parameters
indexZero-based index of the parsed entry.
Returns
The zero-based annotation index for the entry.

◆ GetBBox()

virtual void PdfObjectInfo::GetBBox ( int index,
PdfRect * bbox )
pure virtual

Gets the bounding box of a parsed entry.

Returns the bounding box associated with the specified parsed entry, if available.

Parameters
indexZero-based index of the parsed entry.
bbox(filled by method) Pointer to a rectangle to receive the entry bounding box.

◆ GetContentId()

virtual int PdfObjectInfo::GetContentId ( int index)
pure virtual

Gets the content identifier for a parsed entry.

Returns the content identifier associated with the specified entry.

Parameters
indexZero-based index of the parsed entry.
Returns
The content identifier for the entry.

◆ GetContentItemId()

virtual int PdfObjectInfo::GetContentItemId ( int index,
int index2 )
pure virtual

Gets a content item identifier for a parsed entry.

Returns a content item identifier by its index within the specified parsed entry.

Parameters
indexZero-based index of the parsed entry.
index2Zero-based index of the content item identifier within the entry.
Returns
The content item identifier.

◆ GetContentStreamId()

virtual int PdfObjectInfo::GetContentStreamId ( int index)
pure virtual

Gets the content stream identifier for a parsed entry.

Returns the content stream identifier associated with the specified entry.

Parameters
indexZero-based index of the parsed entry.
Returns
The content stream identifier for the entry.

◆ GetCount()

virtual int PdfObjectInfo::GetCount ( )
pure virtual

Gets the number of parsed path entries.

Each entry represents one parsed segment of the object identification path.

Returns
The number of parsed entries.

◆ GetMcid()

virtual int PdfObjectInfo::GetMcid ( int index)
pure virtual

Gets the marked-content identifier (MCID) for a parsed entry.

Returns the MCID associated with the specified parsed entry.

Parameters
indexZero-based index of the parsed entry.
Returns
The MCID of the entry.

◆ GetNumContentItemIds()

virtual int PdfObjectInfo::GetNumContentItemIds ( int index)
pure virtual

Gets the number of content item identifiers for a parsed entry.

Some parsed entries may reference multiple nested content items. This method returns the count of content item identifiers available for the specified entry.

Parameters
indexZero-based index of the parsed entry.
Returns
The number of content item identifiers for the entry.

◆ GetObjectId()

virtual int PdfObjectInfo::GetObjectId ( int index)
pure virtual

Gets a COS object identifier by index.

Returns one of the COS object identifiers extracted from the parsed object path.

Parameters
indexZero-based index of the COS object identifier.
Returns
The COS object identifier.

◆ GetObjectIdCount()

virtual int PdfObjectInfo::GetObjectIdCount ( )
pure virtual

Gets the number of COS object identifiers referenced by the parsed path.

Returns
The number of COS object identifiers.

◆ GetOperatorId()

virtual int PdfObjectInfo::GetOperatorId ( int index)
pure virtual

Gets the content operator identifier for a parsed entry.

Returns the operator identifier associated with the specified entry.

Parameters
indexZero-based index of the parsed entry.
Returns
The operator identifier for the entry.

◆ GetPageNum()

virtual int PdfObjectInfo::GetPageNum ( )
pure virtual

Gets the page number associated with the parsed object path.

Returns the zero-based page index if the parsed path identifies an object located on a page. If the path does not resolve to a page-specific object, the method returns -1.

Returns
The zero-based page number, or -1 if no page is associated with the parsed path.

◆ GetType()

virtual PdfObjectInfoType PdfObjectInfo::GetType ( )
pure virtual

Gets the type of the parsed object reference.

Returns
The type of object information represented by this instance.
See also
PdfObjectInfoType

◆ Release()

virtual int PdfObjectInfo::Release ( )
pure virtual

Releases the PdfObjectInfo object.

Returns
The number of remaining references to the object.