OptionalContentGroup Class Documentation

classOptionalContentGroup

Namespace:datalogics_interface

Detailed Description

An Optional Content Group is a dictionary that represents a set of graphics images that users can turn on or off in a PDF document, making them visible or invisible.

In a PDF Viewer, Optional Content Groups are referred to as "Layers."

Uses types

Constructor & Destructor Documentation

OptionalContentGroup

OptionalContentGroup()

Create a new OptionalContentGroup.

OptionalContentGroup

OptionalContentGroup(const Document &doc, const std::string &name)

Parameters

doc: const Document &

The document that the new OptionalContentGroup will belong to.

name: const std::string &

The name given to the new OptionalContentGroup.

Create a new OptionalContentGroup.

~OptionalContentGroup

~OptionalContentGroup()

Member Function Documentation

get_intent

std::vector< std::string >get_intent()

Returns:

An array containing intent strings.

Gets the intent list for an optional-content group. An intent is a string value broadly describing the intended use, either View or Design.

A group's content is considered to be optional (that is, the group's state is considered in its visibility) if any intent in its list matches an intent of the context. The intent list of the context is usually set from the intent list of the document configuration.

get_name

std::stringget_name()

Returns:

the name

Get the name of the optional content group

get_pdf_dict

PDFDictget_pdf_dict()

Returns:

The underlying PDF dictionary for this OptionalContentGroup.

Retrieve the PDFObject representation of this object.

operator==

booloperator==(const OptionalContentGroup &other)

Parameters

other: const OptionalContentGroup &

The OptionalContentGroup to compare with.

Returns:

true if the two objects refer to the same optional content group, false otherwise.

Two OptionalContentGroups are considered equal if they refer to the same underlying optional content group object.

set_intent

voidset_intent(const std::vector< std::string > &intents)

Parameters

intents: const std::vector< std::string > &

An array of intent strings to assign to this group.

Returns:

void

Sets the intent list for an optional-content group. An intent is a string value broadly describing the intended use, either View or Design.

A group's content is considered to be optional (that is, the group's state is considered in its visibility) if any intent in its list matches an intent of the context. The intent list of the context is usually set from the intent list of the document configuration.

set_name

voidset_name(const std::string &name)

Parameters

name: const std::string &

The new name for this OptionalContentGroup.

Returns:

void

Set the name of the optional content group.

to_string

std::stringto_string()

Returns:

A string describing this OptionalContentGroup.

The string includes the group's name and its intent list.