PDFix SDK  7.2.0
Loading...
Searching...
No Matches
PdsContentMark Struct Referenceabstract

PdsContentMark class. More...

#include <pdfix.h>

Public Member Functions

virtual int GetNumTags () const =0
 Gets the number of tags in the marked content. More...
 
virtual int GetTagName (int index, wchar_t *buffer, int len) const =0
 Gets the tag name by index. More...
 
virtual bool SetTagName (int index, const wchar_t *name)=0
 Sets the tag name by index. More...
 
virtual PdsDictionaryGetTagObject (int index)=0
 Gets the tag dictionary by index. More...
 
virtual bool SetTagObject (int index, PdsDictionary *object, bool indirect)=0
 Sets the tag object. More...
 
virtual int GetTagMcid () const =0
 Returns the index of the tag containing the MCID property within the marked content. More...
 
virtual int GetTagArtifact () const =0
 Returns the index of an Artifact tag within the marked content. More...
 
virtual bool AddTag (const wchar_t *name, PdsDictionary *object, bool indirect)=0
 
virtual bool InsertTag (int index, const wchar_t *name, PdsDictionary *object, bool indirect)=0
 
virtual bool RemoveTag (int index)=0
 Removes the specified tag from the marked content. More...
 

Detailed Description

PdsContentMark class.

A PdsContentMark represents marked content for a page objects. It holds page objects with the same marked content. Any changes with mark content are applied for each page object from it's container.

Member Function Documentation

◆ AddTag()

virtual bool PdsContentMark::AddTag ( const wchar_t *  name,
PdsDictionary object,
bool  indirect 
)
pure virtual

Adds a new tag into the marked content. NOTE: Be carefull when using this method because it can lead to PDF tagged structure failure!

Parameters
nameThe tag name.
objectThe dictionary containing the property list or nullptr.
indirectIf true, creates the object as an indirect object. If false, creates the object as a direct object.
Returns
true if tag was added successfully, false otherwise.

◆ GetNumTags()

virtual int PdsContentMark::GetNumTags ( ) const
pure virtual

Gets the number of tags in the marked content.

Returns
Number of tags in the marked content.

◆ GetTagArtifact()

virtual int PdsContentMark::GetTagArtifact ( ) const
pure virtual

Returns the index of an Artifact tag within the marked content.

Returns
the tag index or -1 if no Artifact was found.

◆ GetTagMcid()

virtual int PdsContentMark::GetTagMcid ( ) const
pure virtual

Returns the index of the tag containing the MCID property within the marked content.

Returns
the tag index or -1 if no MCID was found.

◆ GetTagName()

virtual int PdsContentMark::GetTagName ( int  index,
wchar_t *  buffer,
int  len 
) const
pure virtual

Gets the tag name by index.

Parameters
indexThe index of tag whose value is obtained.
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ GetTagObject()

virtual PdsDictionary * PdsContentMark::GetTagObject ( int  index)
pure virtual

Gets the tag dictionary by index.

Parameters
indexThe index of tag whose value is obtained.
Returns
Tag object if exists, nullptr otherwise.

◆ InsertTag()

virtual bool PdsContentMark::InsertTag ( int  index,
const wchar_t *  name,
PdsDictionary object,
bool  indirect 
)
pure virtual

Adds a new tag into the marked content on a specified index within the object's content marks. NOTE: Be carefull when using this method because it can lead to PDF tagged structure failure!

Parameters
indexThe index on which the tag will be added.
nameThe tag name.
objectThe dictionary containing the property list or nullptr.
indirectIf true, creates the object as an indirect object. If false, creates the object as a direct object.
Returns
true if tag was added successfully, false otherwise.

◆ RemoveTag()

virtual bool PdsContentMark::RemoveTag ( int  index)
pure virtual

Removes the specified tag from the marked content.

Parameters
indexThe index of the tag to remove.
Returns
true if tag was removed successfully, false otherwise.

◆ SetTagName()

virtual bool PdsContentMark::SetTagName ( int  index,
const wchar_t *  name 
)
pure virtual

Sets the tag name by index.

Parameters
indexThe index of tag whose value is obtained.
nameThe name of the tag to be set
Returns
true if tag name was set successfully, false otherwise.

◆ SetTagObject()

virtual bool PdsContentMark::SetTagObject ( int  index,
PdsDictionary object,
bool  indirect 
)
pure virtual

Sets the tag object.

Parameters
indexThe index of tag whose value is obtained.
objectThe dictionary containing the property list or nullptr.
indirectIf true, creates the object as an indirect object. If false, creates the object as a direct object.
Returns
true if tag dictionary was set successfully, false otherwise.