# Adobe PDF Library 21 Modern C++ API Reference 21.4.0 > The Adobe PDF Library Modern C++ API provides comprehensive PDF document creation and manipulation capabilities. Browse classes, enumerations, and interfaces organized by functional area. - Product: Adobe PDF Library 21 - Language: Modern C++ - Version: 21.4.0 - HTML page: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0 - Version index: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/llms.txt The Adobe PDF Library Modern C++ API provides comprehensive PDF document creation and manipulation capabilities. Browse classes, enumerations, and interfaces organized by functional area. --- # AcroFormExportType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AcroFormExportType **Namespace:** `datalogics_interface` ## Description AcroForm Data Export types. ## Values - `XFDF = 1`: XFDF (XML Forms Data Format) representing form field data. - `FDF = 2`: FDF (Forms Data Format) representing form field data. - `XML = 3`: XML (Extensible Markup Language) representing form field data. --- # AcroFormImportType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AcroFormImportType **Namespace:** `datalogics_interface` ## Description AcroForm Data Import types. ## Values - `XFDF = 1`: XFDF (XML Forms Data Format) representing form field data. - `FDF = 2`: FDF (Forms Data Format) representing form field data. - `XML = 3`: XML (Extensible Markup Language) representing form field data. --- # Action Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action ```cpp class Action ``` **Namespace:** `datalogics_interface` **Derived classes:** [`GoToAction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GoToAction.md), [`LaunchAction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LaunchAction.md), [`RemoteGoToAction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteGoToAction.md), [`URIAction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/URIAction.md) ## Description When a user clicks a link or bookmark in a PDF, an action occurs, moving the reader to a new location. An action can involve moving the reader to a new page in the file, for example. Also, with a PDF Viewer a PDF file can have an Action that runs automatically when a user opens the file, or reaches a specific page. Applications can support Actions in custom annotation types they add. Only GoTo and URI Actions are supported; you can only use an Action with the interface to move from one part of a file to another or open an external web page. **Referenced by:** [`Bookmark`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md), [`LinkAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LinkAnnotation.md) **Uses types:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) ## Constructors ### Action ```cpp datalogics_interface::Action::Action(Action &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Action &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md)) ### Action ```cpp datalogics_interface::Action::Action(const Document &doc, const std::string &type) ``` *constructor* **Parameters** - `doc` ([`const Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The document in which the action is created. - `type` (`const std::string &`): The string corresponding to the action's subtype. Creates a new action object. ### ~Action ```cpp virtual datalogics_interface::Action::~Action() ``` *destructor* ## Methods ### get_pdf_dict ```cpp PDFDict datalogics_interface::Action::get_pdf_dict() ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The underlying PDF dictionary for this Action. Retrieve the PDFObject representation of this object. ### get_subtype ```cpp std::string datalogics_interface::Action::get_subtype() const ``` **Returns:** `std::string` The subtype string for this action, such as "GoTo", "URI", "Launch", or "GoToR". The action's subtype. ### operator= ```cpp Action & datalogics_interface::Action::operator=(Action &&) noexcept ``` **Parameters** - (unnamed) ([`Action &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md)) **Returns:** [`Action &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md) ### operator== ```cpp bool datalogics_interface::Action::operator==(const Action &other) const ``` **Parameters** - `other` ([`const Action &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md)) **Returns:** `bool` true if the two objects refer to the same action, false otherwise. Determines whether this Action is equal to another. Two Actions are considered equal if they refer to the same underlying PDF action object. ### to_string ```cpp std::string datalogics_interface::Action::to_string() const ``` **Returns:** `std::string` A string describing this Action. Returns a string representation of this Action. The string includes the action's subtype. ### try_as ```cpp T * datalogics_interface::Action::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this action to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Action::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # AddPageFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AddPageFlags **Namespace:** `datalogics_interface` ## Description Flags that control how annotations are handled when adding a page to a Content object. ## Values - `None = 0`: No flags set; default behavior. - `AllAnnotations = 1`: Add all annotations along with the page. --- # AFRelationship Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AFRelationship **Namespace:** `datalogics_interface` ## Description Represents the relationship between the component of the PDF document that refers to this attachment and the file denoted by the attachment ## Values - `Source = 0`: Original source material. - `Data = 1`: Data for visual presentation. - `Alternative = 2`: Alternative representation. - `Supplement = 3`: Supplemental representation. - `EncryptedPayload = 4`: Encrypted payload. - `FormData = 5`: AcroForm data. - `Schema = 6`: Schema definition. - `Unspecified = 7`: Unknown/unspecified. --- # Annotation Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation ```cpp class Annotation ``` **Namespace:** `datalogics_interface` **Derived classes:** [`CircleAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CircleAnnotation.md), [`FreeTextAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FreeTextAnnotation.md), [`InkAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/InkAnnotation.md), [`LineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LineAnnotation.md), [`LinkAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LinkAnnotation.md), [`PolyLineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PolyLineAnnotation.md), [`PolygonAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PolygonAnnotation.md), [`Redaction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Redaction.md), [`SquareAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SquareAnnotation.md), [`TextMarkupAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextMarkupAnnotation.md) ## Description Associates an object with its location on a page of a PDF document. An annotation associates an object such as a note, sound, or movie with a location on a page of a PDF document, or provides a way to interact with the user by means of the mouse and keyboard. **Referenced by:** [`Page`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md) **Uses types:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### Annotation ```cpp datalogics_interface::Annotation::Annotation(Annotation &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Annotation &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)) ### ~Annotation ```cpp virtual datalogics_interface::Annotation::~Annotation() ``` *destructor* ## Methods ### clear_interior_color ```cpp void datalogics_interface::Annotation::clear_interior_color() ``` **Returns:** `void` Clear the interior color. ### generate_appearance ```cpp virtual std::unique_ptr< Form > datalogics_interface::Annotation::generate_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the visual appearance, or null if the appearance could not be generated. Generate a new appearance stream with the current annotation properties. The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance. ### get_annotation_feature_level ```cpp virtual double datalogics_interface::Annotation::get_annotation_feature_level() const ``` **Returns:** `double` The minimum PDF version level (e.g. 1.3, 1.4, or 1.5). The minimum PDF version necessary to support the features used in this annotation. ### get_color ```cpp Color datalogics_interface::Annotation::get_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The annotation's color. The color of the annotation. ### get_contents ```cpp std::string datalogics_interface::Annotation::get_contents() const ``` **Returns:** `std::string` The annotation's text contents. The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### get_flags ```cpp AnnotationFlags datalogics_interface::Annotation::get_flags() const ``` **Returns:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md) The annotation's flags. The flags for the annotation. ### get_interior_color ```cpp std::unique_ptr< Color > datalogics_interface::Annotation::get_interior_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The interior fill color, or null if no interior color is set. The interior color with which to fill the annotation's rectangle or circle. The color of the border itself can be retrieved from Annotation.Color. ### get_normal_appearance ```cpp std::unique_ptr< Form > datalogics_interface::Annotation::get_normal_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the annotation's normal appearance, or null if no normal appearance has been set. The normal appearance of the annotation, represented as a Form XObject. ### get_opacity ```cpp double datalogics_interface::Annotation::get_opacity() const ``` **Returns:** `double` The opacity value for this annotation. The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### get_rect ```cpp Rect datalogics_interface::Annotation::get_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The annotation's bounding rectangle in user space coordinates. The size and location of the annotation on its page. ### get_subtype ```cpp std::string datalogics_interface::Annotation::get_subtype() const ``` **Returns:** `std::string` The subtype string (e.g. "Circle", "Square", "Line"). The annotation's subtype. ### get_title ```cpp std::string datalogics_interface::Annotation::get_title() const ``` **Returns:** `std::string` The title string. The title of the annotation. ### has_rich_text_data ```cpp bool datalogics_interface::Annotation::has_rich_text_data() const ``` **Returns:** `bool` true if the annotation contains Rich Text String content. Checks the annotation for Rich Text String content (PDFReference 1.7 Section 8.6.2). Annotations that contain Rich Text String content and do not have a normal appearance set will not be visible when rendering the page. ### operator= ```cpp Annotation & datalogics_interface::Annotation::operator=(Annotation &&) noexcept ``` **Parameters** - (unnamed) ([`Annotation &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)) **Returns:** [`Annotation &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md) ### operator== ```cpp bool datalogics_interface::Annotation::operator==(const Annotation &other) const ``` **Parameters** - `other` ([`const Annotation &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)): The annotation to compare with this annotation. **Returns:** `bool` true if the two annotations are equal. Test annotations for equality (if they are the same annotation). ### set_annotation_feature_level ```cpp virtual void datalogics_interface::Annotation::set_annotation_feature_level(double level) ``` **Parameters** - `level` (`double`): The target PDF version level. Features requiring a higher version will be removed. **Returns:** `void` Removes features not supported in the supplied version number. ### set_color ```cpp void datalogics_interface::Annotation::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new color to set. **Returns:** `void` The color of the annotation. ### set_contents ```cpp void datalogics_interface::Annotation::set_contents(const std::string &contents) ``` **Parameters** - `contents` (`const std::string &`): The new text contents. **Returns:** `void` The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### set_flags ```cpp void datalogics_interface::Annotation::set_flags(AnnotationFlags flags) ``` **Parameters** - `flags` ([`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md)): The new annotation flags to set. **Returns:** `void` The flags for the annotation. ### set_interior_color ```cpp void datalogics_interface::Annotation::set_interior_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new interior fill color. Pass null to remove the interior color. **Returns:** `void` The interior color with which to fill the annotation's rectangle or circle. Only RGB colors are allowed. The color of the border itself can be retrieved from Annotation.Color. ### set_normal_appearance ```cpp void datalogics_interface::Annotation::set_normal_appearance(Form &form) ``` **Parameters** - `form` ([`Form &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)): The Form to use as the annotation's normal appearance. **Returns:** `void` The normal appearance of the annotation, represented as a Form XObject. ### set_opacity ```cpp void datalogics_interface::Annotation::set_opacity(double opacity) ``` **Parameters** - `opacity` (`double`): The new opacity value to set. **Returns:** `void` The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### set_rect ```cpp void datalogics_interface::Annotation::set_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The new bounding rectangle in user space coordinates. **Returns:** `void` The size and location of the annotation on its page. ### set_title ```cpp void datalogics_interface::Annotation::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): The new title string. **Returns:** `void` The title of the annotation. ### to_string ```cpp std::string datalogics_interface::Annotation::to_string() const ``` **Returns:** `std::string` A string describing this annotation, including its type and rectangle. Returns a string representation of this annotation. ### try_as ```cpp T * datalogics_interface::Annotation::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this annotation to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Annotation::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # AnnotationFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags **Namespace:** `datalogics_interface` ## Description Bitfield flags controlling the display and behavior of annotations. ## Values - `Invisible = 0x0001`: If there is no annotation handler, the annotation is invisible. - `Hidden = 0x0002`: The annotation is not visible and does not print. - `Print = 0x0004`: The annotation prints. - `NoZoom = 0x0008`: The annotation does not zoom with the view. - `NoRotate = 0x0010`: The annotation does not rotate with the page. - `NoView = 0x0020`: The annotation is not displayed but may print. - `ReadOnly = 0x0040`: The annotation does not interact with the user. - `Lock = 0x0080`: Position and size are locked. Only form fields respect this flag. - `ToggleNoView = 0x0100`: A mouse-over or selection toggles the NoView bit. - `LockContents = 0x0200`: When set, the annotation's content key cannot be changed by the user. --- # AxialShadingPattern Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/AxialShadingPattern ```cpp class AxialShadingPattern : ShadingPattern ``` **Namespace:** `datalogics_interface` **Inherits from:** [`ShadingPattern`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ShadingPattern.md) ## Description A color blend that varies along an axis. An axial shading specifies a color blend that varies along a linear axis between two endpoints, and indefinitely perpendicular to that axis. **Uses types:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md), [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### AxialShadingPattern ```cpp datalogics_interface::AxialShadingPattern::AxialShadingPattern(ColorSpace &color_space, const std::vector< Point > &coords, const std::vector< std::shared_ptr< Function > > &functions) ``` *constructor* **Parameters** - `color_space` ([`ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): The color space for the pattern. - `coords` ([`const std::vector< Point > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): The coordinates of the two endpoints of the axial shading. - `functions` ([`const std::vector< std::shared_ptr< Function > > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md)): One 1-in n-out function, or an array of n 1-in 1-out functions that determine the values of the color channels. Create an AxialShadingPattern. ## Methods ### get_anti_alias ```cpp bool datalogics_interface::ShadingPattern::get_anti_alias() const ``` **Returns:** `bool` true if anti-aliasing is enabled, false otherwise. Gets whether anti-aliasing is enabled for the shading. When enabled, the shading function is filtered to prevent aliasing artifacts. ### get_bounding_box ```cpp Rect datalogics_interface::ShadingPattern::get_bounding_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The bounding box Rect, or NULL if none is set. Gets the bounding box of the shading. The coordinates are interpreted in the target coordinate space. If present, provides an additional, temporary clipping boundary to the shading. ### get_color_space ```cpp std::unique_ptr< ColorSpace > datalogics_interface::ShadingPattern::get_color_space() const ``` **Returns:** [`std::unique_ptr< ColorSpace >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) The ColorSpace of the shading pattern. Gets the color space of a shading pattern. This space is restricted to be any space except a Pattern space. ### get_coords ```cpp std::vector< Point > datalogics_interface::AxialShadingPattern::get_coords() const ``` **Returns:** [`std::vector< Point >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) A list of two Point objects defining the start and end of the axis. The coordinates of the two endpoints of the axial shading. ### get_domain ```cpp std::vector< double > datalogics_interface::AxialShadingPattern::get_domain() const ``` **Returns:** `std::vector< double >` A list of two doubles, or null if not set. The domain of the parametric variable t for the axial shading. An array of two numbers that specify the limiting values of the parametric variable t. This variable t varies linearly between these two values as the gradient varies between the starting and ending points of the axis. Defaults to [0, 1]. May be NULL. ### get_extend ```cpp std::vector< bool > datalogics_interface::AxialShadingPattern::get_extend() const ``` **Returns:** `std::vector< bool >` A list of two booleans, or null if not set. Whether the shading extends beyond the start and end points of the axis. An array of two boolean values indicating whether to extend the shading beyond the starting and ending points of the axis, respectively. Default value: [false, false]. May be NULL. ### get_functions ```cpp std::vector< std::shared_ptr< Function > > datalogics_interface::AxialShadingPattern::get_functions() const ``` **Returns:** [`std::vector< std::shared_ptr< Function > >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md) A list of Function objects used to compute color values. The function(s) that determine the color channel values for the shading. One 1-in n-out function, or an array of n 1-in 1-out functions that determine the values of the color channels, where n is the number of color components in the shading's color space. The functions are called with a parametric variable t which varies across the Domain. ### get_pdf_object ```cpp std::unique_ptr< PDFObject > datalogics_interface::Pattern::get_pdf_object() const ``` **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The PDFObject representing this pattern in the PDF document. Gets the underlying PDF object for this pattern. ### set_anti_alias ```cpp void datalogics_interface::ShadingPattern::set_anti_alias(bool anti_alias) ``` **Parameters** - `anti_alias` (`bool`): true to enable anti-aliasing, false to disable it. **Returns:** `void` Sets whether anti-aliasing is enabled for the shading. When enabled, the shading function is filtered to prevent aliasing artifacts. ### set_bounding_box ```cpp void datalogics_interface::ShadingPattern::set_bounding_box(const Rect &bbox) ``` **Parameters** - `bbox` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The bounding box Rect to set, or NULL to remove it. **Returns:** `void` Sets the bounding box of the shading. The coordinates are interpreted in the target coordinate space. If present, provides an additional, temporary clipping boundary to the shading. Set to NULL to remove the bounding box. ### set_color_space ```cpp void datalogics_interface::ShadingPattern::set_color_space(ColorSpace &color_space) ``` **Parameters** - `color_space` ([`ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): The ColorSpace to set for the shading pattern. **Returns:** `void` Sets the color space of a shading pattern. This space is restricted to be any space except a Pattern space. ### set_coords ```cpp void datalogics_interface::AxialShadingPattern::set_coords(const std::vector< Point > &coords) ``` **Parameters** - `coords` ([`const std::vector< Point > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): A list of exactly two Point objects defining the start and end of the axis. **Returns:** `void` Set the coordinates of the two endpoints of the axial shading. ### set_domain ```cpp void datalogics_interface::AxialShadingPattern::set_domain(const std::vector< double > &domain) ``` **Parameters** - `domain` (`const std::vector< double > &`): A list of exactly two doubles, or null to remove. **Returns:** `void` Set the domain of the parametric variable t for the axial shading. An array of two numbers that specify the limiting values of the parametric variable t. This variable t varies linearly between these two values as the gradient varies between the starting and ending points of the axis. Default value: [0, 1]. Pass NULL to remove the domain entry. ### set_extend ```cpp void datalogics_interface::AxialShadingPattern::set_extend(const std::vector< bool > &extend) ``` **Parameters** - `extend` (`const std::vector< bool > &`): A list of exactly two booleans, or null to remove. **Returns:** `void` Set whether the shading extends beyond the start and end points of the axis. An array of two boolean values indicating whether to extend the shading beyond the starting and ending points of the axis, respectively. Default value: [false, false]. Pass NULL to remove the extend entry. ### set_functions ```cpp void datalogics_interface::AxialShadingPattern::set_functions(const std::vector< std::shared_ptr< Function > > &functions) ``` **Parameters** - `functions` ([`const std::vector< std::shared_ptr< Function > > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md)): A list of one or more Function objects. Must contain at least one function. **Returns:** `void` Set the function(s) that determine the color channel values for the shading. One 1-in n-out function, or an array of n 1-in 1-out functions that determine the values of the color channels, where n is the number of color components in the shading's color space. The functions are called with a parametric variable t which varies across the Domain. ### to_string ```cpp std::string datalogics_interface::AxialShadingPattern::to_string() const override ``` **Returns:** `std::string` A formatted string describing this AxialShadingPattern. Return a string representation of the AxialShadingPattern. The string includes the color space, background color, bounding box, anti-alias flag, coordinates, function, domain, and extend values. --- # BlendMode Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/BlendMode **Namespace:** `datalogics_interface` ## Description The blend mode used for painting objects. ## Values - `Compatible = 0`: No longer needed but still recognized; equivalent to the Normal blend mode. - `Normal = 1`: Selects the source color and ignores the backdrop. - `Multiply = 2`: Multiplies the source and backdrop colors. The result is always at least as dark as either constituent. - `Screen = 3`: Multiplies the complements of the source and backdrop, then complements the result. Always at least as light as either constituent. - `Difference = 4`: Subtracts the darker of the two constituent colors from the lighter color. - `Darken = 5`: Selects the darker of the backdrop or source colors. - `Lighten = 6`: Selects the lighter of the backdrop or source colors. - `ColorDodge = 7`: Brightens the backdrop color to reflect the source color. - `ColorBurn = 8`: Darkens the backdrop color to reflect the source color. - `Exclusion = 9`: Similar to Difference but lower in contrast. - `HardLight = 10`: Multiplies or screens depending on the source color value. - `Overlay = 11`: Multiplies or screens depending on the backdrop color value; preserves highlights and shadows. - `SoftLight = 12`: Darkens or lightens depending on the source color value. - `Luminosity = 13`: Creates a color with the luminosity of the source and the hue/saturation of the backdrop. - `Hue = 14`: Creates a color with the hue of the source and the saturation/luminosity of the backdrop. - `Saturation = 15`: Creates a color with the saturation of the source and the hue/luminosity of the backdrop. - `Color = 16`: Creates a color with the hue and saturation of the source and the luminosity of the backdrop. - `Unknown = 17`: The blend mode is not recognized or could not be determined. --- # Bookmark Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark ```cpp class Bookmark ``` **Namespace:** `datalogics_interface` ## Description A bookmark on a page of a PDF document. Each bookmark has a title that appears on screen, and an action that specifies what happens when a user clicks on the bookmark. The typical action for a user-created bookmark is to move to another location in the current document, although any action (see Action) can be specified. **Referenced by:** [`Bookmark`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md), [`Document`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md) **Uses types:** [`Action`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md), [`Bookmark`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md), [`BookmarkFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/BookmarkFlags.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`ViewDestination`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md) ## Constructors ### Bookmark ```cpp datalogics_interface::Bookmark::Bookmark(Bookmark &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Bookmark &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md)) ### ~Bookmark ```cpp datalogics_interface::Bookmark::~Bookmark() ``` *destructor* ## Methods ### add_child ```cpp void datalogics_interface::Bookmark::add_child(Bookmark &child) ``` **Parameters** - `child` ([`Bookmark &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md)): - the bookmark being added. **Returns:** `void` Add an existing bookmark to be the child bookmark of a parent. ### add_next_sibling ```cpp void datalogics_interface::Bookmark::add_next_sibling(Bookmark &sibling) ``` **Parameters** - `sibling` ([`Bookmark &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md)): - The bookmark to become the new right sibling. **Returns:** `void` Add a bookmark to a tree as the next (right) sibling. ### add_previous_sibling ```cpp void datalogics_interface::Bookmark::add_previous_sibling(Bookmark &sibling) ``` **Parameters** - `sibling` ([`Bookmark &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md)): - The bookmark to become the new left sibling. **Returns:** `void` Add a bookmark to a tree as the previous (left) sibling. ### add_subtree ```cpp void datalogics_interface::Bookmark::add_subtree(Bookmark &subtree, const std::string &title) ``` **Parameters** - `subtree` ([`Bookmark &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md)): - The bookmark subtree to add. - `title` (`const std::string &`): - the title of the newly added subtree. **Returns:** `void` Add a copy of a subtree as the new last child of a parent bookmark, and gives the subtree an initial title. ### clear_action ```cpp void datalogics_interface::Bookmark::clear_action() ``` **Returns:** `void` Removes the action from this bookmark. ### create_new_child ```cpp std::unique_ptr< Bookmark > datalogics_interface::Bookmark::create_new_child(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): - The initial title of the new child bookmark. **Returns:** [`std::unique_ptr< Bookmark >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md) The newly created child bookmark. (Deprecated, function may be removed in the future, use single-parameter CreateNewChild() method instead) Create a bookmark and add to a parent as the last child bookmark, and give the new bookmark an initial title. ### create_new_sibling ```cpp std::unique_ptr< Bookmark > datalogics_interface::Bookmark::create_new_sibling(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): - The initial text for the new right sibling. **Returns:** [`std::unique_ptr< Bookmark >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md) The newly created sibling bookmark. Create a new bookmark in a tree as the next (right) sibling, using supplied string as the initial text. ### destroy ```cpp void datalogics_interface::Bookmark::destroy() ``` **Returns:** `void` Removes a bookmark subtree from the bookmark tree containing it. ### find_descendant_bookmark ```cpp std::unique_ptr< Bookmark > datalogics_interface::Bookmark::find_descendant_bookmark(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): - The title of the bookmark for which to search. **Returns:** [`std::unique_ptr< Bookmark >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md) The bookmark within this bookmark's tree that has the supplied title. Returns NULL if there is no bookmark with the supplied title. Find bookmark by its title within the subtree of which this bookmark is the root, searching within the subtree to a depth determined by maxDepth (e.g., 0 = this bookmark only and not any of its children, 1 = search one level below this bookmark level, etc.) ### find_descendant_bookmark ```cpp std::unique_ptr< Bookmark > datalogics_interface::Bookmark::find_descendant_bookmark(const std::string &title, int max_depth) ``` **Parameters** - `title` (`const std::string &`): - The title of the bookmark for which to search. - `max_depth` (`int`): - If supplied, declares the number of levels below this bookmark to search. (If omitted, the entire subtree is searched.) **Returns:** [`std::unique_ptr< Bookmark >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md) The bookmark within this bookmark's tree that has the supplied title. Returns NULL if there is no bookmark with the supplied title. Find bookmark by its title within the subtree of which this bookmark is the root, searching within the subtree to a depth determined by maxDepth (e.g., 0 = this bookmark only and not any of its children, 1 = search one level below this bookmark level, etc.) ### get_action ```cpp std::unique_ptr< Action > datalogics_interface::Bookmark::get_action() ``` **Returns:** [`std::unique_ptr< Action >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md) The action of the bookmark. Get the Action for a bookmark. ### get_color ```cpp std::unique_ptr< Color > datalogics_interface::Bookmark::get_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) the color, or null if no color was specified Get the color of the bookmark. ### get_count ```cpp int datalogics_interface::Bookmark::get_count() const ``` **Returns:** `int` the number of open bookmarks. Get the number of open bookmarks in the subtree under this bookmark. ### get_first_child ```cpp std::unique_ptr< Bookmark > datalogics_interface::Bookmark::get_first_child() const ``` **Returns:** [`std::unique_ptr< Bookmark >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md) The first child of Bookmark, or null if Bookmark has no children. Gets a bookmark's first child. ### get_flags ```cpp BookmarkFlags datalogics_interface::Bookmark::get_flags() const ``` **Returns:** [`BookmarkFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/BookmarkFlags.md) the flags Get the flags for the bookmark. ### get_indent ```cpp int datalogics_interface::Bookmark::get_indent() const ``` **Returns:** `int` the indentation level of the bookmark. Get the indentation level of a bookmark in its containing tree. ### get_last_child ```cpp std::unique_ptr< Bookmark > datalogics_interface::Bookmark::get_last_child() const ``` **Returns:** [`std::unique_ptr< Bookmark >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md) The last child of Bookmark, or null if Bookmark has no children. Gets a bookmark's last child. ### get_next ```cpp std::unique_ptr< Bookmark > datalogics_interface::Bookmark::get_next() const ``` **Returns:** [`std::unique_ptr< Bookmark >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md) The Bookmark object's next (right) sibling. It returns null if Bookmark has no next sibling (that is, it is its parent's last child). Gets a bookmark's next (right) sibling. ### get_parent ```cpp std::unique_ptr< Bookmark > datalogics_interface::Bookmark::get_parent() const ``` **Returns:** [`std::unique_ptr< Bookmark >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md) The Bookmark object's parent. It returns null if Bookmark has no parent (that is, it is the root of the tree). Gets a bookmark's parent. ### get_pdf_dict ```cpp PDFDict datalogics_interface::Bookmark::get_pdf_dict() ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The dictionary associated with the bookmark. Get the dictionary associated with the bookmark. ### get_previous ```cpp std::unique_ptr< Bookmark > datalogics_interface::Bookmark::get_previous() const ``` **Returns:** [`std::unique_ptr< Bookmark >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md) The Bookmark object's previous (left) sibling. It returns null if Bookmark has no previous sibling (that is, it is its parent's first child). Gets a bookmark's previous (left) sibling. ### get_title ```cpp std::string datalogics_interface::Bookmark::get_title() const ``` **Returns:** `std::string` The title of the bookmark. ### get_view_destination ```cpp std::unique_ptr< ViewDestination > datalogics_interface::Bookmark::get_view_destination() const ``` **Returns:** [`std::unique_ptr< ViewDestination >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md) the view destination If this bookmark has a GoTo action, then return the destination of the action, else return null. ### has_children ```cpp bool datalogics_interface::Bookmark::has_children() const ``` **Returns:** `bool` true if the bookmark has children. Does the bookmark have children? ### is_open ```cpp bool datalogics_interface::Bookmark::is_open() const ``` **Returns:** `bool` true if the bookmark is open. Is the bookmark open? ### operator= ```cpp Bookmark & datalogics_interface::Bookmark::operator=(Bookmark &&) noexcept ``` **Parameters** - (unnamed) ([`Bookmark &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md)) **Returns:** [`Bookmark &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md) ### operator== ```cpp bool datalogics_interface::Bookmark::operator==(const Bookmark &other) const ``` **Parameters** - `other` ([`const Bookmark &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md)): The other Bookmark to compare against. **Returns:** `bool` true if the bookmarks are equal, false otherwise. Compare two bookmarks for equality. ### set_action ```cpp void datalogics_interface::Bookmark::set_action(const Action &action) ``` **Parameters** - `action` ([`const Action &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md)): - The action to set for the bookmark. **Returns:** `void` Set the Action for a bookmark. ### set_color ```cpp void datalogics_interface::Bookmark::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): the color of the bookmark **Returns:** `void` Set the color of the bookmark. ### set_flags ```cpp void datalogics_interface::Bookmark::set_flags(BookmarkFlags flags) ``` **Parameters** - `flags` ([`BookmarkFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/BookmarkFlags.md)) **Returns:** `void` Set the flags for the bookmark to the parameter values. ### set_open ```cpp void datalogics_interface::Bookmark::set_open(bool open) ``` **Parameters** - `open` (`bool`): if the bookmark is open or closed **Returns:** `void` Set if the bookmark is open or closed. ### set_title ```cpp void datalogics_interface::Bookmark::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): the title of the bookmark **Returns:** `void` The title of the bookmark. ### to_string ```cpp std::string datalogics_interface::Bookmark::to_string() const ``` **Returns:** `std::string` A string describing this Bookmark and its properties. Returns a string representation of this Bookmark. The string includes the title, color, flags, count, indent level, open state, and view destination if available. ### unlink ```cpp void datalogics_interface::Bookmark::unlink() ``` **Returns:** `void` Unlinks the bookmark from the bookmark tree that contains it and adjusts the tree appropriately. --- # BookmarkFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/BookmarkFlags **Namespace:** `datalogics_interface` ## Description Flags describing the visual style of a bookmark's title text. ## Values - `Italic = 0x01`: The bookmark title is rendered in italic. - `Bold = 0x02`: The bookmark title is rendered in bold. --- # CalGrayColorSpace Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CalGrayColorSpace ```cpp class CalGrayColorSpace : ColorSpace ``` **Namespace:** `datalogics_interface` **Inherits from:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) ## Description A calibrated gray color space. A CalGray color space is a special case of a single-component CIE-based color space, known as a CIE-based A color space. This type of space is the one-dimensional (and usually achromatic) analog of CIE-based ABC spaces. **Uses types:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Constructors ### CalGrayColorSpace ```cpp datalogics_interface::CalGrayColorSpace::CalGrayColorSpace(const std::vector< double > &white_point) ``` *constructor* **Parameters** - `white_point` (`const std::vector< double > &`): An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. The numbers X and Z must be positive, and Y must be equal to 1.0. Create a CalGray color space. ### CalGrayColorSpace ```cpp datalogics_interface::CalGrayColorSpace::CalGrayColorSpace(const std::vector< double > &white_point, const std::vector< double > &black_point, double gamma) ``` *constructor* **Parameters** - `white_point` (`const std::vector< double > &`): An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. The numbers X and Z must be positive, and Y must be equal to 1.0. - `black_point` (`const std::vector< double > &`): An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse black point. All three of these numbers must be non-negative. - `gamma` (`double`): A number G defining the gamma for the gray component. G must be positive and is generally greater than or equal to 1. Create a CalGray color space. ## Methods ### get_black_point ```cpp std::vector< double > datalogics_interface::CalGrayColorSpace::get_black_point() const ``` **Returns:** `std::vector< double >` An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse black point. All three of these numbers must be non-negative. ### get_gamma ```cpp double datalogics_interface::CalGrayColorSpace::get_gamma() const ``` **Returns:** `double` A number G defining the gamma for the gray component. G must be positive and is generally greater than or equal to 1. ### get_name ```cpp std::string datalogics_interface::ColorSpace::get_name() const ``` **Returns:** `std::string` The name of the color space. A named color space may be named something like DeviceRGB. More complicated color spaces may have a name like Indexed or ICCBased. ### get_num_components ```cpp int datalogics_interface::ColorSpace::get_num_components() const ``` **Returns:** `int` The number of color components. The number of components in the color space. For example, DeviceGray has 1 component, DeviceRGB has 3, and DeviceCMYK has 4. ### get_pdf_object ```cpp std::unique_ptr< PDFObject > datalogics_interface::ColorSpace::get_pdf_object() const ``` **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The PDFObject associated with the color space. Get the PDFObject associated with the color space. This may be a PDFName, PDFDict, PDFStream, or PDFArray. ### get_white_point ```cpp std::vector< double > datalogics_interface::CalGrayColorSpace::get_white_point() const ``` **Returns:** `std::vector< double >` An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. The numbers X and Z must be positive, and Y must be equal to 1.0. ### operator== ```cpp virtual bool datalogics_interface::ColorSpace::operator==(const ColorSpace &other) const ``` **Parameters** - `other` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): The ColorSpace to compare against. **Returns:** `bool` true if the two color spaces are equal, false otherwise. Test for equality. This works best for named color spaces. More complex color spaces (such as ICCBased) do not support equality testing and will always return false. ### to_string ```cpp std::string datalogics_interface::ColorSpace::to_string() const ``` **Returns:** `std::string` A string describing this ColorSpace. Convert a ColorSpace to a string representation. --- # CalRGBColorSpace Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CalRGBColorSpace ```cpp class CalRGBColorSpace : ColorSpace ``` **Namespace:** `datalogics_interface` **Inherits from:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) ## Description A calibrated RGB color space. A CalRGB color space (Red, Green, Blue) is a CIE-based ABC color space with only one transformation stage instead of two. In this type of space, A, B, and C represent calibrated red, green, and blue color values. These three color components must be in the range 0.0 to 1.0; component values falling outside that range are adjusted to the nearest valid value without error indication. **Uses types:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Constructors ### CalRGBColorSpace ```cpp datalogics_interface::CalRGBColorSpace::CalRGBColorSpace(const std::vector< double > &white_point) ``` *constructor* **Parameters** - `white_point` (`const std::vector< double > &`): An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. The numbers X and Z must be positive, and Y must be equal to 1.0. Create a CalRGB color space. ### CalRGBColorSpace ```cpp datalogics_interface::CalRGBColorSpace::CalRGBColorSpace(const std::vector< double > &white_point, const std::vector< double > &black_point, const std::vector< double > &gamma, const std::vector< double > &matrix) ``` *constructor* **Parameters** - `white_point` (`const std::vector< double > &`): An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. The numbers X and Z must be positive, and Y must be equal to 1.0. - `black_point` (`const std::vector< double > &`): An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse black point. All three of these numbers must be non-negative. - `gamma` (`const std::vector< double > &`): An array of three numbers [ GR GG GB ] specifying the gamma for the red, green, and blue (A, B, and C) components of the color space. - `matrix` (`const std::vector< double > &`): An array of nine numbers [ XA YA ZA XB YB ZB XC YC ZC ] specifying the linear interpretation of the decoded A, B, and C components of the color space with respect to the final XYZ representation. Create a CalRGB color space. ## Methods ### get_black_point ```cpp std::vector< double > datalogics_interface::CalRGBColorSpace::get_black_point() const ``` **Returns:** `std::vector< double >` An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse black point. All three of these numbers must be non-negative. ### get_gamma ```cpp std::vector< double > datalogics_interface::CalRGBColorSpace::get_gamma() const ``` **Returns:** `std::vector< double >` A number G defining the gamma for the gray component. G must be positive and is generally greater than or equal to 1. ### get_matrix ```cpp std::vector< double > datalogics_interface::CalRGBColorSpace::get_matrix() const ``` **Returns:** `std::vector< double >` An array of nine numbers [ XA YA ZA XB YB ZB XC YC ZC ] specifying the linear interpretation of the decoded A, B, and C components of the color space with respect to the final XYZ representation. ### get_name ```cpp std::string datalogics_interface::ColorSpace::get_name() const ``` **Returns:** `std::string` The name of the color space. A named color space may be named something like DeviceRGB. More complicated color spaces may have a name like Indexed or ICCBased. ### get_num_components ```cpp int datalogics_interface::ColorSpace::get_num_components() const ``` **Returns:** `int` The number of color components. The number of components in the color space. For example, DeviceGray has 1 component, DeviceRGB has 3, and DeviceCMYK has 4. ### get_pdf_object ```cpp std::unique_ptr< PDFObject > datalogics_interface::ColorSpace::get_pdf_object() const ``` **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The PDFObject associated with the color space. Get the PDFObject associated with the color space. This may be a PDFName, PDFDict, PDFStream, or PDFArray. ### get_white_point ```cpp std::vector< double > datalogics_interface::CalRGBColorSpace::get_white_point() const ``` **Returns:** `std::vector< double >` An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. The numbers X and Z must be positive, and Y must be equal to 1.0. ### operator== ```cpp virtual bool datalogics_interface::ColorSpace::operator==(const ColorSpace &other) const ``` **Parameters** - `other` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): The ColorSpace to compare against. **Returns:** `bool` true if the two color spaces are equal, false otherwise. Test for equality. This works best for named color spaces. More complex color spaces (such as ICCBased) do not support equality testing and will always return false. ### to_string ```cpp std::string datalogics_interface::ColorSpace::to_string() const ``` **Returns:** `std::string` A string describing this ColorSpace. Convert a ColorSpace to a string representation. --- # CircleAnnotation Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CircleAnnotation ```cpp class CircleAnnotation : Annotation ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Annotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md) ## Description A circle annotation is an annotation surrounded by a curved and possibly elliptical border. The circle is inscribed within the annotation rectangle. Despite the circle name, the width and height of the annotation rectangle need not be equal. So the circle can actually be an ellipse. **Uses types:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### CircleAnnotation ```cpp datalogics_interface::CircleAnnotation::CircleAnnotation(Page &page, const Rect &rect) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the CircleAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. Create a new CircleAnnotation at the end of a page's annotation array. To create a CircleAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### CircleAnnotation ```cpp datalogics_interface::CircleAnnotation::CircleAnnotation(Page &page, const Rect &rect, int add_after) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the CircleAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. - `add_after` (`int`) Create a new CircleAnnotation at the end of a page's annotation array. To create a CircleAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### ~CircleAnnotation ```cpp datalogics_interface::CircleAnnotation::~CircleAnnotation() override ``` *destructor* ## Methods ### clear_interior_color ```cpp void datalogics_interface::Annotation::clear_interior_color() ``` **Returns:** `void` Clear the interior color. ### generate_appearance ```cpp virtual std::unique_ptr< Form > datalogics_interface::Annotation::generate_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the visual appearance, or null if the appearance could not be generated. Generate a new appearance stream with the current annotation properties. The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance. ### get_annotation_feature_level ```cpp virtual double datalogics_interface::Annotation::get_annotation_feature_level() const ``` **Returns:** `double` The minimum PDF version level (e.g. 1.3, 1.4, or 1.5). The minimum PDF version necessary to support the features used in this annotation. ### get_border_dash_pattern ```cpp std::vector< double > datalogics_interface::CircleAnnotation::get_border_dash_pattern() const ``` **Returns:** `std::vector< double >` An array defining a pattern of dashes and gaps to be used in drawing a dashed border (border style D). The dash array is a series of numbers that specify the lengths of alternating dashes and gaps. Lengths must be nonnegative, and are expressed in user space units. Default value is [3] ### get_border_style ```cpp std::string datalogics_interface::CircleAnnotation::get_border_style() const ``` **Returns:** `std::string` The border style. Can be one of: S - Solid D - Dashed. The dash pattern is specified as an array (see DashPattern) B - Beveled I - Inset U - Underline Other border styles may be defined in the future. Default is "S" ### get_border_style_width ```cpp double datalogics_interface::CircleAnnotation::get_border_style_width() const ``` **Returns:** `double` The border width in points. If this value is 0, no border is drawn. The default is 1.0. ### get_color ```cpp Color datalogics_interface::Annotation::get_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The annotation's color. The color of the annotation. ### get_contents ```cpp std::string datalogics_interface::Annotation::get_contents() const ``` **Returns:** `std::string` The annotation's text contents. The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### get_flags ```cpp AnnotationFlags datalogics_interface::Annotation::get_flags() const ``` **Returns:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md) The annotation's flags. The flags for the annotation. ### get_interior_color ```cpp std::unique_ptr< Color > datalogics_interface::Annotation::get_interior_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The interior fill color, or null if no interior color is set. The interior color with which to fill the annotation's rectangle or circle. The color of the border itself can be retrieved from Annotation.Color. ### get_normal_appearance ```cpp std::unique_ptr< Form > datalogics_interface::Annotation::get_normal_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the annotation's normal appearance, or null if no normal appearance has been set. The normal appearance of the annotation, represented as a Form XObject. ### get_opacity ```cpp double datalogics_interface::Annotation::get_opacity() const ``` **Returns:** `double` The opacity value for this annotation. The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### get_rect ```cpp Rect datalogics_interface::Annotation::get_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The annotation's bounding rectangle in user space coordinates. The size and location of the annotation on its page. ### get_subtype ```cpp std::string datalogics_interface::Annotation::get_subtype() const ``` **Returns:** `std::string` The subtype string (e.g. "Circle", "Square", "Line"). The annotation's subtype. ### get_title ```cpp std::string datalogics_interface::Annotation::get_title() const ``` **Returns:** `std::string` The title string. The title of the annotation. ### has_rich_text_data ```cpp bool datalogics_interface::Annotation::has_rich_text_data() const ``` **Returns:** `bool` true if the annotation contains Rich Text String content. Checks the annotation for Rich Text String content (PDFReference 1.7 Section 8.6.2). Annotations that contain Rich Text String content and do not have a normal appearance set will not be visible when rendering the page. ### operator== ```cpp bool datalogics_interface::Annotation::operator==(const Annotation &other) const ``` **Parameters** - `other` ([`const Annotation &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)): The annotation to compare with this annotation. **Returns:** `bool` true if the two annotations are equal. Test annotations for equality (if they are the same annotation). ### set_annotation_feature_level ```cpp virtual void datalogics_interface::Annotation::set_annotation_feature_level(double level) ``` **Parameters** - `level` (`double`): The target PDF version level. Features requiring a higher version will be removed. **Returns:** `void` Removes features not supported in the supplied version number. ### set_border_dash_pattern ```cpp void datalogics_interface::CircleAnnotation::set_border_dash_pattern(const std::vector< double > &pattern) ``` **Parameters** - `pattern` (`const std::vector< double > &`): the border style dash pattern **Returns:** `void` ### set_border_style ```cpp void datalogics_interface::CircleAnnotation::set_border_style(const std::string &style) ``` **Parameters** - `style` (`const std::string &`): the border style **Returns:** `void` ### set_border_style_width ```cpp void datalogics_interface::CircleAnnotation::set_border_style_width(double width) ``` **Parameters** - `width` (`double`): the border style width **Returns:** `void` ### set_color ```cpp void datalogics_interface::Annotation::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new color to set. **Returns:** `void` The color of the annotation. ### set_contents ```cpp void datalogics_interface::Annotation::set_contents(const std::string &contents) ``` **Parameters** - `contents` (`const std::string &`): The new text contents. **Returns:** `void` The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### set_flags ```cpp void datalogics_interface::Annotation::set_flags(AnnotationFlags flags) ``` **Parameters** - `flags` ([`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md)): The new annotation flags to set. **Returns:** `void` The flags for the annotation. ### set_interior_color ```cpp void datalogics_interface::Annotation::set_interior_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new interior fill color. Pass null to remove the interior color. **Returns:** `void` The interior color with which to fill the annotation's rectangle or circle. Only RGB colors are allowed. The color of the border itself can be retrieved from Annotation.Color. ### set_normal_appearance ```cpp void datalogics_interface::Annotation::set_normal_appearance(Form &form) ``` **Parameters** - `form` ([`Form &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)): The Form to use as the annotation's normal appearance. **Returns:** `void` The normal appearance of the annotation, represented as a Form XObject. ### set_opacity ```cpp void datalogics_interface::Annotation::set_opacity(double opacity) ``` **Parameters** - `opacity` (`double`): The new opacity value to set. **Returns:** `void` The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### set_rect ```cpp void datalogics_interface::Annotation::set_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The new bounding rectangle in user space coordinates. **Returns:** `void` The size and location of the annotation on its page. ### set_title ```cpp void datalogics_interface::Annotation::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): The new title string. **Returns:** `void` The title of the annotation. ### to_string ```cpp std::string datalogics_interface::Annotation::to_string() const ``` **Returns:** `std::string` A string describing this annotation, including its type and rectangle. Returns a string representation of this annotation. ### try_as ```cpp T * datalogics_interface::Annotation::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this annotation to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Annotation::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # Clip Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip ```cpp class Clip ``` **Namespace:** `datalogics_interface` ## Description A clipping path is used to mark an area within a page to be highlighted or removed. The clipping path clips out part of the design. A clip can also be used with text. The clipping path defines an area within a page (text or graphic) that will be highlighted or removed. For example, a clipping path could be used to remove the background in a photograph, to highlight a person or object in front, or to super-impose text over an image. Only part of the image appears through a shape created with the clipping path. The Clip class is made up of a list of path and text elements. Any element can have a clip associated with it, and clip objects can hold arbitrary levels of nested container and group objects. If a group object is inside a clip object, and the clip object also contains at least one text object and no path objects, the group object has a special meaning. All text objects contained in a group object like this are considered to be part of the same BT/ET block. This means that the union of these text objects makes up a single clipping path. The text objects do not intersect. **Referenced by:** [`Clip`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md), [`Container`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md), [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`Group`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Group.md), [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md), [`Path`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Path.md), [`Text`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Text.md) **Uses types:** [`Clip`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md) ## Constructors ### Clip ```cpp datalogics_interface::Clip::Clip() ``` *constructor* Creates an empty Clip object. This represents a clipping object that has no effect on elements that refer to it. ### Clip ```cpp datalogics_interface::Clip::Clip(Clip &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Clip &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md)) ### ~Clip ```cpp datalogics_interface::Clip::~Clip() ``` *destructor* ## Methods ### add_element ```cpp void datalogics_interface::Clip::add_element(Element &element) ``` **Parameters** - `element` ([`Element &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md)): - The Element to add to the Clip. **Returns:** `void` Adds an Element to a Clip path, after the Element index specified. ### add_element ```cpp void datalogics_interface::Clip::add_element(Element &element, int add_after) ``` **Parameters** - `element` ([`Element &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md)): - The Element to add to the Clip. - `add_after` (`int`): - The index after which this Element will be added to the Clip's list of Elements. If omitted, it will be added as index 0, i.e., the first Element. **Returns:** `void` Adds an Element to a Clip path, after the Element index specified. ### clone ```cpp std::unique_ptr< Clip > datalogics_interface::Clip::clone() const ``` **Returns:** [`std::unique_ptr< Clip >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md) A new clip object deep copy Makes a new deep copy of this Clip object in memory. ### num_elements ```cpp int datalogics_interface::Clip::num_elements() const ``` **Returns:** `int` - The number of top-level Elements in the Clip. Gets the number of top-level Elements in a Clip object. ### operator= ```cpp Clip & datalogics_interface::Clip::operator=(Clip &&) noexcept ``` **Parameters** - (unnamed) ([`Clip &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md)) **Returns:** [`Clip &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md) ### remove_elements ```cpp void datalogics_interface::Clip::remove_elements(int index) ``` **Parameters** - `index` (`int`): - The index of the Element to remove. **Returns:** `void` Removes an Element from a Clip object. ### remove_elements ```cpp void datalogics_interface::Clip::remove_elements(int index, int count) ``` **Parameters** - `index` (`int`): - The index of the Element to remove. - `count` (`int`) **Returns:** `void` Removes an Element from a Clip object. ### to_string ```cpp std::string datalogics_interface::Clip::to_string() const ``` **Returns:** `std::string` A clipping path is used to mark an area within a page to be highlighted or removed. The clipping path clips out part of the design. A clip can also be used with text. The clipping path defines an area within a page (text or graphic) that will be highlighted or removed. For example, a clipping path could be used to remove the background in a photograph, to highlight a person or object in front, or to super-impose text over an image. Only part of the image appears through a shape created with the clipping path. The Clip class is made up of a list of path and text elements. Any element can have a clip associated with it, and clip objects can hold arbitrary levels of nested container and group objects. If a group object is inside a clip object, and the clip object also contains at least one text object and no path objects, the group object has a special meaning. All text objects contained in a group object like this are considered to be part of the same BT/ET block. This means that the union of these text objects makes up a single clipping path. The text objects do not intersect. --- # ClosePathSegment Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ClosePathSegment ```cpp class ClosePathSegment : Segment ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Segment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Segment.md) ## Description An operator that completes a vector shape, drawing a line from the first point to the last point. A path is a series of commands that define the boundary of a vector shape. The ClosePath command draws a line from the current location back to its starting point, effectively closing a box or parabolic shape on a page. ## Constructors ### ClosePathSegment ```cpp datalogics_interface::ClosePathSegment::ClosePathSegment() ``` *constructor* Construct a close-path segment. ### ~ClosePathSegment ```cpp datalogics_interface::ClosePathSegment::~ClosePathSegment() override ``` *destructor* ## Methods ### to_string ```cpp std::string datalogics_interface::ClosePathSegment::to_string() const override ``` **Returns:** `std::string` Represents a segment, or a single line, within a path. --- # Collection Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Collection ```cpp class Collection ``` **Namespace:** `datalogics_interface` ## Description Allows for manipulation of PDF collections, or portfolios. The class illustrates how to process a collection's schema. It also describes sorting of a portfolio. **Referenced by:** [`Document`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md) **Uses types:** [`CollectionSchema`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchema.md), [`CollectionSortItem`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSortItem.md), [`CollectionSplitType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CollectionSplitType.md), [`CollectionViewType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CollectionViewType.md) ## Constructors ### Collection ```cpp datalogics_interface::Collection::Collection(Collection &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Collection &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Collection.md)) ### ~Collection ```cpp datalogics_interface::Collection::~Collection() ``` *destructor* ## Methods ### change_view_mode ```cpp void datalogics_interface::Collection::change_view_mode(CollectionViewType view, CollectionSplitType split) ``` **Parameters** - `view` ([`CollectionViewType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CollectionViewType.md)): one of the members of CollectionViewMode enum. - `split` ([`CollectionSplitType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CollectionSplitType.md)): enum of split mode (selector) **Returns:** `void` SetCollectionView sets view mode value to the Collection. ### get_schema ```cpp CollectionSchema datalogics_interface::Collection::get_schema() const ``` **Returns:** [`CollectionSchema`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchema.md) Schema object. GetSchema allows to obtain Schema object for current Collection. The Schema object does not have constructor. Only Collection is able to create Schema. ### get_sort ```cpp std::vector< CollectionSortItem > datalogics_interface::Collection::get_sort() const ``` **Returns:** [`std::vector< CollectionSortItem >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSortItem.md) the list of CollectionSortItem, which contains field/fields name to sort Collection by and sort order. GetSort gets sort parameters for the Collection. ### operator= ```cpp Collection & datalogics_interface::Collection::operator=(Collection &&) noexcept ``` **Parameters** - (unnamed) ([`Collection &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Collection.md)) **Returns:** [`Collection &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Collection.md) ### set_sort ```cpp void datalogics_interface::Collection::set_sort(const std::vector< CollectionSortItem > &sort_items) ``` **Parameters** - `sort_items` ([`const std::vector< CollectionSortItem > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSortItem.md)): the list of CollectionSortItem. **Returns:** `void` SetSort allows to set field/fields to sort by as well as sort order (ascending or descending). --- # CollectionSchema Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchema ```cpp class CollectionSchema ``` **Namespace:** `datalogics_interface` ## Description Provides for adding/removing/retrieving schema fields in a collection. **Referenced by:** [`Collection`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Collection.md) **Uses types:** [`CollectionSchemaField`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchemaField.md) ## Constructors ### CollectionSchema ```cpp datalogics_interface::CollectionSchema::CollectionSchema(CollectionSchema &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`CollectionSchema &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchema.md)) ### ~CollectionSchema ```cpp datalogics_interface::CollectionSchema::~CollectionSchema() ``` *destructor* ## Methods ### add_field ```cpp void datalogics_interface::CollectionSchema::add_field(CollectionSchemaField &field) ``` **Parameters** - `field` ([`CollectionSchemaField &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchemaField.md)): CollectionSchemaField object which will be added to the schema. **Returns:** `void` AddField allows to set new field to the CollectionSchema object. If the target field exists, it is overwritten. The schema fields contain all information required to organize Collection in a certain way. ### get_field ```cpp std::unique_ptr< CollectionSchemaField > datalogics_interface::CollectionSchema::get_field(const std::string &name) const ``` **Parameters** - `name` (`const std::string &`): textual field name. **Returns:** [`std::unique_ptr< CollectionSchemaField >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchemaField.md) CollectionSchemaField object if found or NULL otherwise. GetField allows to obtain CollectionSchemaField by name. ### get_field ```cpp std::unique_ptr< CollectionSchemaField > datalogics_interface::CollectionSchema::get_field(int index) const ``` **Parameters** - `index` (`int`): textual field name. **Returns:** [`std::unique_ptr< CollectionSchemaField >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchemaField.md) CollectionSchemaField object if found or NULL otherwise. GetField allows to obtain CollectionSchemaField by name. ### get_field_count ```cpp int datalogics_interface::CollectionSchema::get_field_count() const ``` **Returns:** `int` the fields number. GetFieldsNumber allows to obtain fields number in the schema. ### operator= ```cpp CollectionSchema & datalogics_interface::CollectionSchema::operator=(CollectionSchema &&) noexcept ``` **Parameters** - (unnamed) ([`CollectionSchema &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchema.md)) **Returns:** [`CollectionSchema &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchema.md) ### remove_field ```cpp void datalogics_interface::CollectionSchema::remove_field(CollectionSchemaField &field) ``` **Parameters** - `field` ([`CollectionSchemaField &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchemaField.md)): CollectionSchemaField which will be removed from the schema. **Returns:** `void` RemoveField allows to remove specified field from the schema. NOTE: to distinguish whether specified object belongs to the schema this uses CollectionSchemaField's name. --- # CollectionSchemaField Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchemaField ```cpp class CollectionSchemaField ``` **Namespace:** `datalogics_interface` ## Description Allows for the creation of collection schema field objects. Parameters that are part of a schema's field may be set. **Referenced by:** [`CollectionSchema`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchema.md) **Uses types:** [`SchemaFieldSubtype`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SchemaFieldSubtype.md) ## Constructors ### CollectionSchemaField ```cpp datalogics_interface::CollectionSchemaField::CollectionSchemaField(CollectionSchemaField &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`CollectionSchemaField &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchemaField.md)) ### CollectionSchemaField ```cpp datalogics_interface::CollectionSchemaField::CollectionSchemaField(const std::string &field_id, SchemaFieldSubtype subtype) ``` *constructor* **Parameters** - `field_id` (`const std::string &`): the schema field ID. The ID is used during creation and extraction of the schema field. It is the unique identifier of the schema field. - `subtype` ([`SchemaFieldSubtype`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SchemaFieldSubtype.md)): the schema field subtype. The subtypes are predefined. The value of this parameter must correspond to the one of the SchemaFieldSubtype enum values. CCollectionSchemaField allows to create CollectionSchemaField object. The constructor accepts identifier value and subtype required by the schema field. ### ~CollectionSchemaField ```cpp datalogics_interface::CollectionSchemaField::~CollectionSchemaField() ``` *destructor* ## Methods ### get_editable ```cpp bool datalogics_interface::CollectionSchemaField::get_editable() const ``` **Returns:** `bool` whether edit mode is allowed or not. GetEditable allows to obtain information about edit mode of the current field. ### get_id ```cpp std::string datalogics_interface::CollectionSchemaField::get_id() const ``` **Returns:** `std::string` the unique field's id. GetID allows to obtain the unique id with which schema field has been created. ### get_index ```cpp int datalogics_interface::CollectionSchemaField::get_index() const ``` **Returns:** `int` the index of the field. GetIndex allows to obtain field index. ### get_name ```cpp std::string datalogics_interface::CollectionSchemaField::get_name() const ``` **Returns:** `std::string` the field name. GetName allows to obtain field name. ### get_subtype ```cpp SchemaFieldSubtype datalogics_interface::CollectionSchemaField::get_subtype() const ``` **Returns:** [`SchemaFieldSubtype`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SchemaFieldSubtype.md) field subtype. One of the ShemaFieldSubtype enum values. GetSubtype allows to obtain the field subtype. ### get_visible ```cpp bool datalogics_interface::CollectionSchemaField::get_visible() const ``` **Returns:** `bool` true if current schema field is visible, false otherwise. GetVisible allows to obtain information about filed visibility. ### operator= ```cpp CollectionSchemaField & datalogics_interface::CollectionSchemaField::operator=(CollectionSchemaField &&) noexcept ``` **Parameters** - (unnamed) ([`CollectionSchemaField &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchemaField.md)) **Returns:** [`CollectionSchemaField &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSchemaField.md) ### set_editable ```cpp void datalogics_interface::CollectionSchemaField::set_editable(bool editable) ``` **Parameters** - `editable` (`bool`): pass true to allow to edit this field or false otherwise. **Returns:** `void` SetEditable allows to change edit mode for shema field. Its value false by default. ### set_index ```cpp void datalogics_interface::CollectionSchemaField::set_index(int index) ``` **Parameters** - `index` (`int`): field index. **Returns:** `void` SetIndex allows to set field index. NOTE: the field indexes are zero-based in ascending order without gaps. ### set_name ```cpp void datalogics_interface::CollectionSchemaField::set_name(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): the new field name. **Returns:** `void` SetName allows to change field name. ### set_visible ```cpp void datalogics_interface::CollectionSchemaField::set_visible(bool visible) ``` **Parameters** - `visible` (`bool`): the visibility flag. **Returns:** `void` SetVisible allows to set field's default visibility. Its value true by default. --- # CollectionSortItem Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CollectionSortItem ```cpp class CollectionSortItem ``` **Namespace:** `datalogics_interface` ## Description Stores data about fields that viewers use for sorting collection items. Collections are aslo known as portfolios. **Referenced by:** [`Collection`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Collection.md) ## Constructors ### CollectionSortItem ```cpp datalogics_interface::CollectionSortItem::CollectionSortItem(const std::string &field_id, bool ascending) ``` *constructor* **Parameters** - `field_id` (`const std::string &`): the schema field's id. - `ascending` (`bool`): true for ascending, false for descending CCollectionSortItem allows to construct sort item which will be used for collection sorting. ## Methods ### get_ascending ```cpp bool datalogics_interface::CollectionSortItem::get_ascending() const ``` **Returns:** `bool` true if the sort order is ascending, false if descending. Gets whether the sort order is ascending. ### get_name ```cpp std::string datalogics_interface::CollectionSortItem::get_name() const ``` **Returns:** `std::string` The field name to sort by. Gets the field name used for sorting. This is the schema field identifier that determines which collection field is used as the sort key. --- # CollectionSplitType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CollectionSplitType **Namespace:** `datalogics_interface` ## Description Specifies the split orientation for a PDF collection (portfolio) view. Controls how the navigator and preview panes are arranged when displaying a PDF collection. ## Values - `Default = 0x2000`: Default split. - `Horizontal = 0x2001`: Split horizontally. - `Vertical = 0x2002`: Split vertically. - `None = 0x2003`: No split, show navigator. - `Preview = 0x2004`: No split, show preview. --- # CollectionViewType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CollectionViewType **Namespace:** `datalogics_interface` ## Description Specifies the type of navigator view used to display a PDF collection (portfolio). ## Values - `Tile = 0x1000`: Tile navigator. - `Detail = 0x1001`: Details navigator. - `Custom = 0x1002`: Custom navigator. --- # Color Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color ```cpp class Color ``` **Namespace:** `datalogics_interface` ## Description A color specified by values appropriate for its color space. The values that are offered range from 0 to 1.0 for red, green, and blue (RGB) or cyan, magenta, yellow, and black (CYMK). **Referenced by:** [`Annotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md), [`Bookmark`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md), [`CircleAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CircleAnnotation.md), [`FreeTextAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FreeTextAnnotation.md), [`GraphicState`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md), [`HighlightAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/HighlightAnnotation.md), [`InkAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/InkAnnotation.md), [`LineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LineAnnotation.md), [`LinkAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LinkAnnotation.md), [`PolyLineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PolyLineAnnotation.md), [`PolygonAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PolygonAnnotation.md), [`Redaction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Redaction.md), [`SquareAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SquareAnnotation.md), [`Style`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Style.md), [`TextMarkupAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextMarkupAnnotation.md), [`UnderlineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/UnderlineAnnotation.md), [`WatermarkTextParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkTextParams.md) **Uses types:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) ## Constructors ### Color ```cpp datalogics_interface::Color::Color(Color &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Color &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)) ### Color ```cpp datalogics_interface::Color::Color(const class Pattern &pattern) ``` *constructor* **Parameters** - `pattern` ([`const class Pattern &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Pattern.md)): the grayscale color value for the new color (0.0 - 1.0) Create a new color in the DeviceGray colorspace with the specified value. ### Color ```cpp datalogics_interface::Color::Color(const ColorSpace &color_space, const std::vector< double > &values) ``` *constructor* **Parameters** - `color_space` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): the grayscale color value for the new color (0.0 - 1.0) - `values` (`const std::vector< double > &`) Create a new color in the DeviceGray colorspace with the specified value. ### Color ```cpp datalogics_interface::Color::Color(double c, double m, double y, double k) ``` *constructor* **Parameters** - `c` (`double`): the grayscale color value for the new color (0.0 - 1.0) - `m` (`double`) - `y` (`double`) - `k` (`double`) Create a new color in the DeviceGray colorspace with the specified value. ### Color ```cpp datalogics_interface::Color::Color(double grey) ``` *constructor* **Parameters** - `grey` (`double`): the grayscale color value for the new color (0.0 - 1.0) Create a new color in the DeviceGray colorspace with the specified value. ### Color ```cpp datalogics_interface::Color::Color(double r, double g, double b) ``` *constructor* **Parameters** - `r` (`double`): the grayscale color value for the new color (0.0 - 1.0) - `g` (`double`) - `b` (`double`) Create a new color in the DeviceGray colorspace with the specified value. ### ~Color ```cpp datalogics_interface::Color::~Color() ``` *destructor* ## Methods ### get_space ```cpp std::unique_ptr< ColorSpace > datalogics_interface::Color::get_space() const ``` **Returns:** [`std::unique_ptr< ColorSpace >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) The ColorSpace that this color belongs to. The color space of the color. ### get_value ```cpp std::vector< double > datalogics_interface::Color::get_value() const ``` **Returns:** `std::vector< double >` A list of color component values, each ranging from 0.0 to 1.0. The values of the color. Not valid for pattern-based colors. ### operator!= ```cpp bool datalogics_interface::Color::operator!=(const Color &other) const ``` **Parameters** - `other` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)) **Returns:** `bool` true if `other` is not equal to this. Inequality. ### operator= ```cpp Color & datalogics_interface::Color::operator=(Color &&) noexcept ``` **Parameters** - (unnamed) ([`Color &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)) **Returns:** [`Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) ### operator== ```cpp bool datalogics_interface::Color::operator==(const Color &other) const ``` **Parameters** - `other` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The Color to compare with. **Returns:** `bool` true if the two colors are equal, false otherwise. Determines whether this Color is equal to another. Two Colors are considered equal if they have the same color space and the same component values. ### to_string ```cpp std::string datalogics_interface::Color::to_string() const ``` **Returns:** `std::string` A string describing the color, including its color space and component values. Returns a string representation of this Color. --- # ColorConvertActions Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions ```cpp class ColorConvertActions ``` **Namespace:** `datalogics_interface` ## Description Class that defines color conversion actions for an object described by certain attributes. **Referenced by:** [`ColorConvertParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertParams.md) **Uses types:** [`ColorConvertActionType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertActionType.md), [`ColorConvertObjAttrs`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertObjAttrs.md), [`ColorConvertSpaceType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertSpaceType.md), [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md), [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md) ## Constructors ### ColorConvertActions ```cpp datalogics_interface::ColorConvertActions::ColorConvertActions() ``` *constructor* Default constructor for the ColorConvertActions class. Sets default values to the members. ### ColorConvertActions ```cpp datalogics_interface::ColorConvertActions::ColorConvertActions(ColorConvertActions &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`ColorConvertActions &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md)) ### ColorConvertActions ```cpp datalogics_interface::ColorConvertActions::ColorConvertActions(const ColorConvertActions &other) ``` *constructor* **Parameters** - `other` ([`const ColorConvertActions &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md)) Copy constructor. ### ~ColorConvertActions ```cpp datalogics_interface::ColorConvertActions::~ColorConvertActions() ``` *destructor* ## Methods ### get_action ```cpp ColorConvertActionType datalogics_interface::ColorConvertActions::get_action() const ``` **Returns:** [`ColorConvertActionType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertActionType.md) Gets / sets the action, specifying what to do when an object matches this Settings record. ### get_colorant_name ```cpp std::string datalogics_interface::ColorConvertActions::get_colorant_name() const ``` **Returns:** `std::string` For ink actions (which describe a single colorant, whether used in Separation or DeviceN, and which are not matched using the above matching fields) this describes the colorant of the ink. ### get_convert_intent ```cpp RenderIntent datalogics_interface::ColorConvertActions::get_convert_intent() const ``` **Returns:** [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md) Gets / sets the intent that overrides the object's original render intent when performing color conversion. UseProfileIntent means that the intent of the object must not be overridden. ### get_convert_profile ```cpp ColorProfile datalogics_interface::ColorConvertActions::get_convert_profile() const ``` **Returns:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md) Gets / sets the target ColorProfile for the conversion. If the output intent is embedded, this should be the output intent profile. ### get_convert_profile_path ```cpp std::string datalogics_interface::ColorConvertActions::get_convert_profile_path() const ``` **Returns:** `std::string` Gets / sets the target ColorProfile for the conversion using the profile found at the path provided. If the output intent is embedded, this should be the output intent profile. NOTE: If specifying a path, ConvertProfile must be set to Null_ColorProfile. ### get_embed_color_profile ```cpp bool datalogics_interface::ColorConvertActions::get_embed_color_profile() const ``` **Returns:** `bool` If true, embed the target profile. If false, the resulting color is Device, if possible. ### get_intent_to_match ```cpp RenderIntent datalogics_interface::ColorConvertActions::get_intent_to_match() const ``` **Returns:** [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md) Gets / sets the rendering intent of the object. If this is UseProfileIntent this action applies to any intent. ### get_is_ink_action ```cpp bool datalogics_interface::ColorConvertActions::get_is_ink_action() const ``` **Returns:** `bool` Marks this Action to be applied to inks. ### get_must_match_all_attrs ```cpp ColorConvertObjAttrs datalogics_interface::ColorConvertActions::get_must_match_all_attrs() const ``` **Returns:** [`ColorConvertObjAttrs`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertObjAttrs.md) A bit field that gets / sets the attributes an element must match to be color converted. The element must match ALL these attributes to be color converted. ### get_must_match_all_cs_attrs ```cpp ColorConvertSpaceType datalogics_interface::ColorConvertActions::get_must_match_all_cs_attrs() const ``` **Returns:** [`ColorConvertSpaceType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertSpaceType.md) A bit field that gets / sets the Color Space attributes an object must match to be color converted. The element must match ALL these Color Space attributes to be color converted. ### get_must_match_any_attrs ```cpp ColorConvertObjAttrs datalogics_interface::ColorConvertActions::get_must_match_any_attrs() const ``` **Returns:** [`ColorConvertObjAttrs`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertObjAttrs.md) A bit field that gets / sets the attributes an element must match to be color converted. The element can match ONE OR MORE of these attributes to be color converted. ### get_must_match_any_cs_attrs ```cpp ColorConvertSpaceType datalogics_interface::ColorConvertActions::get_must_match_any_cs_attrs() const ``` **Returns:** [`ColorConvertSpaceType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertSpaceType.md) A bit field that gets / sets the Color Space attributes an object must match to be color converted. The element can match ONE OR MORE Color Space attributes to be color converted. ### get_preserve_black ```cpp bool datalogics_interface::ColorConvertActions::get_preserve_black() const ``` **Returns:** `bool` If true, perform a black-preserving transform when converting. ### get_use_black_point_compensation ```cpp bool datalogics_interface::ColorConvertActions::get_use_black_point_compensation() const ``` **Returns:** `bool` If true, turn on black point compensation for color conversions. ### operator= ```cpp ColorConvertActions & datalogics_interface::ColorConvertActions::operator=(ColorConvertActions &&) noexcept ``` **Parameters** - (unnamed) ([`ColorConvertActions &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md)) **Returns:** [`ColorConvertActions &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md) ### operator= ```cpp ColorConvertActions & datalogics_interface::ColorConvertActions::operator=(const ColorConvertActions &other) ``` **Parameters** - `other` ([`const ColorConvertActions &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md)) **Returns:** [`ColorConvertActions &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md) Copy assignment. ### set_action ```cpp void datalogics_interface::ColorConvertActions::set_action(ColorConvertActionType action) ``` **Parameters** - `action` ([`ColorConvertActionType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertActionType.md)): the action to apply when an object matches this Settings record. **Returns:** `void` ### set_colorant_name ```cpp void datalogics_interface::ColorConvertActions::set_colorant_name(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): the colorant name (used for ink actions that describe a single colorant). **Returns:** `void` ### set_convert_intent ```cpp void datalogics_interface::ColorConvertActions::set_convert_intent(RenderIntent intent) ``` **Parameters** - `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)): the render intent that overrides the object's original render intent during color conversion. UseProfileIntent leaves the original intent in place. **Returns:** `void` ### set_convert_profile ```cpp void datalogics_interface::ColorConvertActions::set_convert_profile(ColorProfile profile) ``` **Parameters** - `profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): the target ColorProfile for the conversion; if the output intent is embedded, this should be the output intent profile. **Returns:** `void` ### set_convert_profile_path ```cpp void datalogics_interface::ColorConvertActions::set_convert_profile_path(const std::string &path) ``` **Parameters** - `path` (`const std::string &`): the path to the target ColorProfile for the conversion. ConvertProfile must be set to Null_ColorProfile when using a path. **Returns:** `void` ### set_embed_color_profile ```cpp void datalogics_interface::ColorConvertActions::set_embed_color_profile(bool embed) ``` **Parameters** - `embed` (`bool`): true to embed the target profile; false to leave the resulting color as Device when possible. **Returns:** `void` ### set_intent_to_match ```cpp void datalogics_interface::ColorConvertActions::set_intent_to_match(RenderIntent intent) ``` **Parameters** - `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)): the rendering intent to match; UseProfileIntent matches any intent. **Returns:** `void` ### set_is_ink_action ```cpp void datalogics_interface::ColorConvertActions::set_is_ink_action(bool is_ink) ``` **Parameters** - `is_ink` (`bool`): true if this Action applies to inks, false otherwise. **Returns:** `void` ### set_must_match_all_attrs ```cpp void datalogics_interface::ColorConvertActions::set_must_match_all_attrs(ColorConvertObjAttrs attrs) ``` **Parameters** - `attrs` ([`ColorConvertObjAttrs`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertObjAttrs.md)): the bit field of attributes; an element must match ALL of these to be color converted. **Returns:** `void` ### set_must_match_all_cs_attrs ```cpp void datalogics_interface::ColorConvertActions::set_must_match_all_cs_attrs(ColorConvertSpaceType attrs) ``` **Parameters** - `attrs` ([`ColorConvertSpaceType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertSpaceType.md)): the bit field of color-space attributes; an object must match ALL of these to be color converted. **Returns:** `void` ### set_must_match_any_attrs ```cpp void datalogics_interface::ColorConvertActions::set_must_match_any_attrs(ColorConvertObjAttrs attrs) ``` **Parameters** - `attrs` ([`ColorConvertObjAttrs`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertObjAttrs.md)): the bit field of attributes; an element matching ANY of these is color converted. **Returns:** `void` ### set_must_match_any_cs_attrs ```cpp void datalogics_interface::ColorConvertActions::set_must_match_any_cs_attrs(ColorConvertSpaceType attrs) ``` **Parameters** - `attrs` ([`ColorConvertSpaceType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertSpaceType.md)): the bit field of color-space attributes; an object matching ANY of these is color converted. **Returns:** `void` ### set_preserve_black ```cpp void datalogics_interface::ColorConvertActions::set_preserve_black(bool preserve) ``` **Parameters** - `preserve` (`bool`): true to perform a black-preserving transform when converting, false otherwise. **Returns:** `void` ### set_use_black_point_compensation ```cpp void datalogics_interface::ColorConvertActions::set_use_black_point_compensation(bool use) ``` **Parameters** - `use` (`bool`): true to enable black point compensation for color conversions, false otherwise. **Returns:** `void` --- # ColorConvertActionType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertActionType **Namespace:** `datalogics_interface` ## Description Constants specifying the action to take when a color conversion match occurs. ## Values - `Preserve = 0`: Do nothing but handle ink aliases. - `Convert = 1`: Convert to target space. - `Decalibrate = 2`: Convert calibrated to device. - `DownConvert = 3`: NChannel to DeviceN. --- # ColorConvertObjAttrs Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertObjAttrs **Namespace:** `datalogics_interface` ## Description Bit field constants specifying object attributes used for matching in color conversion actions. ## Values - `Image = (1 << 0)`: Object is an image. - `JPEG = (1 << 1)`: Object is a JPEG image. - `JPEG2000 = (1 << 2)`: Object is a JPEG2000 image. - `Lossy = (1 << 3)`: Image in a lossy space. - `Lossless = (1 << 4)`: Image in a non-lossy space. - `Text = (1 << 5)`: Object is text. - `LineArt = (1 << 6)`: Object is line art. - `Shade = (1 << 7)`: Object is a smooth shade. - `Transparent = (1 << 8)`: Object is not opaque. - `Overprinting = (1 << 9)`: Object overprints. - `OverprintMode = (1 << 10)`: OPM set to 1. - `AnyObject = ((1 << 0)|(1 << 5)|(1 << 6)|(1 << 7))`: Match Image, Text, LineArt, or Shade objects. --- # ColorConvertParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertParams ```cpp class ColorConvertParams ``` **Namespace:** `datalogics_interface` ## Description Holds parameters to be passed to a color convert method. This includes the actions to take in case of a match. Each object is compared against the selection criteria for each of the actions, in order, until a matching action is found. **Uses types:** [`ColorConvertActions`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md), [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md) ## Constructors ### ColorConvertParams ```cpp datalogics_interface::ColorConvertParams::ColorConvertParams(ColorConvertParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`ColorConvertParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertParams.md)) ### ColorConvertParams ```cpp datalogics_interface::ColorConvertParams::ColorConvertParams(const ColorConvertParams &other) ``` *constructor* **Parameters** - `other` ([`const ColorConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertParams.md)) Copy constructor. ### ColorConvertParams ```cpp datalogics_interface::ColorConvertParams::ColorConvertParams(std::vector< ColorConvertActions > actions) ``` *constructor* **Parameters** - `actions` ([`std::vector< ColorConvertActions >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md)): The list of ColorConvertActions to apply during color conversion. Constructs a ColorConvertParams with the specified color conversion actions. Initializes AllowLossyCompression to false, all default color profiles to null, and all render intents to Perceptual. ### ~ColorConvertParams ```cpp datalogics_interface::ColorConvertParams::~ColorConvertParams() ``` *destructor* ## Methods ### get_actions ```cpp std::vector< ColorConvertActions > datalogics_interface::ColorConvertParams::get_actions() const ``` **Returns:** [`std::vector< ColorConvertActions >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md) The list of conversion actions applied to matching objects. ### get_allow_lossy_compression ```cpp bool datalogics_interface::ColorConvertParams::get_allow_lossy_compression() const ``` **Returns:** `bool` If true, DCT or JPX encoding will be used resulting in a smaller PDF. If false, FlateDecoding will be used instead. ### get_default_cmyk ```cpp ColorProfile datalogics_interface::ColorConvertParams::get_default_cmyk() const ``` **Returns:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md) The default CMYK ColorProfile used when a document object has no embedded CMYK profile. Initially set to the null color profile. ### get_default_gray ```cpp ColorProfile datalogics_interface::ColorConvertParams::get_default_gray() const ``` **Returns:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md) The default Gray ColorProfile used when a document object has no embedded Gray profile. Initially set to the null color profile. ### get_default_rgb ```cpp ColorProfile datalogics_interface::ColorConvertParams::get_default_rgb() const ``` **Returns:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md) The default RGB ColorProfile used when a document object has no embedded RGB profile. Initially set to the null color profile. ### operator= ```cpp ColorConvertParams & datalogics_interface::ColorConvertParams::operator=(ColorConvertParams &&) noexcept ``` **Parameters** - (unnamed) ([`ColorConvertParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertParams.md)) **Returns:** [`ColorConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertParams.md) ### operator= ```cpp ColorConvertParams & datalogics_interface::ColorConvertParams::operator=(const ColorConvertParams &other) ``` **Parameters** - `other` ([`const ColorConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertParams.md)) **Returns:** [`ColorConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertParams.md) Copy assignment. ### set_actions ```cpp void datalogics_interface::ColorConvertParams::set_actions(std::vector< ColorConvertActions > actions) ``` **Parameters** - `actions` ([`std::vector< ColorConvertActions >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertActions.md)) **Returns:** `void` The list of conversion actions applied to matching objects. ### set_allow_lossy_compression ```cpp void datalogics_interface::ColorConvertParams::set_allow_lossy_compression(bool allow) ``` **Parameters** - `allow` (`bool`) **Returns:** `void` If true, DCT or JPX encoding will be used resulting in a smaller PDF. If false, FlateDecoding will be used instead. ### set_default_cmyk ```cpp void datalogics_interface::ColorConvertParams::set_default_cmyk(ColorProfile profile) ``` **Parameters** - `profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)) **Returns:** `void` The default CMYK ColorProfile used when a document object has no embedded CMYK profile. Initially set to the null color profile. ### set_default_gray ```cpp void datalogics_interface::ColorConvertParams::set_default_gray(ColorProfile profile) ``` **Parameters** - `profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)) **Returns:** `void` The default Gray ColorProfile used when a document object has no embedded Gray profile. Initially set to the null color profile. ### set_default_rgb ```cpp void datalogics_interface::ColorConvertParams::set_default_rgb(ColorProfile profile) ``` **Parameters** - `profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)) **Returns:** `void` The default RGB ColorProfile used when a document object has no embedded RGB profile. Initially set to the null color profile. --- # ColorConvertSpaceType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorConvertSpaceType **Namespace:** `datalogics_interface` ## Description Constants specifying color space types used for matching in color conversion actions. ## Values - `DeviceSpace = (1 << 0)`: Device color space. - `CalibratedSpace = (1 << 1)`: Calibrated color space. - `AlternateSpace = (1 << 3)`: Alternate color space. - `BaseSpace = (1 << 4)`: Base of indexed space. - `IndexedSpace = (1 << 5)`: Indexed color space. - `SeparationSpace = (1 << 6)`: Separation color space. - `DeviceNSpace = (1 << 7)`: DeviceN color space. - `NChannelSpace = (1 << 8)`: NChannel color space. - `RGBSpace = (1 << 9)`: RGB color space. - `CMYKSpace = (1 << 10)`: CMYK color space. - `GraySpace = (1 << 11)`: Gray color space. - `LabSpace = (1 << 12)`: Lab color space. - `AnySpace = ((1 << 0)|(1 << 1)|(1 << 2)|(1 << 3)|(1 << 4)|(1 << 5)|(1 << 6)|(1 << 7)|(1 << 8)|(1 << 9)|(1 << 10)|(1 << 11)|(1 << 12))`: Match any color space (union of all values above). --- # ColorProfile Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile **Namespace:** `datalogics_interface` ## Description Constants identifying standard ICC color profiles for use in color conversion. ## Values - `Null = 0`: Sentinel indicating that the profile is not a built-in. - `Lab_D50 = 1`: Adobe's standard Lab profile, white point D50; matches ICC's Lab PCS space. - `PCS_XYZ = 2`: XYZ profile that matches ICC's XYZ PCS space. - `FLAT_XYZ = 3`: XYZ profile with a flat white point (X = Y = Z = 1.0). Used by Photoshop as an intermediate space. - `sRGB = 4`: HP's sRGB profile; default Windows monitor profile. - `AppleRGB = 5`: Default RGB space used by Photoshop 4.0 and earlier; default macOS monitor profile. - `AdobeRGB1998 = 6`: Adobe's wider-gamut RGB space. - `ColorMatchRGB = 7`: Simplified version of Radius' ColorMatch RGB without the non-zero black point. - `Gamma18 = 8`: Grayscale display profile with gamma 1.8. - `Gamma22 = 9`: Grayscale display profile with gamma 2.2. - `DotGain10 = 10`: Grayscale printer profile with dot gain 10%. - `DotGain15 = 11`: Grayscale printer profile with dot gain 15%. - `DotGain20 = 12`: Grayscale printer profile with dot gain 20%. - `DotGain25 = 13`: Grayscale printer profile with dot gain 25%. - `DotGain30 = 14`: Grayscale printer profile with dot gain 30%. - `MonitorRGB = 15`: System "Monitor RGB" profile. - `SystemRGB = 16`: macOS ColorSync system default RGB profile. - `SystemCMYK = 17`: macOS ColorSync system default CMYK profile. - `SystemGray = 18`: macOS ColorSync system default grayscale profile. - `SystemInput = 19`: macOS ColorSync system default input-device profile. - `SystemOutput = 20`: macOS ColorSync system default output-device profile. - `SystemProofer = 21`: macOS ColorSync system default proofer-device profile. - `WorkingRGB = 22`: Application working (RGB) color space profile. - `WorkingCMYK = 23`: Application working (CMYK) color space profile. - `WorkingGray = 24`: Application working (gray) color space profile. - `Acrobat5_CMYK = 25`: Acrobat 5 CMYK profile. - `Acrobat9_CMYK = 26`: Acrobat 9 CMYK profile. --- # ColorSpace Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace ```cpp class ColorSpace ``` **Namespace:** `datalogics_interface` **Derived classes:** [`CalGrayColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CalGrayColorSpace.md), [`CalRGBColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CalRGBColorSpace.md), [`DeviceNColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DeviceNColorSpace.md), [`ICCBasedColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ICCBasedColorSpace.md), [`IndexedColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/IndexedColorSpace.md), [`LabColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LabColorSpace.md), [`NamedColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NamedColorSpace.md), [`SeparationColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationColorSpace.md) ## Description Base class for all color spaces. **Referenced by:** [`AxialShadingPattern`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/AxialShadingPattern.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Content`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md), [`DeviceNColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DeviceNColorSpace.md), [`DrawParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DrawParams.md), [`ICCBasedColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ICCBasedColorSpace.md), [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md), [`IndexedColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/IndexedColorSpace.md), [`PageImageParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md), [`SeparationColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationColorSpace.md), [`ShadingPattern`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ShadingPattern.md) **Uses types:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Constructors ### ColorSpace ```cpp datalogics_interface::ColorSpace::ColorSpace(ColorSpace &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`ColorSpace &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)) ### ~ColorSpace ```cpp virtual datalogics_interface::ColorSpace::~ColorSpace() ``` *destructor* ## Methods ### get_name ```cpp std::string datalogics_interface::ColorSpace::get_name() const ``` **Returns:** `std::string` The name of the color space. A named color space may be named something like DeviceRGB. More complicated color spaces may have a name like Indexed or ICCBased. ### get_num_components ```cpp int datalogics_interface::ColorSpace::get_num_components() const ``` **Returns:** `int` The number of color components. The number of components in the color space. For example, DeviceGray has 1 component, DeviceRGB has 3, and DeviceCMYK has 4. ### get_pdf_object ```cpp std::unique_ptr< PDFObject > datalogics_interface::ColorSpace::get_pdf_object() const ``` **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The PDFObject associated with the color space. Get the PDFObject associated with the color space. This may be a PDFName, PDFDict, PDFStream, or PDFArray. ### operator= ```cpp ColorSpace & datalogics_interface::ColorSpace::operator=(ColorSpace &&) noexcept ``` **Parameters** - (unnamed) ([`ColorSpace &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)) **Returns:** [`ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) ### operator== ```cpp virtual bool datalogics_interface::ColorSpace::operator==(const ColorSpace &other) const ``` **Parameters** - `other` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): The ColorSpace to compare against. **Returns:** `bool` true if the two color spaces are equal, false otherwise. Test for equality. This works best for named color spaces. More complex color spaces (such as ICCBased) do not support equality testing and will always return false. ### to_string ```cpp std::string datalogics_interface::ColorSpace::to_string() const ``` **Returns:** `std::string` A string describing this ColorSpace. Convert a ColorSpace to a string representation. --- # ColorValueConverter Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorValueConverter ```cpp class ColorValueConverter ``` **Namespace:** `datalogics_interface` ## Description This class contains methods used to convert sets of values from one Colorspace to another. **Uses types:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md), [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md) ## Constructors ### ColorValueConverter ```cpp datalogics_interface::ColorValueConverter::ColorValueConverter()=default ``` *constructor* Default constructor. ## Methods ### convert_values ```cpp std::vector< uint8_t > datalogics_interface::ColorValueConverter::convert_values(ColorProfile source_profile, ColorProfile destination_profile, RenderIntent intent, uint32_t num_input_sets, const std::vector< uint8_t > &input_values) const ``` **Parameters** - `source_profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): The Color Profile to be used for input values. - `destination_profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): The Color Profile to be used for output values. - `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)): The Render Intent used during the conversion. - `num_input_sets` (`uint32_t`): The number of sets of input values to be converted. - `input_values` (`const std::vector< uint8_t > &`): The input values to be converted which are divided into sets, e.g., would represent 2 sets of CMYK colors: [255 140 0 0] and [120 0 60 0] and numberOfInputValueSets should be 2. **Returns:** `std::vector< uint8_t >` A list of converted color values in the destination colorspace. Converts sets of values from a Source ColorSpace to a Destination colorspace using a specified Render Intent. ### convert_values ```cpp std::vector< uint8_t > datalogics_interface::ColorValueConverter::convert_values(ColorProfile source_profile, const std::string &destination_profile_path, RenderIntent intent, uint32_t num_input_sets, const std::vector< uint8_t > &input_values) const ``` **Parameters** - `source_profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): The Color Profile to be used for input values. - `destination_profile_path` (`const std::string &`): The Color Profile to be used for output values. - `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)): The Render Intent used during the conversion. - `num_input_sets` (`uint32_t`): The number of sets of input values to be converted. - `input_values` (`const std::vector< uint8_t > &`): The input values to be converted which are divided into sets, e.g., would represent 2 sets of CMYK colors: [255 140 0 0] and [120 0 60 0] and numberOfInputValueSets should be 2. **Returns:** `std::vector< uint8_t >` A list of converted color values in the destination colorspace. Converts sets of values from a Source ColorSpace to a Destination colorspace using a specified Render Intent. ### convert_values ```cpp std::vector< uint8_t > datalogics_interface::ColorValueConverter::convert_values(const std::string &source_profile_path, ColorProfile destination_profile, RenderIntent intent, uint32_t num_input_sets, const std::vector< uint8_t > &input_values) const ``` **Parameters** - `source_profile_path` (`const std::string &`): The Color Profile to be used for input values. - `destination_profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): The Color Profile to be used for output values. - `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)): The Render Intent used during the conversion. - `num_input_sets` (`uint32_t`): The number of sets of input values to be converted. - `input_values` (`const std::vector< uint8_t > &`): The input values to be converted which are divided into sets, e.g., would represent 2 sets of CMYK colors: [255 140 0 0] and [120 0 60 0] and numberOfInputValueSets should be 2. **Returns:** `std::vector< uint8_t >` A list of converted color values in the destination colorspace. Converts sets of values from a Source ColorSpace to a Destination colorspace using a specified Render Intent. ### convert_values ```cpp std::vector< uint8_t > datalogics_interface::ColorValueConverter::convert_values(const std::string &source_profile_path, const std::string &destination_profile_path, RenderIntent intent, uint32_t num_input_sets, const std::vector< uint8_t > &input_values) const ``` **Parameters** - `source_profile_path` (`const std::string &`): The Color Profile to be used for input values. - `destination_profile_path` (`const std::string &`): The Color Profile to be used for output values. - `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)): The Render Intent used during the conversion. - `num_input_sets` (`uint32_t`): The number of sets of input values to be converted. - `input_values` (`const std::vector< uint8_t > &`): The input values to be converted which are divided into sets, e.g., would represent 2 sets of CMYK colors: [255 140 0 0] and [120 0 60 0] and numberOfInputValueSets should be 2. **Returns:** `std::vector< uint8_t >` A list of converted color values in the destination colorspace. Converts sets of values from a Source ColorSpace to a Destination colorspace using a specified Render Intent. --- # CompressionCode Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CompressionCode **Namespace:** `datalogics_interface` ## Description Compression values for generating graphics files from PDF pages. A compression value must be provided for JPG or GIF images. ## Values - `Default = 0`: Use the default compression for the output image type. - `None = 1`: No image compression. Valid for BMP, PNG, and TIFF outputs only. - `Flate = 2`: Deflate algorithm (PNG only). Lossless, widely used in zip files and PDF. - `LZW = 3`: Lempel-Ziv-Welch. Valid for GIF and TIFF; lossless, larger files retain quality. - `G3 = 4`: CCITT Group 3 compression. TIFF only, requires gray color model. Lossless, efficient on B&W with whitespace. - `G4 = 5`: CCITT Group 4 compression. TIFF only, requires gray color model. Lossless, based on G3. - `DCT = 6`: Discrete Cosine Transform. Lossy, JPEG only. Best for continuous-tone images such as photographs. --- # Container Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container ```cpp class Container : Element ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) ## Description A container class represents a group of elements on a page in a PDF file. In the PDF file, every container has a set of Marked Content tags, starting with Begin Marked Content (BMC or BDC) and ending with End Marked Content (EMC), so each container has a BMC/EMC or BDC/EMC pair of tags. These tags can be used to define the beginning and end of metadata around objects, providing information about the text and shapes within a PDF file. Containers can be nested within other containers. **Referenced by:** [`Container`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md) **Uses types:** [`Clip`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md), [`Container`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md), [`Content`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md), [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md), [`ElementCloneFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags.md), [`ElementType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType.md), [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md), [`OptionalContentMembershipDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentMembershipDict.md), [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### Container ```cpp datalogics_interface::Container::Container() ``` *constructor* Create a new Container. The new Container has no tag and is not associated with a dictionary. ### Container ```cpp datalogics_interface::Container::Container(const std::string &mc_tag) ``` *constructor* **Parameters** - `mc_tag` (`const std::string &`) Create a new Container. The new Container has no tag and is not associated with a dictionary. ### Container ```cpp datalogics_interface::Container::Container(const std::string &mc_tag, const PDFDict &property_list, bool is_inline) ``` *constructor* **Parameters** - `mc_tag` (`const std::string &`) - `property_list` ([`const PDFDict &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md)) - `is_inline` (`bool`) Create a new Container. The new Container has no tag and is not associated with a dictionary. ### Container ```cpp datalogics_interface::Container::Container(Container &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Container &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md)) ### ~Container ```cpp datalogics_interface::Container::~Container() override ``` *destructor* ## Methods ### clear_content ```cpp void datalogics_interface::Container::clear_content() ``` **Returns:** `void` Removes the content from this container. ### clear_optional_content_membership_dict ```cpp void datalogics_interface::Container::clear_optional_content_membership_dict() ``` **Returns:** `void` Removes the optional content membership dictionary from this container. ### clone ```cpp std::unique_ptr< Container > datalogics_interface::Container::clone() const ``` **Returns:** [`std::unique_ptr< Container >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md) The copied container. Makes a copy of the container. Make a copy of an container to obtain a new container that has a distinct set of attributes. ### clone ```cpp std::unique_ptr< Element > datalogics_interface::Element::clone(ElementCloneFlags flags) const ``` **Parameters** - `flags` ([`ElementCloneFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags.md)) **Returns:** [`std::unique_ptr< Element >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) The copied element. Makes a copy of the element. Make a copy of an element to obtain a new element that has a distinct set of attributes. Note: TextRun objects may not be cloned. ### get_bounding_box ```cpp Rect datalogics_interface::Element::get_bounding_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The bounding box for this element. The coordinates of the bounding box are specified in user space coordinates, relative to the element's Content. Note that user space coordinates correspond to unrotated pages; any rotation specified in the page dictionary is not taken into account. The bounding box for this element. The bounding box is a rectangle that is guaranteed to encompass the element, but it is not guaranteed to be the smallest box that could contain the element. For example, if the element is a Path that contains an arc, the bounding box encompasses the bezier control points, and not just the curve itself. ### get_clip ```cpp std::unique_ptr< Clip > datalogics_interface::Element::get_clip() ``` **Returns:** [`std::unique_ptr< Clip >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md) The current Clip for this Element, or NULL if no clip is set. Gets the current Clip for an Element. ### get_content ```cpp std::unique_ptr< Content > datalogics_interface::Container::get_content() const ``` **Returns:** [`std::unique_ptr< Content >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md) Obtain the content of a container. ### get_element_type ```cpp ElementType datalogics_interface::Element::get_element_type() const ``` **Returns:** [`ElementType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType.md) Returns the runtime type of this element. ### get_marked_content_tag ```cpp std::string datalogics_interface::Container::get_marked_content_tag() const ``` **Returns:** `std::string` The container's Marked Content Tag. ### get_matrix ```cpp Matrix datalogics_interface::Element::get_matrix() const ``` **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) The current transformation matrix applied to this element. The transformation matrix for the element. ### get_optional_content_membership_dict ```cpp std::unique_ptr< OptionalContentMembershipDict > datalogics_interface::Container::get_optional_content_membership_dict() const ``` **Returns:** [`std::unique_ptr< OptionalContentMembershipDict >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentMembershipDict.md) the OptionalContentMembershipDict The OptionalContentMembershipDict property for this Container. Setting this property will attach the Container to an OptionalContentMembershipDict; it will then be associated with the OptionalContentGroups and be subject to the VisibilityPolicy and VisibilityExpression of that MembershipDict. By setting this property to null, the Container is detached from any OptionalContentMembershipDict. ### get_pdf_dict ```cpp PDFDict datalogics_interface::Container::get_pdf_dict() const ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) Retrieve the PDFObject representation of this object. ### operator= ```cpp Container & datalogics_interface::Container::operator=(Container &&) noexcept ``` **Parameters** - (unnamed) ([`Container &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md)) **Returns:** [`Container &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md) ### rotate ```cpp void datalogics_interface::Element::rotate(double theta) ``` **Parameters** - `theta` (`double`): The rotation angle in degrees. **Returns:** `void` Rotate an element by theta degrees counterclockwise using the matrix [ cos T sin T -sin T cos T 0 0 ]. ### scale ```cpp void datalogics_interface::Element::scale(double sx, double sy) ``` **Parameters** - `sx` (`double`): The horizontal scale factor. - `sy` (`double`): The vertical scale factor. **Returns:** `void` Scale an element by (sx,sy) units using the matrix [ sx 0 0 sy 0 0 ]. ### set_clip ```cpp void datalogics_interface::Element::set_clip(Clip &clip) ``` **Parameters** - `clip` ([`Clip &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md)): The clip to set as the current clip for this element, or NULL to remove clipping. **Returns:** `void` Sets the current Clip for an Element. ### set_content ```cpp void datalogics_interface::Container::set_content(const Content &content) ``` **Parameters** - `content` ([`const Content &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md)): The new Content of the container. **Returns:** `void` Set the content of a container. ### set_marked_content_tag ```cpp void datalogics_interface::Container::set_marked_content_tag(const std::string &tag) ``` **Parameters** - `tag` (`const std::string &`): the container's Marked Content Tag **Returns:** `void` The container's Marked Content Tag. ### set_matrix ```cpp void datalogics_interface::Element::set_matrix(const Matrix &matrix) ``` **Parameters** - `matrix` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)): The transformation matrix for the element. **Returns:** `void` Set the transformation matrix for the element. ### set_optional_content_membership_dict ```cpp void datalogics_interface::Container::set_optional_content_membership_dict(const OptionalContentMembershipDict &ocmd) ``` **Parameters** - `ocmd` ([`const OptionalContentMembershipDict &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentMembershipDict.md)): the OptionalContentMembershipDict **Returns:** `void` The OptionalContentMembershipDict property for this Container. Setting this property will attach the Container to an OptionalContentMembershipDict; it will then be associated with the OptionalContentGroups and be subject to the VisibilityPolicy and VisibilityExpression of that MembershipDict. By setting this property to null, the Container is detached from any OptionalContentMembershipDict. ### translate ```cpp void datalogics_interface::Element::translate(double tx, double ty) ``` **Parameters** - `tx` (`double`): The horizontal translation distance in user space units. - `ty` (`double`): The vertical translation distance in user space units. **Returns:** `void` Translate an element by (tx,ty) units using the matrix [ 1 0 0 1 tx ty ]. ### try_as ```cpp T * datalogics_interface::Element::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this element to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Element::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # Content Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content ```cpp class Content ``` **Namespace:** `datalogics_interface` ## Description Class that represents the collection of elements on a PDF page. A content object represents a collection of elements that make up a page in a PDF file. A content object is more convenient to use than directly parsing or working with a page content stream. This is because a page can include a large collection of individual stream objects. Working with a content object, you can avoid focusing on this level of detail. The content converts individual stream items to a structured form, making it unnecessary to parse the individual syntax for each one. A content object can be associated with a large amount of unmanaged memory in APDFL and should be deleted when the object is no longer in use. The index associated with Content is 0-based, so 0 is the first element. **Referenced by:** [`Container`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`Group`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Group.md), [`Page`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md) **Uses types:** [`AddPageFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AddPageFlags.md), [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md), [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md), [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### Content ```cpp datalogics_interface::Content::Content() ``` *constructor* Create content. ### Content ```cpp datalogics_interface::Content::Content(Content &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Content &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md)) ### Content ```cpp datalogics_interface::Content::Content(Element &first_elem) ``` *constructor* **Parameters** - `first_elem` ([`Element &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md)) Create content. ### ~Content ```cpp datalogics_interface::Content::~Content() ``` *destructor* ## Fields ### before_first ```cpp static int datalogics_interface::Content::before_first ``` *static* ## Methods ### add_element ```cpp void datalogics_interface::Content::add_element(const Element &elem) ``` **Parameters** - `elem` ([`const Element &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md)): - The Element which is to be added to the end of the existing Content object. **Returns:** `void` Adds an existing Element at the end of the content object. ### add_element ```cpp void datalogics_interface::Content::add_element(const Element &elem, int add_after_index) ``` **Parameters** - `elem` ([`const Element &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md)): - The Element which is to be added to the end of the existing Content object. - `add_after_index` (`int`) **Returns:** `void` Adds an existing Element at the end of the content object. ### add_page ```cpp void datalogics_interface::Content::add_page(int insert_after_index, Document &container_doc, Page &src_page, std::optional< Matrix > dst_matrix, std::optional< std::vector< std::string > > annot_types, AddPageFlags flags, std::optional< Rect > bbox) ``` **Parameters** - `insert_after_index` (`int`): The index indicates the location after which the specified element is to be added. The index should be BeforeFirst to add to the beginning of the display list. - `container_doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The Document in which the page is contained. - `src_page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page that will be inserted at insertAfterIndex in theContent. - `dst_matrix` ([`std::optional< Matrix >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)): (May be NULL) The matrix applied to the default matrix of the Page that is inserted into the Document. - `annot_types` (`std::optional< std::vector< std::string > >`): If the page contains annotations, the annotTypes list is used to determine which annotation types are pumped into the page contents of the CosDoc. - `flags` ([`AddPageFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AddPageFlags.md)): (May be 0) AllAnnotations specifies all annotation types. If this is not set, then the annotTypes list will be consulted. - `bbox` ([`std::optional< Rect >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): (May be NULL) specifies the destination BBox for the page being inserted. If it is NULL, the new page's media box is used. **Returns:** `void` Adds the specfied Page to the Content as a Form. It adds a reference to the Xobject form at the indicated index in the Content; the index may be less than 0, which indicates the object is to be appended to the content. ### flatten_optional_content ```cpp bool datalogics_interface::Content::flatten_optional_content(OptionalContentContext &occ) ``` **Parameters** - `occ` ([`OptionalContentContext &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentContext.md)): The optional content context in which content is checked for visibility. **Returns:** `bool` true if the content was successfully flattened, false otherwise. Flattens optional content within this Content object. Removes elements that are not visible in the given optional content context and removes optional content information from any visible elements. The optional content information formerly associated with this Content object will NOT be deleted from the document, as it is possible that content elsewhere in the document may be using the information. ### get_bounding_box ```cpp Rect datalogics_interface::Content::get_bounding_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) A Rect representing the bounding box of all elements in this Content. The bounding box for this content. The bounding box is a rectangle that is at least large enough to contain the bounding boxes for all the elements in the Content. ### get_default_color_space ```cpp std::unique_ptr< ColorSpace > datalogics_interface::Content::get_default_color_space(const std::string &name) const ``` **Parameters** - `name` (`const std::string &`): The name of the color space to get. It must be one of DefaultRGB, DefaultCMYK, or DefaultGray. **Returns:** [`std::unique_ptr< ColorSpace >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) The color space used as the default. May return null if no default is set. Get a default color space from a Content object. See Section 4.5.4 in the PDF Reference for more information about default color spaces. ### get_element ```cpp std::unique_ptr< Element > datalogics_interface::Content::get_element(int index) const ``` **Parameters** - `index` (`int`): The zero-based index of the element to retrieve. **Returns:** [`std::unique_ptr< Element >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) The Element at the specified index. Get the element specified by index. ### get_num_elements ```cpp int datalogics_interface::Content::get_num_elements() const ``` **Returns:** `int` The number of elements contained in this Content. The number of elements in the Content object. ### operator= ```cpp Content & datalogics_interface::Content::operator=(Content &&) noexcept ``` **Parameters** - (unnamed) ([`Content &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md)) **Returns:** [`Content &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md) ### remove_element ```cpp void datalogics_interface::Content::remove_element(int index) ``` **Parameters** - `index` (`int`): - The position at which to remove the Element **Returns:** `void` Removes the Element at the specified index. ### set_default_color_space ```cpp void datalogics_interface::Content::set_default_color_space(const std::string &name, const ColorSpace &color_space) ``` **Parameters** - `name` (`const std::string &`): The name of the color space to set. It must be one of DefaultRGB, DefaultCMYK, or DefaultGray. - `color_space` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): The color space to set. It may not be a Lab, Indexed or Pattern color space. **Returns:** `void` Set a default color space from a Content object. See Section 4.5.4 in the PDF Reference for more information about default color spaces. ### to_string ```cpp std::string datalogics_interface::Content::to_string() const ``` **Returns:** `std::string` A string describing this Content object. Returns a string representation of this Content object. The string includes the number of elements in the Content. --- # ConvertResult Struct Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/ConvertResult ```cpp struct ConvertResult ``` **Namespace:** `datalogics_interface` ## Description Result of a PDF/A or PDF/X conversion operation. **Referenced by:** [`Document`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md) **Uses types:** [`Document`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md), [`SaveFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SaveFlags.md) ## Fields ### document ```cpp Document datalogics_interface::ConvertResult::document ``` ### save_flags ```cpp SaveFlags datalogics_interface::ConvertResult::save_flags ``` --- # CredentialDataFormat Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CredentialDataFormat **Namespace:** `datalogics_interface` ## Description Enumeration to specify credential encoding format as either Non-PFX (PEM/DER) or PFX (PKCS#12). ## Values - `NonPFX = 0`: Base64/Binary DER format. - `PFX = 1`: PKCS#12 format. --- # CredentialStorageFormat Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CredentialStorageFormat **Namespace:** `datalogics_interface` ## Description Enumeration to specify credential is required to be retrieved from disk (OnDisk) or is cached in memory (InMemory). ## Values - `OnDisk = 0`: Credential resides on disk. - `InMemory = 1`: Credential cached in memory. --- # CurveTo Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CurveTo ```cpp class CurveTo : Segment ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Segment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Segment.md) ## Description The curveto operator is used to draw a Bezier curve. The curved segment is appended to a path. The curveto operator calculates the curve between two endpoints, the current (beginning) point and the final (end) point, and in relation to two matching control points. The control points define the nature of the curve between the two endpoints. These values are represented by a series of x and y coordinates. **Uses types:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) ## Constructors ### CurveTo ```cpp datalogics_interface::CurveTo::CurveTo(const Point &p1, const Point &p2, const Point &p3) ``` *constructor* **Parameters** - `p1` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): the first control point. - `p2` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): the second control point. - `p3` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): the new current point. Append a cubic Bézier curve to the current path. The curve extends from the current point to point3, using point1 and point2 as the Bézier control points. The new current point is point3. ### CurveTo ```cpp datalogics_interface::CurveTo::CurveTo(double x1, double y1, double x2, double y2, double x3, double y3) ``` *constructor* **Parameters** - `x1` (`double`): the first control point. - `y1` (`double`): the second control point. - `x2` (`double`): the new current point. - `y2` (`double`) - `x3` (`double`) - `y3` (`double`) Append a cubic Bézier curve to the current path. The curve extends from the current point to point3, using point1 and point2 as the Bézier control points. The new current point is point3. ### ~CurveTo ```cpp datalogics_interface::CurveTo::~CurveTo() override ``` *destructor* ## Methods ### point1 ```cpp Point datalogics_interface::CurveTo::point1() const ``` **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) The first off-curve control point. ### point2 ```cpp Point datalogics_interface::CurveTo::point2() const ``` **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) The second off-curve control point. ### point3 ```cpp Point datalogics_interface::CurveTo::point3() const ``` **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) The end point of the curve. ### to_string ```cpp std::string datalogics_interface::CurveTo::to_string() const override ``` **Returns:** `std::string` Represents a segment, or a single line, within a path. --- # CurveToV Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CurveToV ```cpp class CurveToV : Segment ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Segment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Segment.md) ## Description A curveto operator where the first control point matches the beginning. The current point is the beginning point in the curve. The name CurveToV is drawn from the "V" path construction operator. **Uses types:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) ## Constructors ### CurveToV ```cpp datalogics_interface::CurveToV::CurveToV(const Point &p2, const Point &p3) ``` *constructor* **Parameters** - `p2` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): the second control point. - `p3` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): the new current point. Append a cubic Bézier curve to the current path. The curve extends from the current point to point3, using the current point and point2 as the Bézier control points. The new current point is point3. ### CurveToV ```cpp datalogics_interface::CurveToV::CurveToV(double x2, double y2, double x3, double y3) ``` *constructor* **Parameters** - `x2` (`double`): the second control point. - `y2` (`double`): the new current point. - `x3` (`double`): the append a cubic Bézier curve to the current path. The curve extends from the current point to point3, using the c... - `y3` (`double`): the append a cubic Bézier curve to the current path. The curve extends from the current point to point3, using the c... Append a cubic Bézier curve to the current path. The curve extends from the current point to point3, using the current point and point2 as the Bézier control points. The new current point is point3. ### ~CurveToV ```cpp datalogics_interface::CurveToV::~CurveToV() override ``` *destructor* ## Methods ### point2 ```cpp Point datalogics_interface::CurveToV::point2() const ``` **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) The single off-curve control point (current point is reused as the first control point). ### point3 ```cpp Point datalogics_interface::CurveToV::point3() const ``` **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) The end point of the curve. ### to_string ```cpp std::string datalogics_interface::CurveToV::to_string() const override ``` **Returns:** `std::string` Represents a segment, or a single line, within a path. --- # CurveToY Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CurveToY ```cpp class CurveToY : Segment ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Segment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Segment.md) ## Description A curveto operator where the second control point matches the end point. Here the new current point is the end point in the curve. The name CurveToY is drawn from the "Y" path construction operator. **Uses types:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) ## Constructors ### CurveToY ```cpp datalogics_interface::CurveToY::CurveToY(const Point &p1, const Point &p3) ``` *constructor* **Parameters** - `p1` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): the first control point. - `p3` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): the new current point. Append a cubic Bézier curve to the current path. The curve extends from the current point to point3, using point1 and point3 as the Bézier control points. The new current point is point3. ### CurveToY ```cpp datalogics_interface::CurveToY::CurveToY(double x1, double y1, double x3, double y3) ``` *constructor* **Parameters** - `x1` (`double`): the first control point. - `y1` (`double`): the new current point. - `x3` (`double`) - `y3` (`double`) Append a cubic Bézier curve to the current path. The curve extends from the current point to point3, using point1 and point3 as the Bézier control points. The new current point is point3. ### ~CurveToY ```cpp datalogics_interface::CurveToY::~CurveToY() override ``` *destructor* ## Methods ### point1 ```cpp Point datalogics_interface::CurveToY::point1() const ``` **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) The single off-curve control point (the end point is reused as the second control point). ### point3 ```cpp Point datalogics_interface::CurveToY::point3() const ``` **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) The end point of the curve. ### to_string ```cpp std::string datalogics_interface::CurveToY::to_string() const override ``` **Returns:** `std::string` Represents a segment, or a single line, within a path. --- # DeviceNColorSpace Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DeviceNColorSpace ```cpp class DeviceNColorSpace : ColorSpace ``` **Namespace:** `datalogics_interface` **Inherits from:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) ## Description Represents a color space with an arbitrary number of color components. DeviceN color spaces were designed to represent color spaces containing multiple color components that correspond to the colorants of some target device. They provide greater flexibility than is possible with standard device color spaces such as DeviceCMYK or with individual Separation color spaces. For example, it is possible to create a DeviceN color space consisting of only the cyan, magenta, and yellow color components, with the black component excluded. **Uses types:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md), [`Function`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md), [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Constructors ### DeviceNColorSpace ```cpp datalogics_interface::DeviceNColorSpace::DeviceNColorSpace(const std::vector< std::string > &names, const ColorSpace &alternate, const Function &tint_transform) ``` *constructor* **Parameters** - `names` (`const std::vector< std::string > &`): the names of the colorants that the DeviceN space is intended to represent, among which may be All, or None - `alternate` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): the alternate color space, which can be any device or CIE-based color space but not another special color space (Pattern, Indexed, Separation, or DeviceN). - `tint_transform` ([`const Function &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md)): function, called with the tint value and returning the corresponding color component values. That is, the number of components and the interpretation of their values depend on the alternate color space. Create a DeviceN color space. ## Methods ### get_alternate ```cpp std::unique_ptr< ColorSpace > datalogics_interface::DeviceNColorSpace::get_alternate() const ``` **Returns:** [`std::unique_ptr< ColorSpace >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) the alternate color space, which can be any device or CIE-based color space but not another special color space (Pattern, Indexed, Separation, or DeviceN). ### get_attributes ```cpp std::unique_ptr< PDFDict > datalogics_interface::DeviceNColorSpace::get_attributes() const ``` **Returns:** [`std::unique_ptr< PDFDict >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The dictionary of extended attributes associated with the color space. ### get_function ```cpp std::unique_ptr< Function > datalogics_interface::DeviceNColorSpace::get_function() const ``` **Returns:** [`std::unique_ptr< Function >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md) A function, called with the tint value and returning the corresponding color component values. That is, the number of components and the interpretation of their values depend on the alternate color space. ### get_name ```cpp std::string datalogics_interface::ColorSpace::get_name() const ``` **Returns:** `std::string` The name of the color space. A named color space may be named something like DeviceRGB. More complicated color spaces may have a name like Indexed or ICCBased. ### get_names ```cpp std::vector< std::string > datalogics_interface::DeviceNColorSpace::get_names() const ``` **Returns:** `std::vector< std::string >` the names of the colorant that the DeviceN space is intended to represent, some of which may be All or None ### get_num_components ```cpp int datalogics_interface::ColorSpace::get_num_components() const ``` **Returns:** `int` The number of color components. The number of components in the color space. For example, DeviceGray has 1 component, DeviceRGB has 3, and DeviceCMYK has 4. ### get_pdf_object ```cpp std::unique_ptr< PDFObject > datalogics_interface::ColorSpace::get_pdf_object() const ``` **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The PDFObject associated with the color space. Get the PDFObject associated with the color space. This may be a PDFName, PDFDict, PDFStream, or PDFArray. ### operator== ```cpp virtual bool datalogics_interface::ColorSpace::operator==(const ColorSpace &other) const ``` **Parameters** - `other` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): The ColorSpace to compare against. **Returns:** `bool` true if the two color spaces are equal, false otherwise. Test for equality. This works best for named color spaces. More complex color spaces (such as ICCBased) do not support equality testing and will always return false. ### to_string ```cpp std::string datalogics_interface::ColorSpace::to_string() const ``` **Returns:** `std::string` A string describing this ColorSpace. Convert a ColorSpace to a string representation. --- # DigestCategory Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DigestCategory **Namespace:** `datalogics_interface` ## Description Enumeration to specify cryptographic hash functions that generate variable- length message digests required for digital signature creation. ## Values - `SHA1 = 0`: SHA-1 (160-bit). - `SHA224 = 1`: SHA-224. - `SHA256 = 2`: SHA-256. - `SHA384 = 3`: SHA-384. - `SHA512 = 4`: SHA-512. --- # DisplayTraits Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DisplayTraits **Namespace:** `datalogics_interface` ## Description Enumeration to specify fields to display as part of signature appearance. ## Values - `None = 0x0`: No display. - `All = 0x1`: Display all labels and logo. - `Name = 0x2`: Display name. - `Reason = 0x4`: Display reason. - `Location = 0x8`: Display location. - `Date = 0x10`: Display date. - `ContactInfo = 0x20`: Display contact info. - `DN = 0x40`: Display distinguished name. - `Logo = 0x80`: Display logo image. --- # DocTextFinder Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DocTextFinder ```cpp class DocTextFinder ``` **Namespace:** `datalogics_interface` ## Description A class used to extract words from a document using a regular expression. **Uses types:** [`DocTextFinderMatch`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DocTextFinderMatch.md) ## Constructors ### DocTextFinder ```cpp datalogics_interface::DocTextFinder::DocTextFinder(DocTextFinder &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`DocTextFinder &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DocTextFinder.md)) ### DocTextFinder ```cpp datalogics_interface::DocTextFinder::DocTextFinder(Document &doc) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The document to search. Create a DocTextFinder for the given document. ### DocTextFinder ```cpp datalogics_interface::DocTextFinder::DocTextFinder(Document &doc, WordFinderConfig &config) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The document to search. - `config` ([`WordFinderConfig &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WordFinderConfig.md)): Word finder configuration controlling text extraction behavior. Create a DocTextFinder with a word-finder configuration. ### ~DocTextFinder ```cpp datalogics_interface::DocTextFinder::~DocTextFinder() ``` *destructor* ## Methods ### get_match_list ```cpp std::vector< DocTextFinderMatch > datalogics_interface::DocTextFinder::get_match_list(int begin_page, int end_page, const std::string ®ex) ``` **Parameters** - `begin_page` (`int`): the beginning page number included in the search. - `end_page` (`int`): the ending page number included in the search. - `regex` (`const std::string &`): the regular expression to use for the search. **Returns:** [`std::vector< DocTextFinderMatch >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DocTextFinderMatch.md) a structure containing matching phrases along with its quads. Finds all matching strings for a given regular expression for the specified page range. It returns a vector containing words along with the page and matching phrase that was found. ### operator= ```cpp DocTextFinder & datalogics_interface::DocTextFinder::operator=(DocTextFinder &&) noexcept ``` **Parameters** - (unnamed) ([`DocTextFinder &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DocTextFinder.md)) **Returns:** [`DocTextFinder &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DocTextFinder.md) --- # DocTextFinderMatch Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DocTextFinderMatch ```cpp class DocTextFinderMatch ``` **Namespace:** `datalogics_interface` ## Description A phrase in the document that matched the supplied regular expression along with its associated quad bounding box(es). A phrase matching a regular expression, with location information. **Referenced by:** [`DocTextFinder`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DocTextFinder.md) **Uses types:** [`DocTextFinderQuadInfo`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DocTextFinderQuadInfo.md) ## Constructors ### DocTextFinderMatch ```cpp datalogics_interface::DocTextFinderMatch::DocTextFinderMatch()=default ``` *constructor* Default constructor. Produces an empty match with no quad-info. ### DocTextFinderMatch ```cpp datalogics_interface::DocTextFinderMatch::DocTextFinderMatch(std::string match_string, std::vector< DocTextFinderQuadInfo > quad_info) ``` *constructor* **Parameters** - `match_string` (`std::string`): The text that matched the regular expression. - `quad_info` ([`std::vector< DocTextFinderQuadInfo >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DocTextFinderQuadInfo.md)): Bounding-box quads (with page numbers) that cover the matched text; one entry per page the match spans. Construct a match from the matched text and its bounding boxes. ## Methods ### get_match_string ```cpp const std::string & datalogics_interface::DocTextFinderMatch::get_match_string() const ``` **Returns:** `const std::string &` The matched text string from the document. Gets the text string that matched the regular expression. ### get_quad_info ```cpp const std::vector< DocTextFinderQuadInfo > & datalogics_interface::DocTextFinderMatch::get_quad_info() const ``` **Returns:** [`const std::vector< DocTextFinderQuadInfo > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DocTextFinderQuadInfo.md) A list of DocTextFinderQuadInfo objects describing where the match is located. Gets the quad info and page numbers for the matched text. Each DocTextFinderQuadInfo in the returned list contains the page number and bounding box quads for a portion of the matched text. --- # DocTextFinderQuadInfo Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DocTextFinderQuadInfo ```cpp class DocTextFinderQuadInfo ``` **Namespace:** `datalogics_interface` ## Description A bounding box quad of a character in a PDF file that was part of a string that matched a given regular expression. Bounding box quad information for a character match, including page number. **Referenced by:** [`DocTextFinderMatch`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DocTextFinderMatch.md) **Uses types:** [`Quad`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md) ## Constructors ### DocTextFinderQuadInfo ```cpp datalogics_interface::DocTextFinderQuadInfo::DocTextFinderQuadInfo()=default ``` *constructor* Default constructor. Produces an empty quad-info object on page 0. ### DocTextFinderQuadInfo ```cpp datalogics_interface::DocTextFinderQuadInfo::DocTextFinderQuadInfo(int page_num, std::vector< Quad > quads) ``` *constructor* **Parameters** - `page_num` (`int`): Zero-based page number where the match occurred. - `quads` ([`std::vector< Quad >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md)): Bounding-box quads covering the match on that page. Construct a quad-info from a page number and a list of bounding boxes. ## Methods ### get_page_num ```cpp int datalogics_interface::DocTextFinderQuadInfo::get_page_num() const ``` **Returns:** `int` The zero-based page number where the matching text quad is located. Gets the page number that the quad was found on. ### get_quads ```cpp const std::vector< Quad > & datalogics_interface::DocTextFinderQuadInfo::get_quads() const ``` **Returns:** [`const std::vector< Quad > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md) A list of Quad objects representing the bounding boxes of the matched text. Gets the list of bounding box quads for the matched text on this page. --- # Document Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document ```cpp class Document ``` **Namespace:** `datalogics_interface` ## Description The underlying PDF representation of a document. Use document objects to perform most of the functions related to pages in a PDF file, such as deleting pages, inserting blank pages, copying watermarks, creating bookmarks and thumbnails, and so on. Threading: single-thread use. A `Document` is bound to the `Library` active on the thread where it was constructed. Do not share `Document` instances across threads. See `datalogics_interface.hpp` for the full threading model. **Referenced by:** [`ConvertResult`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/ConvertResult.md), [`WebConvertResult`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/WebConvertResult.md) **Uses types:** [`AcroFormExportType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AcroFormExportType.md), [`AcroFormImportType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AcroFormImportType.md), [`Bookmark`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md), [`Collection`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Collection.md), [`ConvertResult`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/ConvertResult.md), [`EncryptionType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/EncryptionType.md), [`Font`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md), [`NameTree`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NameTree.md), [`OptionalContentGroup`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md), [`PDFAConvertType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFAConvertType.md), [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md), [`PDFXConvertType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFXConvertType.md), [`Page`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md), [`PageInsertFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageInsertFlags.md), [`PageLabel`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageLabel.md), [`PageMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageMode.md), [`PermissionFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PermissionFlags.md), [`PermissionRequestOperation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PermissionRequestOperation.md), [`SaveFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SaveFlags.md), [`StructTreeRoot`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructTreeRoot.md), [`WebConvertResult`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/WebConvertResult.md), [`XFAFormExportType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/XFAFormExportType.md) ## Constructors ### Document ```cpp datalogics_interface::Document::Document() ``` *constructor* Creates a new document. The only Cos object in the document will be a Catalog. After the document is created, at least one page must be added using CreatePage or InsertPages before the PDF Viewer can display or save the document. ### Document ```cpp datalogics_interface::Document::Document(const std::string &file_name) ``` *constructor* **Parameters** - `file_name` (`const std::string &`) Creates a new document. The only Cos object in the document will be a Catalog. After the document is created, at least one page must be added using CreatePage or InsertPages before the PDF Viewer can display or save the document. ### Document ```cpp datalogics_interface::Document::Document(const std::string &file_name, const std::string &password, bool do_repair=false) ``` *constructor* **Parameters** - `file_name` (`const std::string &`) - `password` (`const std::string &`) - `do_repair` (`bool`) Creates a new document. The only Cos object in the document will be a Catalog. After the document is created, at least one page must be added using CreatePage or InsertPages before the PDF Viewer can display or save the document. ### Document ```cpp datalogics_interface::Document::Document(const std::string &xps_file, XPSConvertParams ¶ms) ``` *constructor* **Parameters** - `xps_file` (`const std::string &`) - `params` ([`XPSConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/XPSConvertParams.md)) Creates a new document. The only Cos object in the document will be a Catalog. After the document is created, at least one page must be added using CreatePage or InsertPages before the PDF Viewer can display or save the document. ### Document ```cpp datalogics_interface::Document::Document(Document &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Document &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)) ### Document ```cpp datalogics_interface::Document::Document(std::istream &input_stream) ``` *constructor* **Parameters** - `input_stream` (`std::istream &`) Open a document from an input stream. The stream must remain valid for the lifetime of the Document. ### Document ```cpp datalogics_interface::Document::Document(std::istream &input_stream, const std::string &password, bool do_repair=false) ``` *constructor* **Parameters** - `input_stream` (`std::istream &`) - `password` (`const std::string &`) - `do_repair` (`bool`) Open a password-protected document from an input stream. ### ~Document ```cpp datalogics_interface::Document::~Document() ``` *destructor* Closes that document and releases its resources. Changes are not saved. You must use Save() to save any modifications before destroying this object. ## Fields ### all_pages ```cpp static int datalogics_interface::Document::all_pages ``` *static* All pages sentinel. ### before_first_page ```cpp static int datalogics_interface::Document::before_first_page ``` *static* Before first page sentinel. ### last_page ```cpp static int datalogics_interface::Document::last_page ``` *static* Last page sentinel. ## Methods ### apply_redactions ```cpp bool datalogics_interface::Document::apply_redactions() ``` **Returns:** `bool` Apply redactions to the document. ### apply_redactions ```cpp bool datalogics_interface::Document::apply_redactions(Redaction &redaction) ``` **Parameters** - `redaction` ([`Redaction &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Redaction.md)): the redaction to apply, or NULL to apply all redactions in the document. **Returns:** `bool` Apply redactions to the document. ### clone_as_pdfa_document ```cpp ConvertResult datalogics_interface::Document::clone_as_pdfa_document(PDFAConvertType type, const PDFAConvertParams ¶ms) ``` **Parameters** - `type` ([`PDFAConvertType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFAConvertType.md)): The type of PDF/A conversion to perform - `params` ([`const PDFAConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams.md)): A PDFAConvertParams object specifying options for the conversion **Returns:** [`ConvertResult`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/ConvertResult.md) A PDFAConvertResult object containing the Document and SaveFlags. Create a PDF/A compliant version of this Document. The returned Document will be compliant with the PDF/A standard. You can save it using any of the standard Save() methods. The PDFAConvertResult object contains both the Document and the SaveFlags you should use when saving the Document. You MUST use these exact flags to save the returned Document or it will no longer be PDF/A compliant. The returned Document will have its MajorVersion and MinorVersion set to "1" and "4" respectively. This is required for PDF/A compliance. If this Document could not be converted to PDF/A, the PDFADocument field in the PDFAConvertResult object will be null. ### clone_as_pdfx_document ```cpp ConvertResult datalogics_interface::Document::clone_as_pdfx_document(PDFXConvertType type, const PDFXConvertParams ¶ms) ``` **Parameters** - `type` ([`PDFXConvertType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFXConvertType.md)): The type of PDF/X conversion to perform - `params` ([`const PDFXConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFXConvertParams.md)): A PDFXConvertParams object specifying options for the conversion **Returns:** [`ConvertResult`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/ConvertResult.md) A PDFXConvertResult object containing the Document and SaveFlags. Create a PDF/X compliant version of this Document. The returned Document will be compliant with the PDF/X standard. You can save it using any of the standard Save() methods. The PDFXConvertResult object contains both the Document and the SaveFlags you should use when saving the Document. You MUST use these exact flags to save the returned Document or it will no longer be PDF/X compliant. The returned Document will have its MajorVersion and MinorVersion set to "1" and "4" respectively. This is required for PDF/X compliance. If this Document could not be converted to PDF/X, the PDFXDocument field in the PDFXConvertResult object will be null. ### close ```cpp void datalogics_interface::Document::close() ``` **Returns:** `void` Closes a document and releases its resources. Changes are not saved. You must use Save to save any modifications before calling Close. ### color_convert_pages ```cpp bool datalogics_interface::Document::color_convert_pages(const ColorConvertParams ¶ms) ``` **Parameters** - `params` ([`const ColorConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorConvertParams.md)): the color conversion parameters specifying the ICC profile to apply. **Returns:** `bool` True if color conversion occurred. False if nothing was color converted. Convert the colors (in place) in a Document as specified by by the params block by applying an ICC profile to the objects contained in the Document. ### convert_to_excel ```cpp static bool datalogics_interface::Document::convert_to_excel(const std::string &input_path, const std::string &output_path) ``` *static* **Parameters** - `input_path` (`const std::string &`): The PDF file path to convert. - `output_path` (`const std::string &`): The output Office file path. **Returns:** `bool` true if the conversion was successful, false if an error occurred. This function converts a PDF file to a Microsoft Excel Office file (.xlsx). NOTE: This method is only available on Windows 32/64-bit and Linux 64-bit. **Note:** Only available on Windows. Throws std::runtime_error on other platforms. ### convert_to_powerpoint ```cpp static bool datalogics_interface::Document::convert_to_powerpoint(const std::string &input_path, const std::string &output_path) ``` *static* **Parameters** - `input_path` (`const std::string &`): The PDF file path to convert. - `output_path` (`const std::string &`): The output Office file path. **Returns:** `bool` true if the conversion was successful, false if an error occurred. This function converts a PDF file to a Microsoft PowerPoint Office file (.pptx). NOTE: This method is only available on Windows 32/64-bit and Linux 64-bit. **Note:** Only available on Windows. Throws std::runtime_error on other platforms. ### convert_to_word ```cpp static bool datalogics_interface::Document::convert_to_word(const std::string &input_path, const std::string &output_path) ``` *static* **Parameters** - `input_path` (`const std::string &`): The PDF file path to convert. - `output_path` (`const std::string &`): The output Office file path. **Returns:** `bool` true if the conversion was successful, false if an error occurred. This function converts a PDF file to a Microsoft Word Office file (.docx). NOTE: This method is only available on Windows 32/64-bit and Linux 64-bit. **Note:** Only available on Windows. Throws std::runtime_error on other platforms. ### convert_xfa_to_acroform ```cpp int datalogics_interface::Document::convert_xfa_to_acroform() ``` **Returns:** `int` the number of output pages created in the converted document Convert a XFA document into a document with only AcroForms. XFA content is not widely supported by PDF processors, converting this content transforms XFA fields into AcroForm fields which are more widely suppored by PDF processors All XFA fields are removed. NOTE: This method is part of the APDFL Forms Extension that is available separately from APDFL. For more information, please see [https://www.datalogics.com/pdf-form-functions](https://www.datalogics.com/pdf-form-functions). ### count_xmp_metadata_array_items ```cpp int datalogics_interface::Document::count_xmp_metadata_array_items(const std::string &ns, const std::string &path) const ``` **Parameters** - `ns` (`const std::string &`): The XML namespace URI for the schema in which the property is to be found. - `path` (`const std::string &`): The name of the simple property . **Returns:** `int` number of array items in the property array. Returns the number of array items in a property array associated with a Document. ### create_collection ```cpp void datalogics_interface::Document::create_collection() ``` **Returns:** `void` CreateCollection allows to create new collection in the PDF document. It replaces any existing collection. ### create_name_tree ```cpp std::unique_ptr< NameTree > datalogics_interface::Document::create_name_tree(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): The name of the NameTree to create. **Returns:** [`std::unique_ptr< NameTree >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NameTree.md) The retrieved or newly created NameTree. Retrieves the name tree inside the Names dictionary with the specified key name, or creates it if it does not exist. ### create_page ```cpp Page datalogics_interface::Document::create_page(int after_page_num, const Rect &media_box) ``` **Parameters** - `after_page_num` (`int`): The page number after which the new page is inserted. The first page is 0. Use Document.BeforeFirstPage to insert the new page at the beginning of a document. - `media_box` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the page's media box, specified in user space coordinates. **Returns:** [`Page`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md) The newly created page. Creates and acquires a new Page. The page is inserted into the document at the specified location. ### create_struct_tree_root ```cpp StructTreeRoot datalogics_interface::Document::create_struct_tree_root() ``` **Returns:** [`StructTreeRoot`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructTreeRoot.md) Creates a StructTreeRoot in the catalog; throws std::logic_error if one already exists. Also sets /MarkInfo {/Marked true} in the catalog. ### delete_pages ```cpp void datalogics_interface::Document::delete_pages(int first_page, int last_page) ``` **Parameters** - `first_page` (`int`): The page number of the first page to delete. The first page is 0. - `last_page` (`int`): The page number of the last page to delete. **Returns:** `void` Deletes the specified pages. ### embed_fonts ```cpp void datalogics_interface::Document::embed_fonts() ``` **Returns:** `void` Embed unembedded fonts in a document. To keep the changes the document must be saved. Fonts on the user's system that match the original font definition will be embedded. For the Times-Roman and Helvetica and corresponding styles, if displayed with a font alias, then the font alias will be embedded in the file. If the font has information that indicates the font cannot be embedded for print and preview, then the font will not be embedded in the document. With no flags, fonts marked as embedded or subsettable will be embedded. By default, the font embedding process scans the entire document for font usage information when subsetting fonts. For documents with large numbers of fonts or pages, this can take a long time. In cases where new Font objects are created and used to set text, it's not necessary to scan the entire document; instead, use the version of this call that takes a list of Font objects and a set of flags for embedding. Passing the list of new Fonts and the DontScanDocument flag will directly embed the fonts in the list without scanning the document. ### embed_ocr_fonts ```cpp void datalogics_interface::Document::embed_ocr_fonts() ``` **Returns:** `void` Embed fonts that were used in creating OCR text. This is also done automatically when saving. ### export_acro_forms_data ```cpp bool datalogics_interface::Document::export_acro_forms_data(const std::string &path, AcroFormExportType type) ``` **Parameters** - `path` (`const std::string &`): The path on disk of the file the AcroForms data is exported to. - `type` ([`AcroFormExportType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AcroFormExportType.md)): The format type the AcroForm data should be exported to. The supported types are XFDF, FDF, and XML. **Returns:** `bool` true indicates exporting succeeded and false indicates an error occurred Export the AcroForms data. AcroForms data is exported into a format that can later be imported into another AcroForms document. NOTE: This method is part of the APDFL Forms Extension that is available separately from APDFL. For more information, please see [https://www.datalogics.com/pdf-form-functions](https://www.datalogics.com/pdf-form-functions). ### export_as_postscript ```cpp void datalogics_interface::Document::export_as_postscript(PrintUserParams ¶ms, const std::string &path) ``` **Parameters** - `params` ([`PrintUserParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PrintUserParams.md)): Parameters to control printing. - `path` (`const std::string &`): The output file to be created. **Returns:** `void` Exports a PDF document or pages from a PDF document as PostScript allowing the caller to specify options such as page size, rotation, and shrink-to-fit. The output is placed in the specified file. ### export_xfa_forms_data ```cpp bool datalogics_interface::Document::export_xfa_forms_data(const std::string &path, XFAFormExportType type) ``` **Parameters** - `path` (`const std::string &`): The path on disk of the file the XFA form data is exported to. - `type` ([`XFAFormExportType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/XFAFormExportType.md)): The format type the XFA data should be exported to. The supported types are XDP, XML, and XFD. **Returns:** `bool` true indicates exporting succeeded and false indicates an error occurred Export the XFA Forms data. XFA forms data is exported into a format that can later be imported into another XFA document. NOTE: This method is part of the APDFL Forms Extension that is available separately from APDFL. For more information, please see [https://www.datalogics.com/pdf-form-functions](https://www.datalogics.com/pdf-form-functions). ### find_bookmark ```cpp std::unique_ptr< Bookmark > datalogics_interface::Document::find_bookmark(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): - The title of the bookmark for which to search. **Returns:** [`std::unique_ptr< Bookmark >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md) The bookmark within the document's bookmark tree that has the supplied title. Returns NULL if there is no bookmark with the supplied title. Find bookmark by its title, searching within the document's bookmark tree to a depth determined by maxDepth (e.g., 0 = root bookmark only and not any of its children, 1 = search one level below root bookmark level, etc. Omit to search entire bookmark tree.) ### find_bookmark ```cpp std::unique_ptr< Bookmark > datalogics_interface::Document::find_bookmark(const std::string &title, int max_depth) ``` **Parameters** - `title` (`const std::string &`): - The title of the bookmark for which to search. - `max_depth` (`int`): - If supplied (with a value greater than or equal to 0), declares the number of levels below this bookmark to search. (If omitted, the entire subtree is searched.) **Returns:** [`std::unique_ptr< Bookmark >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md) The bookmark within the document's bookmark tree that has the supplied title. Returns NULL if there is no bookmark with the supplied title. Find bookmark by its title, searching within the document's bookmark tree to a depth determined by maxDepth (e.g., 0 = root bookmark only and not any of its children, 1 = search one level below root bookmark level, etc. Omit to search entire bookmark tree.) ### find_label_for_page_num ```cpp std::string datalogics_interface::Document::find_label_for_page_num(int page_index) const ``` **Parameters** - `page_index` (`int`): Index of a page in the Document **Returns:** `std::string` The label string for the page Fetch the label string for a page index, using the current page labels. ### find_page_num_for_label ```cpp int datalogics_interface::Document::find_page_num_for_label(const std::string &label) const ``` **Parameters** - `label` (`const std::string &`): The label string to look up **Returns:** `int` The index of the corresponding page, or -1 if the label could not be matched Look up a page index based on a label string. ### find_pdf_object_by_id ```cpp std::unique_ptr< PDFObject > datalogics_interface::Document::find_pdf_object_by_id(int id) const ``` **Parameters** - `id` (`int`): The object ID number to look up. **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The PDFObject with the specified ID, or null if no such object exists. Retrieves an indirect PDFObject by its ID number. Note that direct PDFObjects cannot be retrieved by ID. ### flatten_acro_form_fields ```cpp void datalogics_interface::Document::flatten_acro_form_fields() ``` **Returns:** `void` Flatten a AcroForms document. Interactive AcroForm fields are flattened into static PDF page content. All AcroForm fields are removed. NOTE: This method is part of the APDFL Forms Extension that is available separately from APDFL. For more information, please see [https://www.datalogics.com/pdf-form-functions](https://www.datalogics.com/pdf-form-functions). ### flatten_transparency ```cpp int datalogics_interface::Document::flatten_transparency() ``` **Returns:** `int` The number of pages that were flattened. Flattens all transparencies in the document. To flatten specific pages, see Document.FlattenTransparency(params, firstPage, lastPage) Documents are flattened one at a time. In multi-threaded applications, threads that are making simultaneous calls to this method will block and execute the method sequentially. ### flatten_transparency ```cpp int datalogics_interface::Document::flatten_transparency(const FlattenTransparencyParams ¶ms) ``` **Parameters** - `params` ([`const FlattenTransparencyParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FlattenTransparencyParams.md)) **Returns:** `int` The number of pages that were flattened. Flattens all transparencies in the document. To flatten specific pages, see Document.FlattenTransparency(params, firstPage, lastPage) Documents are flattened one at a time. In multi-threaded applications, threads that are making simultaneous calls to this method will block and execute the method sequentially. ### flatten_transparency ```cpp int datalogics_interface::Document::flatten_transparency(const FlattenTransparencyParams ¶ms, int first_page, int last_page) ``` **Parameters** - `params` ([`const FlattenTransparencyParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FlattenTransparencyParams.md)) - `first_page` (`int`) - `last_page` (`int`) **Returns:** `int` The number of pages that were flattened. Flattens all transparencies in the document. To flatten specific pages, see Document.FlattenTransparency(params, firstPage, lastPage) Documents are flattened one at a time. In multi-threaded applications, threads that are making simultaneous calls to this method will block and execute the method sequentially. ### flatten_xfa_form_fields ```cpp int datalogics_interface::Document::flatten_xfa_form_fields() ``` **Returns:** `int` the number of output pages created in the flattened document. Flatten a XFA Document (Static or Dynamic). XFA content is not widely supported by PDF processors, flattening this content transforms into static PDF page content that is part of typical PDF files that can easily be understood by PDF processors. All XFA fields are removed. NOTE: This method is part of the APDFL Forms Extension that is available separately from APDFL. For more information, please see [https://www.datalogics.com/pdf-form-functions](https://www.datalogics.com/pdf-form-functions). ### for_each_indirect_object ```cpp void datalogics_interface::Document::for_each_indirect_object(const std::function< bool(PDFObject &)> &callback) const ``` **Parameters** - `callback` (`const std::function< bool(PDFObject &)> &`): A user-supplied callback to call for each indirect object in dP. Enumeration ends when enumProc returns false or all indirect objects have been enumerated. The value parameter returned in enumProc is always null. **Returns:** `void` true if all of the calls to enumProc returned true. It returns false as soon as a call to enumProc returns false. Enumerate every indirect PDF object in this document. The callback receives a reference to each indirect object in turn and should return true to continue or false to stop enumeration. Order is undefined and may differ between calls. Enumerates all the indirect objects of this document. The objects are enumerated in no particular order. Successive enumerations of the same Document are not guaranteed to enumerate objects in the same order. This method does not enumerate invalid objects, which include objects that are defined as null, objects that are not defined at all (those having no cross-reference entry), and objects that are on the free list. This re-raises any exception that proc raises. ### from_html_file ```cpp static WebConvertResult datalogics_interface::Document::from_html_file(const std::string &path, const WebConvertParams ¶ms) ``` *static* **Parameters** - `path` (`const std::string &`) - `params` ([`const WebConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertParams.md)) **Returns:** [`WebConvertResult`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/WebConvertResult.md) Render a local HTML file. Relative asset references are resolved against the file's directory. Throws WebConvertError on read/render failure. Throws OperationCancelledException if the progress callback returns false. On platforms where the WebToPDF plugin is not supported, throws WebConvertError(Category::PluginUnavailable). See the threading note above this declaration. Render a local HTML file. Forwards to FromWebUrl with a "file://" scheme prepended to path. Same platform-unsupported behavior and same return- shape semantics as FromWebUrl. ### from_web_url ```cpp static WebConvertResult datalogics_interface::Document::from_web_url(const std::string &url, const WebConvertParams ¶ms) ``` *static* **Parameters** - `url` (`const std::string &`) - `params` ([`const WebConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertParams.md)) **Returns:** [`WebConvertResult`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/WebConvertResult.md) Render a live web page (http/https) and produce a Document. Throws WebConvertError on fetch/render failure. Throws OperationCancelledException if the progress callback returns false. On platforms where the WebToPDF plugin is not supported, throws WebConvertError(Category::PluginUnavailable). See the threading note above this declaration. Render a URL (http/https or [file://](file://)) into a Document. Calls CWebToPDFLifecycle::EnsureReady() first; rethrows CWebConvertError on any plugin failure. info_out is populated on success. Returns a heap-allocated CDocument (same pattern as the PDF/A and PDF/X clone paths) so the Document::Impl adopting ctor can take ownership without invoking CDocument's copy ctor, which is known to error in post- terminate teardown states. The caller owns the returned pointer. The returned CDocument carries the backing temp PDF's lifetime: it is removed in CDocumentImpl::Dispose() right after the file handle closes necessary on Windows where APDFL's open handle holds an exclusive lock and prevents remove() from succeeding before the document is destroyed. On platforms where the WebToPDF plugin is not supported this throws CWebConvertError(Category::PluginUnavailable, ...) immediately (translated to WebConvertError(Category::PluginUnavailable) by the api layer). ### get_attachments ```cpp std::vector< std::shared_ptr< FileAttachment > > datalogics_interface::Document::get_attachments() ``` **Returns:** [`std::vector< std::shared_ptr< FileAttachment > >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileAttachment.md) The list of attached files. Gets all attached files from the PDF document. ### get_author ```cpp std::string datalogics_interface::Document::get_author() const ``` **Returns:** `std::string` The author of the PDF document. ### get_base_uri ```cpp std::string datalogics_interface::Document::get_base_uri() const ``` **Returns:** `std::string` The Base URI of the PDF document. ### get_bookmark_root ```cpp std::unique_ptr< Bookmark > datalogics_interface::Document::get_bookmark_root() ``` **Returns:** [`std::unique_ptr< Bookmark >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md) The document's root bookmark. Gets the root of the document's bookmark tree. The return value is valid even if the document's bookmark tree is empty (meaning that there is no Outlines key in the underlying PDF file). ### get_collection ```cpp std::unique_ptr< Collection > datalogics_interface::Document::get_collection() const ``` **Returns:** [`std::unique_ptr< Collection >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Collection.md) collection object if collection exists in the Document or NULL otherwise. GetCollection allows to retrieve collection from the PDF document. ### get_compression_level ```cpp int datalogics_interface::Document::get_compression_level() const ``` **Returns:** `int` The compression level of the document. The compression level can be one of three values returned by this property: 0 - No compression. All objects are available without inflation. 1 - Partial compression. Objects related to logical structure are stored in object streams and must be inflated. 2 - Full compression. All objects are compressed and must be inflated. ### get_creator ```cpp std::string datalogics_interface::Document::get_creator() const ``` **Returns:** `std::string` The creator of the PDF file. ### get_delete_on_close ```cpp bool datalogics_interface::Document::get_delete_on_close() const ``` **Returns:** `bool` The DeleteOnClose property. The document is based on a temporary file that must be deleted when the document is closed or saved. ### get_file_name ```cpp std::string datalogics_interface::Document::get_file_name() const ``` **Returns:** `std::string` The filename associated with this Document. Get the filename associated with this Document, if it has a representation on disk. ### get_fonts ```cpp std::vector< Font > datalogics_interface::Document::get_fonts(int first_page, int last_page) const ``` **Parameters** - `first_page` (`int`): The page number of the first page for which fonts are enumerated. The first page is 0. - `last_page` (`int`): The page number of the last page for which fonts are enumerated. **Returns:** [`std::vector< Font >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md) A list of Font objects found in the specified page range. Get all the fonts in the specified page range. This may take a considerable amount of time for a large page range. ### get_has_signature ```cpp bool datalogics_interface::Document::get_has_signature() const ``` **Returns:** `bool` If the Document has a Digital Signature. The document contains a Digital Signature. ### get_info ```cpp std::string datalogics_interface::Document::get_info(const std::string &key) const ``` **Parameters** - `key` (`const std::string &`): The name of metadata which value will be obtained. **Returns:** `std::string` The value of the metadata obtained from the PDF file. Gets the value of metadata information in a PDF file. ### get_info_dict ```cpp std::unique_ptr< PDFDict > datalogics_interface::Document::get_info_dict() const ``` **Returns:** [`std::unique_ptr< PDFDict >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The Info dictionary of the document as a PDFObject. ### get_instance_id ```cpp std::vector< unsigned char > datalogics_interface::Document::get_instance_id() const ``` **Returns:** `std::vector< unsigned char >` Get the instance ID for this document. ### get_is_linearized ```cpp bool datalogics_interface::Document::get_is_linearized() const ``` **Returns:** `bool` The IsLinearized property The document is linearized (optimized) for page-served remote (network) access. This flag is get only. ### get_is_modified ```cpp bool datalogics_interface::Document::get_is_modified() const ``` **Returns:** `bool` The IsModified property. The document has been modified slightly (for example, bookmarks or text annotations have been opened or closed), but not in a way that warrants saving. This flag is get only. ### get_is_optimized ```cpp bool datalogics_interface::Document::get_is_optimized() const ``` **Returns:** `bool` The IsOptimized property The document is optimized. If this flag is cleared, the Adobe PDF Library does not save the file optimized. You can, therefore, linearize a PDF file without optimizing it. Optimizing without linearizing is not allowed, however. This flag can only be set, never cleared. ### get_keywords ```cpp std::string datalogics_interface::Document::get_keywords() const ``` **Returns:** `std::string` The keywords of the PDF file. ### get_loaded_fonts ```cpp std::vector< Font > datalogics_interface::Document::get_loaded_fonts() const ``` **Returns:** [`std::vector< Font >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md) Enumerates all the fonts that have been encountered so far. A font is loaded when a page that uses it is processed. This typically happens when a page is drawn or its thumbnail image is created. ### get_major_version ```cpp int datalogics_interface::Document::get_major_version() const ``` **Returns:** `int` The major PDF version number of the document. The major PDF version number of the document. The PDF version is specified in the header of a PDF file in the string "%PDF-xx. yy" where xx is the major version and yy is the minor version. ### get_minor_version ```cpp int datalogics_interface::Document::get_minor_version() const ``` **Returns:** `int` The minor PDF version number of the document. The minor PDF version number of the document. The PDF version is specified in the header of a PDF file in the string "%PDF-xx. yy" where xx is the major version and yy is the minor version. Please note: Setting the minor version on a document only changes the version number in the document's file header. It will NOT actually change the PDF's contents and it will NOT alter the PDF to conform to the standard of the new minor version. The new minor version number will appear in the file header once the document is saved. ### get_name_tree ```cpp std::unique_ptr< NameTree > datalogics_interface::Document::get_name_tree(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): The name of the NameTree to get. **Returns:** [`std::unique_ptr< NameTree >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NameTree.md) The retrieved NameTree. Retrieves the name tree inside the Names dictionary with the specified key name. ### get_needs_save ```cpp bool datalogics_interface::Document::get_needs_save() const ``` **Returns:** `bool` The NeedsSave property. The document has been modified and needs to be saved. ### get_num_pages ```cpp int datalogics_interface::Document::get_num_pages() const ``` **Returns:** `int` The number of pages in the document. Remember to subtract 1 from this value if you are going to pass it to a Page method that takes a zero-based page number. Gets the number of pages in a document. ### get_optional_content_groups ```cpp std::vector< OptionalContentGroup > datalogics_interface::Document::get_optional_content_groups() const ``` **Returns:** [`std::vector< OptionalContentGroup >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md) A list of COptionalContentGroup objects. Gets the optional-content groups for the document. The order of the groups is not guaranteed to be the creation order, and is not the same as the display order (see PDOCConfigGetOCGOrder()). ### get_page ```cpp Page datalogics_interface::Document::get_page(int page_number) ``` **Parameters** - `page_number` (`int`): The page number of the page to acquire. The first page is 0. **Returns:** [`Page`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md) The requested Page object. Gets a Page from a document. ### get_page_labels ```cpp std::vector< PageLabel > datalogics_interface::Document::get_page_labels() const ``` **Returns:** [`std::vector< PageLabel >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageLabel.md) The list of PageLabel objects used in the document. PageLabels are always stored in page index order; if two PageLabels start on the same page index, the last PageLabel appearing in the list will be used. ### get_page_mode ```cpp PageMode datalogics_interface::Document::get_page_mode() const ``` **Returns:** [`PageMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageMode.md) The PageMode of the PDF document. ### get_permanent_id ```cpp std::vector< unsigned char > datalogics_interface::Document::get_permanent_id() const ``` **Returns:** `std::vector< unsigned char >` Get the permanent ID for this document. ### get_permission_flags ```cpp PermissionFlags datalogics_interface::Document::get_permission_flags() const ``` **Returns:** [`PermissionFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PermissionFlags.md) flags that have been set Allows to obtain security flags for the document. ### get_producer ```cpp std::string datalogics_interface::Document::get_producer() const ``` **Returns:** `std::string` The producer of the PDF file. ### get_requires_full_save ```cpp bool datalogics_interface::Document::get_requires_full_save() const ``` **Returns:** `bool` The RequiresFullSave property. The document cannot be saved incrementally; when it is saved using Document.Save(), the SaveFlags.Full flag must be specified. This flag can only be set, never cleared. ### get_root ```cpp std::unique_ptr< PDFDict > datalogics_interface::Document::get_root() const ``` **Returns:** [`std::unique_ptr< PDFDict >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The Catalog of the document as a PDFObject. ### get_struct_tree_root ```cpp std::optional< StructTreeRoot > datalogics_interface::Document::get_struct_tree_root() ``` **Returns:** [`std::optional< StructTreeRoot >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructTreeRoot.md) Returns the StructTreeRoot if present, nullptr otherwise. ### get_subject ```cpp std::string datalogics_interface::Document::get_subject() const ``` **Returns:** `std::string` The subject of the PDF document. ### get_suppress_errors ```cpp bool datalogics_interface::Document::get_suppress_errors() const ``` **Returns:** `bool` The SuppressErrors property Do not display errors. ### get_title ```cpp std::string datalogics_interface::Document::get_title() const ``` **Returns:** `std::string` The title of the PDF document. ### get_version_string ```cpp std::string datalogics_interface::Document::get_version_string() const ``` **Returns:** `std::string` A string containing the PDF version number of the document. The PDF version of the document, which is specified in the header of a PDF file in the string "%PDF-xx.yy" where xx is the major version and yy is the minor version. Note that this returns a string containing both the major and minor versions. For version comparisons, use MajorVersion and MinorVersion. ### get_was_repaired ```cpp bool datalogics_interface::Document::get_was_repaired() const ``` **Returns:** `bool` The WasRepaired property. The document was repaired when it was opened. This flag is get only. ### get_xmp_metadata ```cpp std::string datalogics_interface::Document::get_xmp_metadata() const ``` **Returns:** `std::string` The XMP metadata associated with a document. The XMP metadata returned always represents all the properties in the Document's Info dictionary, and can also contain properties not present in the Info dictionary. This call is preferred to GetInfo, which only returns properties that are in the Info dictionary (although the older function is supported for compatibility). ### get_xmp_metadata_array_item ```cpp std::string datalogics_interface::Document::get_xmp_metadata_array_item(const std::string &ns, const std::string &path, int index) const ``` **Parameters** - `ns` (`const std::string &`): The XML namespace URI for the schema in which the property is to be found. - `path` (`const std::string &`): The name of the desired simple property. - `index` (`int`): The index in the metadata property array associated with the property. **Returns:** `std::string` a string containing the XML text of the value of the specified property in the XMP metadata associated with the Document, or an empty string if no such property is found. Gets the value of an XMP metadata array item, associated with a document, based on an index. ### get_xmp_metadata_property ```cpp std::string datalogics_interface::Document::get_xmp_metadata_property(const std::string &ns, const std::string &path) const ``` **Parameters** - `ns` (`const std::string &`): The XML namespace URI for the schema in which the property is to be found. - `path` (`const std::string &`): The name of the desired simple property. Note that XMP properties can have an XML substructure; this method can only retrieve values from simple textual properties. **Returns:** `std::string` A string containing the XML text of the value of the specified property, or an empty string if no such property is found. Gets the value of an XMP metadata property associated with a document. It returns the XML text of the value of the specified property in the XMP metadata associated with the Document. The XMP metadata can represent all properties in the Document object's Info dictionary, as well as other properties. ### import_acro_forms_data ```cpp bool datalogics_interface::Document::import_acro_forms_data(const std::string &path, AcroFormImportType type) ``` **Parameters** - `path` (`const std::string &`): The path on disk of the AcroFormsdata file to be imported. - `type` ([`AcroFormImportType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AcroFormImportType.md)): The format type the data type should be imported to. The supported types are XFDF, FDF, and XML. **Returns:** `bool` true indicates importing succeeded and false indicates an error occurred Import the AcroForms data. AcroForms data is imported from a supported format into the AcroForms document so its existing fields can be populated for example. NOTE: This method is part of the APDFL Forms Extension that is available separately from APDFL. For more information, please see [https://www.datalogics.com/pdf-form-functions](https://www.datalogics.com/pdf-form-functions). ### import_xfa_forms_data ```cpp bool datalogics_interface::Document::import_xfa_forms_data(const std::string &path) ``` **Parameters** - `path` (`const std::string &`): The path on disk of the XFA form data file to be imported, the supported types of data that can be imported are XDP, XML, and XFD. **Returns:** `bool` true indicates importing succeeded and false indicates an error occurred Import the XFA Forms data. XFA forms data is imported from a supported format into the XFA document so its existing fields can be populated for example. NOTE: This method is part of the APDFL Forms Extension that is available separately from APDFL. For more information, please see [https://www.datalogics.com/pdf-form-functions](https://www.datalogics.com/pdf-form-functions). ### insert_pages ```cpp void datalogics_interface::Document::insert_pages(int merge_after, const Document &source, int start_page, int num_pages, PageInsertFlags flags) ``` **Parameters** - `merge_after` (`int`): The page number in doc after which pages from doc2 are inserted. The first page is 0. If Document.BeforeFirstPage is used, the pages are inserted before the first page in doc. Use Document.LastPage to insert pages after the last page in doc. - `source` ([`const Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The document containing the pages that are inserted into doc. - `start_page` (`int`): The page number of the first page in doc2 to insert into doc. The first page is 0. - `num_pages` (`int`): The number of pages in doc2 to insert into doc. Use Document.AllPages to insert all pages from doc2 into doc. - `flags` ([`PageInsertFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageInsertFlags.md)): Flags that determine what additional information is copied from doc2 into doc. It is an OR of the following constants: PageInsertFlags.Bookmarks, PageInsertFlags.Threads, PageInsertFlags.All **Returns:** `void` Inserts numPages pages from doc2 into doc. All annotations, and anything else associated with the page (such as a thumbnail image) are copied from the doc2 pages to the new pages in doc. This method does not insert pages if doc equals doc2. The insertFlags parameter controls whether bookmarks and threads are inserted along with the specified pages. Setting this parameter to PageInsertFlags.All has two effects: The parameters indicating which pages to insert are ignored: all the pages of doc2 are inserted. In addition to inserting the pages themselves, it also merges other document data from doc2 into doc: Named destinations from doc2 (of PDF 1.1 and later) are copied into doc. If there are named destinations in doc2 with the same name as some named destination in doc, the ones in doc retain their names and the copied named destinations are given new names based on the old ones, with distinguishing digits added. Actions and bookmarks referring to the old names are made to refer to the new names after being copied into doc. If it is also the case that mergeAfterThisPage denotes the last page of the document, then document metadata is merged, and the optional content properties are merged in a more symmetrical manner than would otherwise be the case. Document logical structure from doc2 is copied into doc. If less than the whole of doc2 is being inserted, only those structure elements having content on the copied pages, and the ancestors of those elements, are copied into the logical structure tree of doc. The top-level children of the structure tree root of doc2 are copied as new top-level children of the structure tree root of doc; a structure tree root is created in doc if there was none before. The role maps of the two structure trees are merged, with name conflicts resolved in favor of the role mappings present in doc. Attribute objects having scalar values, or values that are arrays of scalar values, are copied. Class map information from doc2 is also merged into that for doc. ### move_page ```cpp void datalogics_interface::Document::move_page(int move_to_after, int page_to_move) ``` **Parameters** - `move_to_after` (`int`): The new location of the page to move. The first page is 0. It may either be a page number, or the constant Document.BeforeFirstPage. - `page_to_move` (`int`): The page number of the page to move. **Returns:** `void` Moves one page in a document. ### operator= ```cpp Document & datalogics_interface::Document::operator=(Document &&) noexcept ``` **Parameters** - (unnamed) ([`Document &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)) **Returns:** [`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md) ### perm_request ```cpp bool datalogics_interface::Document::perm_request(const std::string &password, PermissionRequestOperation operation) ``` **Parameters** - `password` (`const std::string &`): - The document password which authorizes the change. Note - if this argument is set to a NULL (""), then the return will be an indicator of whether or not the requested permission is already set in this document, with no changes made to the PDF document. - `operation` ([`PermissionRequestOperation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PermissionRequestOperation.md)): - the permissions on the PDF file which is to be set or checked. **Returns:** `bool` a boolean if the permission change is successful or if the permission was set. Request the permissions to be changed on a PDF document. This takes effect immediately ### perm_request ```cpp bool datalogics_interface::Document::perm_request(PermissionRequestOperation operation) ``` **Parameters** - `operation` ([`PermissionRequestOperation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PermissionRequestOperation.md)): - The document password which authorizes the change. Note - if this argument is set to a NULL (""), then the return will be an indicator of whether or not the requested permission is already set in this document, with no changes made to the PDF document. **Returns:** `bool` a boolean if the permission change is successful or if the permission was set. Request the permissions to be changed on a PDF document. This takes effect immediately ### print ```cpp void datalogics_interface::Document::print(PrintUserParams ¶ms) ``` **Parameters** - `params` ([`PrintUserParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PrintUserParams.md)): Parameters to control printing. **Returns:** `void` Prints a PDF document or pages from a PDF document allowing the caller to specify options such as page size, rotation, and shrink-to-fit. ### print_to_file ```cpp void datalogics_interface::Document::print_to_file(PrintUserParams ¶ms, const std::string &path) ``` **Parameters** - `params` ([`PrintUserParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PrintUserParams.md)): Parameters to control printing. - `path` (`const std::string &`): The output file to be created. **Returns:** `void` Prints a PDF document or pages from a PDF document allowing the caller to specify options such as page size, rotation, and shrink-to-fit. The output is placed in the specified file. ### remove_collection ```cpp void datalogics_interface::Document::remove_collection() ``` **Returns:** `void` RemoveCollection Removes a collection dictionary from a document. ### remove_name_tree ```cpp void datalogics_interface::Document::remove_name_tree(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): The name of the NameTree to remove. **Returns:** `void` Removes the name tree inside the Names dictionary with the specified key name. It does nothing if no object with that name exists. ### replace_pages ```cpp void datalogics_interface::Document::replace_pages(int start_page, const Document &source, int start_page_source, int num_pages, bool merge_text_annots) ``` **Parameters** - `start_page` (`int`): The first page number in doc to replace. The first page is 0. - `source` ([`const Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The document from which pages are copied into doc. - `start_page_source` (`int`): The page number of the first page in doc2 to copy. The first page is 0. - `num_pages` (`int`): The number of pages to replace. - `merge_text_annots` (`bool`): If true, text annotations from doc2 are appended if they are different than all existing annotations on the page in doc. No other types of annotations are copied. **Returns:** `void` Replaces the specified range of pages in one document with pages from another. The contents, resources, size and rotation of the pages are replaced. The bookmarks are not copied, because they are attached to the document, not to individual pages. **Note:** Annotations in the replaced pages are not replaced and remain with the page. Use DeletePages to remove annotations. ### save ```cpp void datalogics_interface::Document::save(SaveFlags flags) ``` **Parameters** - `flags` ([`SaveFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SaveFlags.md)): A bit field composed of an OR of the SaveFlags values. **Returns:** `void` Saves a document to disk. If a full save is requested to the original path, the file is saved to a file system-determined temporary file, the old file is deleted, and the temporary file is renamed to newPath. If the document was created with Document, at least one page must be added using CreatePage() or InsertPages() before a PDF Viewer can save the document. A full save with linearization optimizes the PDF file. During optimization, all objects in a PDF file are rearranged, many of them acquiring not only a new file position, but also a new PDFObject number. At the end of the save operation, PDFL flushes its information of the PD layer and below to synchronize its in-memory state with the new disk file just written. If the document has a signature, it will be saved incrementally regardless of the full save flag. This is required to preserve the exact contents of the document at the time of signing. ### save ```cpp void datalogics_interface::Document::save(SaveFlags flags, const std::string &path) ``` **Parameters** - `flags` ([`SaveFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SaveFlags.md)): A bit field composed of an OR of the SaveFlags values. - `path` (`const std::string &`): The path to which the file is saved. A path must be specified when either SaveFlags.Full or SaveFlags.Copy are used for saveFlags. If SaveFlags.Incremental is specified in saveFlags, then newPath should be NULL. If SaveFlags.Full is specified and newPath is the same as the file's original path, the new file is saved to a file system-determined temporary path, then the old file is deleted and the new file is renamed to newPath. **Returns:** `void` Saves a document to disk. If a full save is requested to the original path, the file is saved to a file system-determined temporary file, the old file is deleted, and the temporary file is renamed to newPath. If the document was created with Document, at least one page must be added using CreatePage() or InsertPages() before a PDF Viewer can save the document. A full save with linearization optimizes the PDF file. During optimization, all objects in a PDF file are rearranged, many of them acquiring not only a new file position, but also a new PDFObject number. At the end of the save operation, PDFL flushes its information of the PD layer and below to synchronize its in-memory state with the new disk file just written. If the document has a signature, it will be saved incrementally regardless of the full save flag. This is required to preserve the exact contents of the document at the time of signing. ### save ```cpp void datalogics_interface::Document::save(SaveFlags flags, std::ostream &output_stream) ``` **Parameters** - `flags` ([`SaveFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SaveFlags.md)) - `output_stream` (`std::ostream &`) **Returns:** `void` Save the document to an output stream. ### secure ```cpp void datalogics_interface::Document::secure(PermissionFlags permissions, const std::string &owner_password, const std::string &user_password) ``` **Parameters** - `permissions` ([`PermissionFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PermissionFlags.md)): - an "OR" of the types of PDF document specified by Permissions: - `owner_password` (`const std::string &`): - optional PDF document owner password; pass null if not used. - `user_password` (`const std::string &`): - optional PDF document user password; pass null if not used. **Returns:** `void` Secure the PDF document securely with password(s). If the document has a security handler, it is retained. If the document does not have a security handler, it is assigned the "Standard" security handler with a 16-bit encryption key length. Access permissions as well as owner and user passwords are assigned to the PDF document. This method by default encrypts PDF's content as well as its metadata. To make selective encryption use appropriate overload of Secure() method. The document must be saved for the changes to take effect. A full save is required. ### secure ```cpp void datalogics_interface::Document::secure(PermissionFlags permissions, const std::string &owner_password, const std::string &user_password, EncryptionType encryption_type) ``` **Parameters** - `permissions` ([`PermissionFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PermissionFlags.md)): - an "OR" of the types of PDF document specified by Permissions: - `owner_password` (`const std::string &`): - optional PDF document owner password; pass null if not used. - `user_password` (`const std::string &`): - optional PDF document user password; pass null if not used. - `encryption_type` ([`EncryptionType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/EncryptionType.md)) **Returns:** `void` Secure the PDF document securely with password(s). If the document has a security handler, it is retained. If the document does not have a security handler, it is assigned the "Standard" security handler with a 16-bit encryption key length. Access permissions as well as owner and user passwords are assigned to the PDF document. This method by default encrypts PDF's content as well as its metadata. To make selective encryption use appropriate overload of Secure() method. The document must be saved for the changes to take effect. A full save is required. ### secure ```cpp void datalogics_interface::Document::secure(PermissionFlags permissions, const std::string &owner_password, const std::string &user_password, EncryptionType encryption_type, bool encrypt_metadata) ``` **Parameters** - `permissions` ([`PermissionFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PermissionFlags.md)): - an "OR" of the types of PDF document specified by Permissions: - `owner_password` (`const std::string &`): - optional PDF document owner password; pass null if not used. - `user_password` (`const std::string &`): - optional PDF document user password; pass null if not used. - `encryption_type` ([`EncryptionType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/EncryptionType.md)) - `encrypt_metadata` (`bool`) **Returns:** `void` Secure the PDF document securely with password(s). If the document has a security handler, it is retained. If the document does not have a security handler, it is assigned the "Standard" security handler with a 16-bit encryption key length. Access permissions as well as owner and user passwords are assigned to the PDF document. This method by default encrypts PDF's content as well as its metadata. To make selective encryption use appropriate overload of Secure() method. The document must be saved for the changes to take effect. A full save is required. ### set_author ```cpp void datalogics_interface::Document::set_author(const std::string &value) ``` **Parameters** - `value` (`const std::string &`): the author of the PDF document **Returns:** `void` The author of the PDF document. ### set_base_uri ```cpp void datalogics_interface::Document::set_base_uri(const std::string &value) ``` **Parameters** - `value` (`const std::string &`): the Base URI of the PDF document **Returns:** `void` The Base URI of the PDF document. ### set_creator ```cpp void datalogics_interface::Document::set_creator(const std::string &value) ``` **Parameters** - `value` (`const std::string &`): the creator of the PDF document **Returns:** `void` The creator of the PDF document. ### set_delete_on_close ```cpp void datalogics_interface::Document::set_delete_on_close(bool value) ``` **Parameters** - `value` (`bool`): The DeleteOnClose property **Returns:** `void` The document is based on a temporary file that must be deleted when the document is closed or saved. ### set_info ```cpp void datalogics_interface::Document::set_info(const std::string &key, const std::string &value) ``` **Parameters** - `key` (`const std::string &`): The name of metadata to be set - `value` (`const std::string &`): The value for metadata which will be set **Returns:** `void` Sets metadata information in a PDF document. ### set_is_optimized ```cpp void datalogics_interface::Document::set_is_optimized(bool value) ``` **Parameters** - `value` (`bool`): The IsOptimized property **Returns:** `void` The document is optimized. If this flag is cleared, the Adobe PDF Library does not save the file optimized. You can, therefore, linearize a PDF file without optimizing it. Optimizing without linearizing is not allowed, however. This flag can only be set, never cleared. ### set_keywords ```cpp void datalogics_interface::Document::set_keywords(const std::string &value) ``` **Parameters** - `value` (`const std::string &`): the keywords of the PDF document **Returns:** `void` The keywords of the PDF document. ### set_major_version ```cpp void datalogics_interface::Document::set_major_version(int version) ``` **Parameters** - `version` (`int`): The new major version number to be set in the document's file header. **Returns:** `void` The major PDF version number of the document. The PDF version is specified in the header of a PDF file in the string "%PDF-x.y" where x is the major version and y is the minor version. For example, version 1.2 has the string "%PDF-1.2". See Section I.2 in the PDF Reference. Please note: Setting the major version on a document only changes the version number in the document's file header. It will NOT actually change the PDF's contents and it will NOT alter the PDF to conform to the standard of the new major version. The new major version number will appear in the file header once the document is saved. ### set_minor_version ```cpp void datalogics_interface::Document::set_minor_version(int version) ``` **Parameters** - `version` (`int`): The new minor version number to be set in the document's file header. **Returns:** `void` The minor PDF version number of the document. The PDF version is specified in the header of a PDF file in the string "%PDF-xx. yy" where xx is the major version and yy is the minor version. For example, version 1.2 has the string "%PDF-1 .2". Please note: Setting the minor version on a document only changes the version number in the document's file header. It will NOT actually change the PDF's contents and it will NOT alter the PDF to conform to the standard of the new minor version. The new minor version number will appear in the file header once the document is saved. ### set_needs_save ```cpp void datalogics_interface::Document::set_needs_save(bool value) ``` **Parameters** - `value` (`bool`): The NeedSave property **Returns:** `void` The document has been modified and needs to be saved. ### set_page_labels ```cpp void datalogics_interface::Document::set_page_labels(const std::vector< PageLabel > &labels) ``` **Parameters** - `labels` ([`const std::vector< PageLabel > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageLabel.md)): when a page label has an unknown numbering style **Returns:** `void` The list of PageLabel objects used in the document. ### set_page_mode ```cpp void datalogics_interface::Document::set_page_mode(PageMode mode) ``` **Parameters** - `mode` ([`PageMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageMode.md)): the pagemode to apply to the Document **Returns:** `void` The PageMode of the PDF document. The default PageMode for a new Document is PageMode.NoPreference . ### set_producer ```cpp void datalogics_interface::Document::set_producer(const std::string &value) ``` **Parameters** - `value` (`const std::string &`): the producer of the PDF document **Returns:** `void` The producer of the PDF document. ### set_requires_full_save ```cpp void datalogics_interface::Document::set_requires_full_save(bool value) ``` **Parameters** - `value` (`bool`): The RequiresFullSave property **Returns:** `void` The document cannot be saved incrementally; when it is saved using Document.Save(), the SaveFlags.Full flag must be specified. This flag can only be set, never cleared. ### set_subject ```cpp void datalogics_interface::Document::set_subject(const std::string &value) ``` **Parameters** - `value` (`const std::string &`): the subject of the PDF document **Returns:** `void` The subject of the PDF document. ### set_suppress_errors ```cpp void datalogics_interface::Document::set_suppress_errors(bool value) ``` **Parameters** - `value` (`bool`): The SuppressErrors property **Returns:** `void` Do not display errors. ### set_title ```cpp void datalogics_interface::Document::set_title(const std::string &value) ``` **Parameters** - `value` (`const std::string &`): the title of the PDF document **Returns:** `void` The title of the PDF document. ### set_xmp_metadata ```cpp void datalogics_interface::Document::set_xmp_metadata(const std::string &metadata) ``` **Parameters** - `metadata` (`const std::string &`): the XMP metadata associated with a document **Returns:** `void` The XMP metadata associated with a document. The XMP metadata returned always represents all the properties in the Document's Info dictionary, and can also contain properties not present in the Info dictionary. This call is preferred to GetInfo, which only returns properties that are in the Info dictionary (although the older function is supported for compatibility). ### set_xmp_metadata_array_item ```cpp void datalogics_interface::Document::set_xmp_metadata_array_item(const std::string &ns, const std::string &ns_prefix, const std::string &path, int index, const std::string &value) ``` **Parameters** - `ns` (`const std::string &`): The XML namespace URI for the schema in which the property is to be found. - `ns_prefix` (`const std::string &`): A brief string to be used as an abbreviation when creating the XML representation of the property. This string must not be empty. - `path` (`const std::string &`): The name of the simple property to be modified. - `index` (`int`): The index in the metadata property array associated with the property. - `value` (`const std::string &`): The new XML text value for the property. **Returns:** `void` Sets the value of an XMP metadata array item, associated with a document, based on an index. ### set_xmp_metadata_property ```cpp void datalogics_interface::Document::set_xmp_metadata_property(const std::string &ns, const std::string &ns_prefix, const std::string &path, const std::string &value) ``` **Parameters** - `ns` (`const std::string &`): The XML namespace URI for the schema in which the property is to be found. - `ns_prefix` (`const std::string &`): A brief string to be used as an abbreviation when creating the XML representation of the property. This string must not be empty. - `path` (`const std::string &`): The name of the simple property to be modified. - `value` (`const std::string &`): The new XML text value for the property. **Returns:** `void` Sets the value of an XMP metadata property associated with a document. The XMP metadata represents all the properties in pdDoc object's Info dictionary, and can also contain properties that are not in the Info dictionary. ### unsecure ```cpp void datalogics_interface::Document::unsecure() ``` **Returns:** `void` Remove security handler from the PDF document. If the document has a security handler, it is removed. If the document does not have a security handler, this method does nothing. To remove the security handler, you must hold the PermissionRequestOperation.Secure permission, which you can obtain via Document.PermRequest. This call will throw an ApplicationException if you do not hold the Secure permission. The document must be saved for the changes to take effect. A full save is required. ### watermark ```cpp void datalogics_interface::Document::watermark(Page &page, WatermarkParams ¶ms) ``` **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to be added as a watermark. - `params` ([`WatermarkParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkParams.md)): Structure specifying how the watermark should be added to the document. **Returns:** `void` Adds a Page as a watermark to a page range in the given document. ### watermark ```cpp void datalogics_interface::Document::watermark(WatermarkTextParams &text_params, WatermarkParams ¶ms) ``` **Parameters** - `text_params` ([`WatermarkTextParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkTextParams.md)): The page to be added as a watermark. - `params` ([`WatermarkParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkParams.md)): Structure specifying how the watermark should be added to the document. **Returns:** `void` Adds a Page as a watermark to a page range in the given document. --- # DrawFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DrawFlags **Namespace:** `datalogics_interface` ## Description Bit flags indicating how a page is rendered. These flags can be OR'd together to control various rendering behaviors. ## Values - `DoLazyErase = 0x00000001`: Erase the page while rendering only as needed. - `UseAnnotFaces = 0x00000040`: Draw annotation appearances. - `IsPrinting = 0x00000080`: The page is being printed. - `DisplayOverPrintPreview = 0x00000100`: Display overprint preview. - `UseTrapAnnots = 0x00002000`: Use trap network annotations. - `DirectlyImposed = 0x00004000`: Directly imposed page. - `IsPSPrinting = 0x00008000`: PostScript printing. - `EmitPageGroup = 0x00010000`: Emit a page group. - `UsePrinterMarkAnnots = 0x00020000`: Use printer's mark annotations. - `PassOPItoAGMPort = 0x00040000`: Pass open prepress interface (OPI) to AGM port. - `PassMetadatatoAGMPort = 0x00080000`: Pass metadata to AGM port. - `PassOCtoAGMPort = 0x00100000`: Pass optional content to AGM port. - `DoNotDownloadFonts = 0x00400000`: Do not download fonts during rendering. - `WritingToEMF = 0x00400000`: Same as DoNotDownloadFonts. - `DoNotSubstituteWorkingSpaces = 0x00800000`: Do not substitute working spaces. - `SwapComponents = 0x01000000`: Render colors in BGR order rather than RGB. - `SuppressRasterAlpha = 0x02000000`: Suppress raster alpha. - `WorkingSpacesOnlyForChange = 0x04000000`: Only use a working space if the process color model differs. - `UseStampAnnotsOnly = 0x08000000`: Only consider Stamp annotations. Overrides UseAnnotFaces. - `ForceGDIPort = 0x10000000`: Force GDI port for window draw code (Windows only). - `IsPrintPreviewing = 0x10000000`: Same as ForceGDIPort. - `OptimizeForInteractive = 0x20000000`: Optimize for interactive re-drawing of PDF pages. --- # DrawParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DrawParams ```cpp class DrawParams ``` **Namespace:** `datalogics_interface` ## Description Settings for rendering PDF pages as images. This is used for rendering PDF pages to images, such as PNG or JPG files, to export to separate files or to send to a printer. **Uses types:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md), [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md), [`DrawFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DrawFlags.md), [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md), [`OptionalContentContext`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentContext.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md), [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md), [`SmoothFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SmoothFlags.md) ## Constructors ### DrawParams ```cpp datalogics_interface::DrawParams::DrawParams() ``` *constructor* Construct default DrawParams. Initializes with DeviceRGB color space, relative colorimetric render intent, no smoothing, no draw flags, and no cancel or progress callbacks. ### DrawParams ```cpp datalogics_interface::DrawParams::DrawParams(const DrawParams &other) ``` *constructor* **Parameters** - `other` ([`const DrawParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DrawParams.md)) Copy constructor. ### DrawParams ```cpp datalogics_interface::DrawParams::DrawParams(DrawParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`DrawParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DrawParams.md)) ### ~DrawParams ```cpp datalogics_interface::DrawParams::~DrawParams() ``` *destructor* ## Methods ### get_bypass_copy_perm ```cpp bool datalogics_interface::DrawParams::get_bypass_copy_perm() const ``` **Returns:** `bool` Bypass copy permissions. Only used when drawing to a bitmap. ### get_color_space ```cpp std::unique_ptr< ColorSpace > datalogics_interface::DrawParams::get_color_space() const ``` **Returns:** [`std::unique_ptr< ColorSpace >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) The color space in which the bitmap data is represented. Must be one of DeviceGray, DeviceRGB, DeviceRGBA, DeviceCMYK, Lab, or LabA. Only used when drawing to a bitmap. ### get_dest_rect ```cpp Rect datalogics_interface::DrawParams::get_dest_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The rectangle of the bitmap in device space coordinates. Only used when drawing to a bitmap. ### get_enable_black_point_compensation ```cpp bool datalogics_interface::DrawParams::get_enable_black_point_compensation() const ``` **Returns:** `bool` Enable/disable black point compensation. ### get_enable_thin_line_heuristics ```cpp bool datalogics_interface::DrawParams::get_enable_thin_line_heuristics() const ``` **Returns:** `bool` Enable/disable thin line adjustments when drawing rectangles. ### get_flags ```cpp DrawFlags datalogics_interface::DrawParams::get_flags() const ``` **Returns:** [`DrawFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DrawFlags.md) Drawing flags. ### get_icc_profile ```cpp ColorProfile datalogics_interface::DrawParams::get_icc_profile() const ``` **Returns:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md) The ICC Profile of the colorspace to be used for rendering, from a known value. NOTE: The ICCProfileCustomPath must not be set for this property to be used. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either. ### get_icc_profile_custom_path ```cpp std::string datalogics_interface::DrawParams::get_icc_profile_custom_path() const ``` **Returns:** `std::string` The ICC Profile of the colorspace to be used for rendering, from a custom file path. NOTE: The ICCProfile is ignored when this property is a non-empty string. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either. ### get_matrix ```cpp Matrix datalogics_interface::DrawParams::get_matrix() const ``` **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) The matrix to concatenate onto the default page matrix. Useful for converting from page to window coordinates and for scaling. ### get_optional_content_context ```cpp std::unique_ptr< OptionalContentContext > datalogics_interface::DrawParams::get_optional_content_context() const ``` **Returns:** [`std::unique_ptr< OptionalContentContext >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentContext.md) The optional content context, or NULL if using the document's default. Get the optional-content context used for visibility state information. ### get_render_intent ```cpp RenderIntent datalogics_interface::DrawParams::get_render_intent() const ``` **Returns:** [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md) Default rendering intent is RelColorimetric (relative colorimetric). Only used when drawing to a bitmap. ### get_smooth_flags ```cpp SmoothFlags datalogics_interface::DrawParams::get_smooth_flags() const ``` **Returns:** [`SmoothFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SmoothFlags.md) Smoothing flags. Only used when drawing to a bitmap. ### get_update_rect ```cpp Rect datalogics_interface::DrawParams::get_update_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The rectangle specifying the area to draw. A rectangle represented by the coordinates of its four sides. If unset (degenerate), the page's CropBox is used instead. ### operator= ```cpp DrawParams & datalogics_interface::DrawParams::operator=(const DrawParams &other) ``` **Parameters** - `other` ([`const DrawParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DrawParams.md)) **Returns:** [`DrawParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DrawParams.md) Copy assignment. ### operator= ```cpp DrawParams & datalogics_interface::DrawParams::operator=(DrawParams &&) noexcept ``` **Parameters** - (unnamed) ([`DrawParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DrawParams.md)) **Returns:** [`DrawParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DrawParams.md) ### set_bypass_copy_perm ```cpp void datalogics_interface::DrawParams::set_bypass_copy_perm(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` Bypass copy permissions. Only used when drawing to a bitmap. ### set_color_space ```cpp void datalogics_interface::DrawParams::set_color_space(ColorSpace &color_space) ``` **Parameters** - `color_space` ([`ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): the color space in which the bitmap data is represented **Returns:** `void` The color space in which the bitmap data is represented. Must be one of DeviceGray, DeviceRGB, DeviceRGBA, DeviceCMYK, Lab, or LabA. Only used when drawing to a bitmap. ### set_dest_rect ```cpp void datalogics_interface::DrawParams::set_dest_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)) **Returns:** `void` The rectangle of the bitmap in device space coordinates. Only used when drawing to a bitmap. ### set_enable_black_point_compensation ```cpp void datalogics_interface::DrawParams::set_enable_black_point_compensation(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` Enable/disable black point compensation. ### set_enable_thin_line_heuristics ```cpp void datalogics_interface::DrawParams::set_enable_thin_line_heuristics(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` Enable/disable thin line adjustments when drawing rectangles. ### set_flags ```cpp void datalogics_interface::DrawParams::set_flags(DrawFlags flags) ``` **Parameters** - `flags` ([`DrawFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DrawFlags.md)) **Returns:** `void` Drawing flags. ### set_icc_profile ```cpp void datalogics_interface::DrawParams::set_icc_profile(ColorProfile profile) ``` **Parameters** - `profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)) **Returns:** `void` The ICC Profile of the colorspace to be used for rendering, from a known value. NOTE: The ICCProfileCustomPath must not be set for this property to be used. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either. ### set_icc_profile_custom_path ```cpp void datalogics_interface::DrawParams::set_icc_profile_custom_path(const std::string &path) ``` **Parameters** - `path` (`const std::string &`) **Returns:** `void` The ICC Profile of the colorspace to be used for rendering, from a custom file path. NOTE: The ICCProfile is ignored when this property is a non-empty string. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either. ### set_matrix ```cpp void datalogics_interface::DrawParams::set_matrix(const Matrix &matrix) ``` **Parameters** - `matrix` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)) **Returns:** `void` The matrix to concatenate onto the default page matrix. Useful for converting from page to window coordinates and for scaling. ### set_optional_content_context ```cpp void datalogics_interface::DrawParams::set_optional_content_context(OptionalContentContext &context) ``` **Parameters** - `context` ([`OptionalContentContext &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentContext.md)): The optional content context, or NULL for the default. **Returns:** `void` The optional-content context to use for visibility state information. Set to NULL to use the document's current states in the default context. ### set_render_intent ```cpp void datalogics_interface::DrawParams::set_render_intent(RenderIntent intent) ``` **Parameters** - `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)) **Returns:** `void` Default rendering intent is RelColorimetric (relative colorimetric). Only used when drawing to a bitmap. ### set_smooth_flags ```cpp void datalogics_interface::DrawParams::set_smooth_flags(SmoothFlags flags) ``` **Parameters** - `flags` ([`SmoothFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SmoothFlags.md)) **Returns:** `void` Smoothing flags. Only used when drawing to a bitmap. ### set_update_rect ```cpp void datalogics_interface::DrawParams::set_update_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)) **Returns:** `void` The rectangle specifying the area to draw. A rectangle represented by the coordinates of its four sides. If unset (degenerate), the page's CropBox is used instead. --- # Element Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element ```cpp class Element ``` **Namespace:** `datalogics_interface` **Derived classes:** [`Container`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`Group`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Group.md), [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md), [`Path`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Path.md), [`Text`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Text.md) ## Description The base class for elements of the content of a page. An element is a building block; everything in a PDF file is an element. An element object can be associated with a large amount of unmanaged memory in APDFL and should be deleted when the object is no longer in use. **Referenced by:** [`Container`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md), [`Content`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md), [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`Group`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Group.md), [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md), [`Text`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Text.md) **Uses types:** [`Clip`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md), [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md), [`ElementCloneFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags.md), [`ElementType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType.md), [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### Element ```cpp datalogics_interface::Element::Element(Element &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Element &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md)) ### ~Element ```cpp virtual datalogics_interface::Element::~Element() ``` *destructor* ## Methods ### clone ```cpp std::unique_ptr< Element > datalogics_interface::Element::clone() const ``` **Returns:** [`std::unique_ptr< Element >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) The copied element. Makes a copy of the element. Make a copy of an element to obtain a new element that has a distinct set of attributes. Note: TextRun objects may not be cloned. ### clone ```cpp std::unique_ptr< Element > datalogics_interface::Element::clone(ElementCloneFlags flags) const ``` **Parameters** - `flags` ([`ElementCloneFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags.md)) **Returns:** [`std::unique_ptr< Element >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) The copied element. Makes a copy of the element. Make a copy of an element to obtain a new element that has a distinct set of attributes. Note: TextRun objects may not be cloned. ### get_bounding_box ```cpp Rect datalogics_interface::Element::get_bounding_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The bounding box for this element. The coordinates of the bounding box are specified in user space coordinates, relative to the element's Content. Note that user space coordinates correspond to unrotated pages; any rotation specified in the page dictionary is not taken into account. The bounding box for this element. The bounding box is a rectangle that is guaranteed to encompass the element, but it is not guaranteed to be the smallest box that could contain the element. For example, if the element is a Path that contains an arc, the bounding box encompasses the bezier control points, and not just the curve itself. ### get_clip ```cpp std::unique_ptr< Clip > datalogics_interface::Element::get_clip() ``` **Returns:** [`std::unique_ptr< Clip >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md) The current Clip for this Element, or NULL if no clip is set. Gets the current Clip for an Element. ### get_element_type ```cpp ElementType datalogics_interface::Element::get_element_type() const ``` **Returns:** [`ElementType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType.md) Returns the runtime type of this element. ### get_matrix ```cpp Matrix datalogics_interface::Element::get_matrix() const ``` **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) The current transformation matrix applied to this element. The transformation matrix for the element. ### operator= ```cpp Element & datalogics_interface::Element::operator=(Element &&) noexcept ``` **Parameters** - (unnamed) ([`Element &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md)) **Returns:** [`Element &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) ### rotate ```cpp void datalogics_interface::Element::rotate(double theta) ``` **Parameters** - `theta` (`double`): The rotation angle in degrees. **Returns:** `void` Rotate an element by theta degrees counterclockwise using the matrix [ cos T sin T -sin T cos T 0 0 ]. ### scale ```cpp void datalogics_interface::Element::scale(double sx, double sy) ``` **Parameters** - `sx` (`double`): The horizontal scale factor. - `sy` (`double`): The vertical scale factor. **Returns:** `void` Scale an element by (sx,sy) units using the matrix [ sx 0 0 sy 0 0 ]. ### set_clip ```cpp void datalogics_interface::Element::set_clip(Clip &clip) ``` **Parameters** - `clip` ([`Clip &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md)): The clip to set as the current clip for this element, or NULL to remove clipping. **Returns:** `void` Sets the current Clip for an Element. ### set_matrix ```cpp void datalogics_interface::Element::set_matrix(const Matrix &matrix) ``` **Parameters** - `matrix` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)): The transformation matrix for the element. **Returns:** `void` Set the transformation matrix for the element. ### translate ```cpp void datalogics_interface::Element::translate(double tx, double ty) ``` **Parameters** - `tx` (`double`): The horizontal translation distance in user space units. - `ty` (`double`): The vertical translation distance in user space units. **Returns:** `void` Translate an element by (tx,ty) units using the matrix [ 1 0 0 1 tx ty ]. ### try_as ```cpp T * datalogics_interface::Element::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this element to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Element::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # ElementCloneFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags **Namespace:** `datalogics_interface` ## Description Flags that control how an Element is cloned. ## Values - `None = 0`: Normal copying. - `NoGraphicState = 1`: The copied element does not need a GraphicState. - `CopyClipping = 2`: Acquire the clip path and apply it to the copy. Cannot be combined with NoGraphicState. --- # ElementType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType **Namespace:** `datalogics_interface` ## Description Runtime element type tag returned by Element::get_element_type(). ## Values - `Path = 0`: Vector path (lines, curves, fills, strokes). - `Text = 1`: Composite text element grouping one or more text runs. - `TextRun = 2`: A single run of text in a uniform graphic state. - `Image = 3`: Raster image. - `Form = 4`: XObject form (reusable content stream). - `Container = 5`: Marked-content container; used for tagged-PDF logical structure. - `Group = 6`: Element group with shared graphic state or transparency group. - `PostScript = 7`: Embedded PostScript content. - `Shading = 8`: Smooth-shading element. - `Unknown = 9`: Unrecognized element type. --- # EncodingInfo Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/EncodingInfo ```cpp class EncodingInfo ``` **Namespace:** `datalogics_interface` ## Description Represents a font's encoding data. Encoding is the process that transforms a set of Unicode characters into a series of bytes. With PDF files, Unicode values are used to represent individual character within a font set. Unicode assigns a symbolic value to represent every single character in a wide variety of fonts, scripts, and languages. For example, the Unicode value "U+0041" refers to the capital letter "A" in a Latin script. The EncodingInfo Class is used to provide basic information about an encoding. For example, EncodingInfo could be used to provide just the code name and description for a Unicode standard font or language encoding, like this: IBM860 (Portuguese, DOS) ibm861 (Icelandic, DOS) DOS-862 (Hebrew, DOS) IBM863 (French Canadian, DOS) IBM864 (Arabic, 864) iso-8859-9 (Turkish, ISO) iso-8859-13 (Estonian, ISO) (c)2007 Datalogics Inc. Datalogics is a registered trademark of Datalogics Incorporated. Other company and brand, product and service names are for identification purposes only and may be trademarks or registered trademarks of their respective holders. Data is subject to change without notice. **Referenced by:** [`Font`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md) ## Constructors ### EncodingInfo ```cpp datalogics_interface::EncodingInfo::EncodingInfo(EncodingInfo &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`EncodingInfo &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/EncodingInfo.md)) ### ~EncodingInfo ```cpp datalogics_interface::EncodingInfo::~EncodingInfo() ``` *destructor* ## Methods ### get_char_names ```cpp std::vector< std::string > datalogics_interface::EncodingInfo::get_char_names() const ``` **Returns:** `std::vector< std::string >` container for differences array/character names ### get_encoding_name ```cpp std::string datalogics_interface::EncodingInfo::get_encoding_name() const ``` **Returns:** `std::string` Return the encoding name/cmap name for the font eg: ### operator= ```cpp EncodingInfo & datalogics_interface::EncodingInfo::operator=(EncodingInfo &&) noexcept ``` **Parameters** - (unnamed) ([`EncodingInfo &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/EncodingInfo.md)) **Returns:** [`EncodingInfo &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/EncodingInfo.md) --- # EncryptionType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/EncryptionType **Namespace:** `datalogics_interface` ## Description Encryption types for securing a PDF document. ## Values - `Standard = 0`: Reuse the document's current encryption settings, or use the standard 128-bit encryption. - `AES256 = 1`: Encrypt the document using 256-bit AES encryption for Acrobat 9 or earlier. - `AES256_AcroX = 2`: Encrypt the document using 256-bit AES encryption for Acrobat 10 or later. - `RC4_40 = 3`: Encrypt the document using 40-bit RC4 encryption for Acrobat 5 or later. - `RC4_128 = 4`: Encrypt the document using 128-bit RC4 encryption for Acrobat 5 or later. --- # ExponentialFunction Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExponentialFunction ```cpp class ExponentialFunction : Function ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Function`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md) ## Description An interpolation between two output values as input values vary across a domain. For an Exponential Function, the curve between the two values is determined by the exponent N. ## Constructors ### ExponentialFunction ```cpp datalogics_interface::ExponentialFunction::ExponentialFunction(const std::vector< double > &domain, int n_outputs, const std::vector< double > &c0, const std::vector< double > &c1, double n) ``` *constructor* **Parameters** - `domain` (`const std::vector< double > &`): the domain of the function. 2 elements. - `n_outputs` (`int`): the number of outputs of the function - `c0` (`const std::vector< double > &`): the output value when the input value is 0 - `c1` (`const std::vector< double > &`): the output value when the input value is 1 - `n` (`double`): the exponential factor, which alters the curve of output values as the input values vary across the domain. Create an Exponential Function, which is the exponential interpolation between two output values as the input values vary across the domain. ### ExponentialFunction ```cpp datalogics_interface::ExponentialFunction::ExponentialFunction(ExponentialFunction &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`ExponentialFunction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExponentialFunction.md)) ### ~ExponentialFunction ```cpp datalogics_interface::ExponentialFunction::~ExponentialFunction() override ``` *destructor* ## Methods ### apply ```cpp std::vector< double > datalogics_interface::Function::apply(const std::vector< double > &args) const ``` **Parameters** - `args` (`const std::vector< double > &`): input values for the function. The number of input values must agree with the number of inputs the function takes. **Returns:** `std::vector< double >` a list of the result values from the function Apply the function to supplied input values ### get_c0 ```cpp std::vector< double > datalogics_interface::ExponentialFunction::get_c0() const ``` **Returns:** `std::vector< double >` The values for the function when the input is 0.0. There must be the same number of values as the number of outputs in the function. ### get_c1 ```cpp std::vector< double > datalogics_interface::ExponentialFunction::get_c1() const ``` **Returns:** `std::vector< double >` The values for the function when the input is 1.0. There must be the same number of values as the number of outputs in the function. ### get_domain ```cpp std::vector< double > datalogics_interface::Function::get_domain() const ``` **Returns:** `std::vector< double >` The domain of the function. Contains 2 * m elements, where m is the number of inputs to the function. Each successive pair of elements gives the minimum and maximum values for one of the inputs. Input values to the function are clamped to these minimum and maximum values. ### get_n ```cpp double datalogics_interface::ExponentialFunction::get_n() const ``` **Returns:** `double` The exponential factor N. ### get_n_inputs ```cpp int datalogics_interface::Function::get_n_inputs() const ``` **Returns:** `int` The number of inputs to the function. ### get_n_outputs ```cpp int datalogics_interface::Function::get_n_outputs() const ``` **Returns:** `int` The number of outputs from the function. ### operator= ```cpp ExponentialFunction & datalogics_interface::ExponentialFunction::operator=(ExponentialFunction &&) noexcept ``` **Parameters** - (unnamed) ([`ExponentialFunction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExponentialFunction.md)) **Returns:** [`ExponentialFunction &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExponentialFunction.md) ### set_c0 ```cpp void datalogics_interface::ExponentialFunction::set_c0(const std::vector< double > &c0) ``` **Parameters** - `c0` (`const std::vector< double > &`): the values for the function when the input is 0.0. There must be the same number of values as the number of outputs i... **Returns:** `void` The values for the function when the input is 0.0. There must be the same number of values as the number of outputs in the function. ### set_c1 ```cpp void datalogics_interface::ExponentialFunction::set_c1(const std::vector< double > &c1) ``` **Parameters** - `c1` (`const std::vector< double > &`): the values for the function when the input is 1.0. There must be the same number of values as the number of outputs i... **Returns:** `void` The values for the function when the input is 1.0. There must be the same number of values as the number of outputs in the function. ### set_domain ```cpp void datalogics_interface::Function::set_domain(const std::vector< double > &domain) ``` **Parameters** - `domain` (`const std::vector< double > &`) **Returns:** `void` The domain of the function. Contains 2 * m elements, where m is the number of inputs to the function. Each successive pair of elements gives the minimum and maximum values for one of the inputs. Input values to the function are clamped to these minimum and maximum values. ### set_n ```cpp void datalogics_interface::ExponentialFunction::set_n(double n) ``` **Parameters** - `n` (`double`) **Returns:** `void` The exponential factor N. ### to_string ```cpp std::string datalogics_interface::ExponentialFunction::to_string() const override ``` **Returns:** `std::string` A string representation of the ExponentialFunction, including the number of inputs and outputs, domain, range, N, C0, and C1 values. A string value describing the function. --- # ExtendedGraphicState Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExtendedGraphicState ```cpp class ExtendedGraphicState ``` **Namespace:** `datalogics_interface` ## Description The extended graphic state, to supplement original graphic state. The Graphics State is an internal data structure in a PDF file that holds the parameters that describe graphics within that file. These parameters define how individual graphics are presented on the page, including layers and transparencies. The Extended Graphic State was introduced to expand the original Graphics State data structure, providing space to define and store more data objects within a PDF. **Uses types:** [`BlendMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/BlendMode.md), [`OverprintMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OverprintMode.md) ## Constructors ### ExtendedGraphicState ```cpp datalogics_interface::ExtendedGraphicState::ExtendedGraphicState() ``` *constructor* Create a new default ExtendedGraphicState for the document in which this ExtendedGraphicState will be used. ### ExtendedGraphicState ```cpp datalogics_interface::ExtendedGraphicState::ExtendedGraphicState(ExtendedGraphicState &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`ExtendedGraphicState &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExtendedGraphicState.md)) ### ~ExtendedGraphicState ```cpp datalogics_interface::ExtendedGraphicState::~ExtendedGraphicState() ``` *destructor* ## Methods ### get_alpha_is_shape ```cpp bool datalogics_interface::ExtendedGraphicState::get_alpha_is_shape() const ``` **Returns:** `bool` alphaIsShape - if set true, interpret sources of alpha as shape, else interpret as opacity mask. Returns if the alpha is to be interpreted as a shape or opacity mask. ### get_apply_auto_stroke ```cpp bool datalogics_interface::ExtendedGraphicState::get_apply_auto_stroke() const ``` **Returns:** `bool` true if stroke adjustment is enabled. Returns whether stroke adjustment is enabled in the graphics state. ### get_apply_overprint_for_other_than_stroking ```cpp bool datalogics_interface::ExtendedGraphicState::get_apply_overprint_for_other_than_stroking() const ``` **Returns:** `bool` true if overprint is enabled for non-stroke operations. Returns whether overprint is enabled for operations other than stroking. ### get_apply_overprint_for_stroking ```cpp bool datalogics_interface::ExtendedGraphicState::get_apply_overprint_for_stroking() const ``` **Returns:** `bool` true if overprint is enabled for stroke operations. Returns whether overprint is enabled for stroke operations. ### get_blend_mode ```cpp BlendMode datalogics_interface::ExtendedGraphicState::get_blend_mode() const ``` **Returns:** [`BlendMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/BlendMode.md) blendMode - the blend mode used in object painting. Returns the blend mode for the color composite for each object painted. ### get_opacity_for_other_than_stroking ```cpp double datalogics_interface::ExtendedGraphicState::get_opacity_for_other_than_stroking() const ``` **Returns:** `double` opacity, a value between 0.0 and 1.0. Gets the opacity value for other-than-stroke operations. ### get_opacity_for_stroking ```cpp double datalogics_interface::ExtendedGraphicState::get_opacity_for_stroking() const ``` **Returns:** `double` opacity, a value between 0.0 and 1.0. Gets the opacity value for stroke operations. ### get_overprint_mode ```cpp OverprintMode datalogics_interface::ExtendedGraphicState::get_overprint_mode() const ``` **Returns:** [`OverprintMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OverprintMode.md) The overprint mode setting. Returns the overprint mode setting. Specifies whether a color component value of 0 in a DeviceCMYK color space should erase that component or leave it unchanged when overprinting. ### get_smoothness_tolerance ```cpp double datalogics_interface::ExtendedGraphicState::get_smoothness_tolerance() const ``` **Returns:** `double` tolerance, a value between 0.0 and 1.0. Gets the smoothness tolerance, the quality of smooth shading. ### get_text_knockout ```cpp bool datalogics_interface::ExtendedGraphicState::get_text_knockout() const ``` **Returns:** `bool` enabled - if true, text knockout is enabled. Returns whether text knockout is enabled in the graphics state. ### operator= ```cpp ExtendedGraphicState & datalogics_interface::ExtendedGraphicState::operator=(ExtendedGraphicState &&) noexcept ``` **Parameters** - (unnamed) ([`ExtendedGraphicState &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExtendedGraphicState.md)) **Returns:** [`ExtendedGraphicState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExtendedGraphicState.md) ### set_alpha_is_shape ```cpp void datalogics_interface::ExtendedGraphicState::set_alpha_is_shape(bool alpha_is_shape) ``` **Parameters** - `alpha_is_shape` (`bool`): - if set true, interpret sources of alpha as shape, else interpret as opacity mask. **Returns:** `void` Specifies if the alpha is to be interpreted as a shape or opacity mask. ### set_apply_auto_stroke ```cpp void datalogics_interface::ExtendedGraphicState::set_apply_auto_stroke(bool apply) ``` **Parameters** - `apply` (`bool`): Whether stroke adjustment is enabled. **Returns:** `void` Specifies whether stroke adjustment is enabled in the graphics state. ### set_apply_overprint_for_other_than_stroking ```cpp void datalogics_interface::ExtendedGraphicState::set_apply_overprint_for_other_than_stroking(bool apply) ``` **Parameters** - `apply` (`bool`): Whether to enable overprint for non-stroke operations. **Returns:** `void` Specifies if overprint is enabled for operations other than stroking. ### set_apply_overprint_for_stroking ```cpp void datalogics_interface::ExtendedGraphicState::set_apply_overprint_for_stroking(bool apply) ``` **Parameters** - `apply` (`bool`): Whether to enable overprint for stroke operations. **Returns:** `void` Specifies if overprint is enabled for stroke operations. ### set_blend_mode ```cpp void datalogics_interface::ExtendedGraphicState::set_blend_mode(BlendMode mode) ``` **Parameters** - `mode` ([`BlendMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/BlendMode.md)): - the blend mode used in object painting. **Returns:** `void` Sets the blend mode for the color composites for each object painted. ### set_opacity_for_other_than_stroking ```cpp void datalogics_interface::ExtendedGraphicState::set_opacity_for_other_than_stroking(double opacity) ``` **Parameters** - `opacity` (`double`): - the opacity level, from 0.0 to 1.0, inclusive. **Returns:** `void` Sets the opacity value for other-than-stroke operations. ### set_opacity_for_stroking ```cpp void datalogics_interface::ExtendedGraphicState::set_opacity_for_stroking(double opacity) ``` **Parameters** - `opacity` (`double`): - the opacity level, from 0.0 to 1.0, inclusive. **Returns:** `void` Sets the opacity value for stroke operations. ### set_overprint_mode ```cpp void datalogics_interface::ExtendedGraphicState::set_overprint_mode(OverprintMode mode) ``` **Parameters** - `mode` ([`OverprintMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OverprintMode.md)): The mode setting. **Returns:** `void` The overprint mode setting. Specifies whether a color component value of 0 in a DeviceCMYK color space should erase that component or leave it unchanged when overprinting. ### set_smoothness_tolerance ```cpp void datalogics_interface::ExtendedGraphicState::set_smoothness_tolerance(double tolerance) ``` **Parameters** - `tolerance` (`double`): - the smoothness tolerance, from 0.0 to 1.0, inclusive. **Returns:** `void` Sets the smoothness tolerance, the quality of smooth shading. ### set_text_knockout ```cpp void datalogics_interface::ExtendedGraphicState::set_text_knockout(bool enabled) ``` **Parameters** - `enabled` (`bool`): - if set true, text knockout will be enabled. **Returns:** `void` Specifies whether text knockout is enabled in the graphics state. --- # FileAttachment Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileAttachment ```cpp class FileAttachment ``` **Namespace:** `datalogics_interface` ## Description A file attachment. Any file can be attached to the PDF document. The class allows to create attachment and manipulate by its content. **Uses types:** [`AFRelationship`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AFRelationship.md) ## Constructors ### FileAttachment ```cpp datalogics_interface::FileAttachment::FileAttachment(Document &doc, const std::string &file_name) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The PDF document (reference). - `file_name` (`const std::string &`): The path to file which will be attached to the document. Allows to add attachment into the PDF document. ### FileAttachment ```cpp datalogics_interface::FileAttachment::FileAttachment(Document &doc, const std::string &file_name, const std::string &key_name) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The PDF document (reference). - `file_name` (`const std::string &`): The path to file which will be attached to the document. - `key_name` (`const std::string &`) Allows to add attachment into the PDF document. ### FileAttachment ```cpp datalogics_interface::FileAttachment::FileAttachment(FileAttachment &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`FileAttachment &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileAttachment.md)) ### ~FileAttachment ```cpp datalogics_interface::FileAttachment::~FileAttachment() ``` *destructor* ## Methods ### get_af_relationship ```cpp AFRelationship datalogics_interface::FileAttachment::get_af_relationship() const ``` **Returns:** [`AFRelationship`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AFRelationship.md) The attachment's Associated File relationship. Gets the attachment's Associated File relationship. ### get_file_name ```cpp std::string datalogics_interface::FileAttachment::get_file_name() const ``` **Returns:** `std::string` The attachment's file name. Gets the attachment's file name. ### get_file_size ```cpp size_t datalogics_interface::FileAttachment::get_file_size() const ``` **Returns:** `size_t` The attachment's size in bytes. Gets the attachment's file size. ### operator= ```cpp FileAttachment & datalogics_interface::FileAttachment::operator=(FileAttachment &&) noexcept ``` **Parameters** - (unnamed) ([`FileAttachment &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileAttachment.md)) **Returns:** [`FileAttachment &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileAttachment.md) ### save_to_file ```cpp void datalogics_interface::FileAttachment::save_to_file(const std::string &file_name) ``` **Parameters** - `file_name` (`const std::string &`): The path where attachment will be saved. **Returns:** `void` Allows to save attachment to the specified file. ### set_af_relationship ```cpp void datalogics_interface::FileAttachment::set_af_relationship(AFRelationship relationship) ``` **Parameters** - `relationship` ([`AFRelationship`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AFRelationship.md)): The Associated File relationship to set. **Returns:** `void` Sets the attachment's Associated File relationship. ### update_from_file ```cpp void datalogics_interface::FileAttachment::update_from_file(const std::string &file_name) ``` **Parameters** - `file_name` (`const std::string &`): The path to the file from which attachment will be updated. **Returns:** `void` Allows to update attachment from another file. --- # FileSpecification Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification ```cpp class FileSpecification ``` **Namespace:** `datalogics_interface` ## Description Refers to the location of a PDF file within a file system. The PDF file system is known more commonly as the file path name. The reference can be either absolute, as in a complete path name, or relative to the current place in a directory structure. **Referenced by:** [`LaunchAction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LaunchAction.md), [`RemoteGoToAction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteGoToAction.md) **Uses types:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Constructors ### FileSpecification ```cpp datalogics_interface::FileSpecification::FileSpecification(Document &doc, const std::string &path) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The document in which the file specification is created. - `path` (`const std::string &`): The string corresponding to the path of the file to reference. It may be relative or absolute. Creates a new file specification object. ### FileSpecification ```cpp datalogics_interface::FileSpecification::FileSpecification(FileSpecification &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`FileSpecification &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md)) ### ~FileSpecification ```cpp datalogics_interface::FileSpecification::~FileSpecification() ``` *destructor* ## Methods ### get_path ```cpp std::string datalogics_interface::FileSpecification::get_path() const ``` **Returns:** `std::string` The file path as a string, which may be relative or absolute. Gets the path to the file referenced. ### get_pdf_object ```cpp std::unique_ptr< PDFObject > datalogics_interface::FileSpecification::get_pdf_object() ``` **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The underlying PDFObject for this FileSpecification. Retrieve the PDFObject representation of this object. ### operator= ```cpp FileSpecification & datalogics_interface::FileSpecification::operator=(FileSpecification &&) noexcept ``` **Parameters** - (unnamed) ([`FileSpecification &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md)) **Returns:** [`FileSpecification &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md) ### to_string ```cpp std::string datalogics_interface::FileSpecification::to_string() const ``` **Returns:** `std::string` The path to the file referenced by this FileSpecification. Returns a string representation of this FileSpecification. The returned value is the file path referenced by this specification. --- # FlattenerColorCompression Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerColorCompression **Namespace:** `datalogics_interface` ## Description Enumeration for setting the compression scheme for the Flattened Color images. ## Values - `JPEG = 0`: JPEG compression for flattened color images. - `ZIP = 1`: ZIP (Flate/Deflate) compression for flattened color images. - `JPEG2000 = 2`: JPEG2000 compression for flattened color images. --- # FlattenerGrayCompression Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerGrayCompression **Namespace:** `datalogics_interface` ## Description Enumeration for setting the compression scheme for the Flattened Grayscale images. ## Values - `JPEG = 0`: JPEG compression for flattened grayscale images. - `ZIP = 1`: ZIP (Flate/Deflate) compression for flattened grayscale images. - `JPEG2000 = 2`: JPEG2000 compression for flattened grayscale images. --- # FlattenerMonoCompression Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerMonoCompression **Namespace:** `datalogics_interface` ## Description Enumeration for setting the compression scheme for the Flattened Monochrome images. ## Values - `CCITTGroup3 = 0`: CCITT Group 3 compression for flattened monochrome images. - `CCITTGroup4 = 1`: CCITT Group 4 compression for flattened monochrome images. - `ZIP = 2`: ZIP (Flate/Deflate) compression for flattened monochrome images. - `RunLength = 3`: Run-length encoding compression for flattened monochrome images. --- # FlattenerQualitySetting Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerQualitySetting **Namespace:** `datalogics_interface` ## Description Enumeration for setting the Quality setting for the JPEG or JPEG2000 images. ## Values - `Minimum = 0`: Minimum quality, smallest file size. - `Low = 1`: Low quality. - `Medium = 2`: Medium quality, balancing file size and image quality. - `High = 3`: High quality. - `Maximum = 4`: Maximum quality, largest file size. - `JPEG2000Lossless = 5`: Lossless; valid only for JPEG2000 compression scheme. --- # FlattenTransparencyParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FlattenTransparencyParams ```cpp class FlattenTransparencyParams ``` **Namespace:** `datalogics_interface` ## Description Represents control parameters for flattening transparencies within a PDF file. Class that represents control parameters for flattening transparencies within a PDF file. PDF files can hold objects that are stacked, and that are partially or fully transparent. This means that these objects can blend in various ways with objects behind them. With a stacked set of transparent graphics or images in a PDF file, each one contributing to the final result that appears on the page. One or more graphics images presented together in a stack is referred to as a transparency group. With a stack of transparent images, the final colors shown are the result of blending the colors of all of the overlapping objects. Flatten Transparency merges a stack of transparent objects or graphics into a single image on the PDF page. Flattening images in a PDF file is generally necessary before you can send the document to a printer. The flattening process simplifies the PDF file and may make it smaller as well. **Uses types:** [`FlattenerColorCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerColorCompression.md), [`FlattenerGrayCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerGrayCompression.md), [`FlattenerMonoCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerMonoCompression.md), [`FlattenerQualitySetting`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerQualitySetting.md) ## Constructors ### FlattenTransparencyParams ```cpp datalogics_interface::FlattenTransparencyParams::FlattenTransparencyParams() ``` *constructor* Set up default parameters for flattening transparency. Defaults: UseTextOutlines = false, ConvertStrokesToOutlines = true, ClipComplexRegions = false, InternalDPI = 800, ExternalDPI = 200, PreserveOverprint = true, Quality = 100. ### FlattenTransparencyParams ```cpp datalogics_interface::FlattenTransparencyParams::FlattenTransparencyParams(bool use_text_outlines, bool convert_strokes_to_outlines, bool clip_complex_regions, int internal_dpi, int external_dpi, bool preserve_overprint, int quality) ``` *constructor* **Parameters** - `use_text_outlines` (`bool`) - `convert_strokes_to_outlines` (`bool`) - `clip_complex_regions` (`bool`) - `internal_dpi` (`int`) - `external_dpi` (`int`) - `preserve_overprint` (`bool`) - `quality` (`int`) Set up default parameters for flattening transparency. Defaults: UseTextOutlines = false, ConvertStrokesToOutlines = true, ClipComplexRegions = false, InternalDPI = 800, ExternalDPI = 200, PreserveOverprint = true, Quality = 100. ### FlattenTransparencyParams ```cpp datalogics_interface::FlattenTransparencyParams::FlattenTransparencyParams(const FlattenTransparencyParams &other) ``` *constructor* **Parameters** - `other` ([`const FlattenTransparencyParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FlattenTransparencyParams.md)) Copy constructor. ### FlattenTransparencyParams ```cpp datalogics_interface::FlattenTransparencyParams::FlattenTransparencyParams(FlattenTransparencyParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`FlattenTransparencyParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FlattenTransparencyParams.md)) ### ~FlattenTransparencyParams ```cpp datalogics_interface::FlattenTransparencyParams::~FlattenTransparencyParams() ``` *destructor* ## Methods ### get_clip_complex_regions ```cpp bool datalogics_interface::FlattenTransparencyParams::get_clip_complex_regions() const ``` **Returns:** `bool` If true, ensure that boundaries between vector and rasterized artwork fall along object paths. ### get_color_compression ```cpp FlattenerColorCompression datalogics_interface::FlattenTransparencyParams::get_color_compression() const ``` **Returns:** [`FlattenerColorCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerColorCompression.md) The compression scheme used for flattened color images. Default to JPEGCompression. ### get_color_image_quality ```cpp FlattenerQualitySetting datalogics_interface::FlattenTransparencyParams::get_color_image_quality() const ``` **Returns:** [`FlattenerQualitySetting`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerQualitySetting.md) Quality Setting for Flattened JPEG and JPEG2000 colored Images. This is valid only if the value of ColorCompressionScheme is equal to JPEGCompression or JPEG2000Compression Default value: High ### get_convert_strokes_to_outlines ```cpp bool datalogics_interface::FlattenTransparencyParams::get_convert_strokes_to_outlines() const ``` **Returns:** `bool` If true, convert strokes to outlines. ### get_external_dpi ```cpp int datalogics_interface::FlattenTransparencyParams::get_external_dpi() const ``` **Returns:** `int` Resolution for flattening edges of atomic regions. Range is 1 to 1200. ### get_gray_compression ```cpp FlattenerGrayCompression datalogics_interface::FlattenTransparencyParams::get_gray_compression() const ``` **Returns:** [`FlattenerGrayCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerGrayCompression.md) The compression scheme used for flattened gray images. Default to GrayJPEGCompression. ### get_gray_image_quality ```cpp FlattenerQualitySetting datalogics_interface::FlattenTransparencyParams::get_gray_image_quality() const ``` **Returns:** [`FlattenerQualitySetting`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerQualitySetting.md) Quality Setting for Flattened JPEG and JPEG2000 gray Images. This is valid only if the value of GrayCompressionScheme is equal to GrayJPEGCompression or GrayJPEG2000Compression Default value: High ### get_internal_dpi ```cpp int datalogics_interface::FlattenTransparencyParams::get_internal_dpi() const ``` **Returns:** `int` Resolution for flattening the interior of an atomic region. Range is 1 to 9600. ### get_max_page_flattening_time ```cpp int datalogics_interface::FlattenTransparencyParams::get_max_page_flattening_time() const ``` **Returns:** `int` The maximum allowed time that will be spent flattening a single page. A value less than zero will disable the time limit. A value equal to 0 (default) will set the limit to 120 seconds. A value greater than 0 will set the allowed limit (in seconds). Any value less than 60 seconds will be increased to 60 seconds. ### get_mono_compression ```cpp FlattenerMonoCompression datalogics_interface::FlattenTransparencyParams::get_mono_compression() const ``` **Returns:** [`FlattenerMonoCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerMonoCompression.md) The compression scheme used for flattened monochrome images. Default to MonoCCITTGroup4Compression. ### get_preserve_overprint ```cpp bool datalogics_interface::FlattenTransparencyParams::get_preserve_overprint() const ``` **Returns:** `bool` If true, attempt to preserve overprint. ### get_profile_description ```cpp std::string datalogics_interface::FlattenTransparencyParams::get_profile_description() const ``` **Returns:** `std::string` Represents control parameters for flattening transparencies within a PDF file. Class that represents control parameters for flattening transparencies within a PDF file. PDF files can hold objects that are stacked, and that are partially or fully transparent. This means that these objects can blend in various ways with objects behind them. With a stacked set of transparent graphics or images in a PDF file, each one contributing to the final result that appears on the page. One or more graphics images presented together in a stack is referred to as a transparency group. With a stack of transparent images, the final colors shown are the result of blending the colors of all of the overlapping objects. Flatten Transparency merges a stack of transparent objects or graphics into a single image on the PDF page. Flattening images in a PDF file is generally necessary before you can send the document to a printer. The flattening process simplifies the PDF file and may make it smaller as well. ### get_quality ```cpp int datalogics_interface::FlattenTransparencyParams::get_quality() const ``` **Returns:** `int` The percentage of vector information that is to be preserved. Lower values will cause higher rasterization of vectors. Range is 0 to 100. ### get_use_text_outlines ```cpp bool datalogics_interface::FlattenTransparencyParams::get_use_text_outlines() const ``` **Returns:** `bool` If true, output text outlines instead of native text. ### operator= ```cpp FlattenTransparencyParams & datalogics_interface::FlattenTransparencyParams::operator=(const FlattenTransparencyParams &other) ``` **Parameters** - `other` ([`const FlattenTransparencyParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FlattenTransparencyParams.md)) **Returns:** [`FlattenTransparencyParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FlattenTransparencyParams.md) Copy assignment. ### operator= ```cpp FlattenTransparencyParams & datalogics_interface::FlattenTransparencyParams::operator=(FlattenTransparencyParams &&) noexcept ``` **Parameters** - (unnamed) ([`FlattenTransparencyParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FlattenTransparencyParams.md)) **Returns:** [`FlattenTransparencyParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FlattenTransparencyParams.md) ### set_clip_complex_regions ```cpp void datalogics_interface::FlattenTransparencyParams::set_clip_complex_regions(bool value) ``` **Parameters** - `value` (`bool`): true to ensure that boundaries between vector and rasterized artwork fall along object paths, false otherwise. **Returns:** `void` If true, ensure that boundaries between vector and rasterized artwork fall along object paths. ### set_color_compression ```cpp void datalogics_interface::FlattenTransparencyParams::set_color_compression(FlattenerColorCompression scheme) ``` **Parameters** - `scheme` ([`FlattenerColorCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerColorCompression.md)): the compression scheme used for flattened color images. Default to JPEGCompression **Returns:** `void` The compression scheme used for flattened color images. Default to JPEGCompression. ### set_color_image_quality ```cpp void datalogics_interface::FlattenTransparencyParams::set_color_image_quality(FlattenerQualitySetting quality) ``` **Parameters** - `quality` ([`FlattenerQualitySetting`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerQualitySetting.md)): the quality Setting for Flattened JPEG and JPEG2000 colored Images. This is valid only if the value of ColorCompressi... Default value: High **Returns:** `void` Quality Setting for Flattened JPEG and JPEG2000 colored Images. This is valid only if the value of ColorCompressionScheme is equal to JPEGCompression or JPEG2000Compression ### set_convert_strokes_to_outlines ```cpp void datalogics_interface::FlattenTransparencyParams::set_convert_strokes_to_outlines(bool value) ``` **Parameters** - `value` (`bool`): true to convert strokes to outlines, false otherwise. **Returns:** `void` If true, convert strokes to outlines. ### set_external_dpi ```cpp void datalogics_interface::FlattenTransparencyParams::set_external_dpi(int dpi) ``` **Parameters** - `dpi` (`int`): the resolution for flattening edges of atomic regions. Range is 1 to 1200 **Returns:** `void` Resolution for flattening edges of atomic regions. Range is 1 to 1200. ### set_gray_compression ```cpp void datalogics_interface::FlattenTransparencyParams::set_gray_compression(FlattenerGrayCompression scheme) ``` **Parameters** - `scheme` ([`FlattenerGrayCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerGrayCompression.md)): the compression scheme used for flattened gray images. Default to GrayJPEGCompression **Returns:** `void` The compression scheme used for flattened gray images. Default to GrayJPEGCompression. ### set_gray_image_quality ```cpp void datalogics_interface::FlattenTransparencyParams::set_gray_image_quality(FlattenerQualitySetting quality) ``` **Parameters** - `quality` ([`FlattenerQualitySetting`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerQualitySetting.md)): the quality Setting for Flattened JPEG and JPEG2000 gray Images. This is valid only if the value of GrayCompressionSc... Default value: High **Returns:** `void` Quality Setting for Flattened JPEG and JPEG2000 gray Images. This is valid only if the value of GrayCompressionScheme is equal to GrayJPEGCompression or GrayJPEG2000Compression ### set_internal_dpi ```cpp void datalogics_interface::FlattenTransparencyParams::set_internal_dpi(int dpi) ``` **Parameters** - `dpi` (`int`): the resolution for flattening the interior of an atomic region. Range is 1 to 9600 **Returns:** `void` Resolution for flattening the interior of an atomic region. Range is 1 to 9600. ### set_max_page_flattening_time ```cpp void datalogics_interface::FlattenTransparencyParams::set_max_page_flattening_time(int seconds) ``` **Parameters** - `seconds` (`int`): the maximum allowed time that will be spent flattening a single page. A value less than zero will disable the time li... **Returns:** `void` The maximum allowed time that will be spent flattening a single page. A value less than zero will disable the time limit. A value equal to 0 (default) will set the limit to 120 seconds. A value greater than 0 will set the allowed limit (in seconds). ### set_mono_compression ```cpp void datalogics_interface::FlattenTransparencyParams::set_mono_compression(FlattenerMonoCompression scheme) ``` **Parameters** - `scheme` ([`FlattenerMonoCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FlattenerMonoCompression.md)): the compression scheme used for flattened monochrome images. Default to MonoCCITTGroup4Compression **Returns:** `void` The compression scheme used for flattened monochrome images. Default to MonoCCITTGroup4Compression. ### set_preserve_overprint ```cpp void datalogics_interface::FlattenTransparencyParams::set_preserve_overprint(bool value) ``` **Parameters** - `value` (`bool`): true to attempt to preserve overprint, false otherwise. **Returns:** `void` If true, attempt to preserve overprint. ### set_profile_description ```cpp void datalogics_interface::FlattenTransparencyParams::set_profile_description(const std::string &description) ``` **Parameters** - `description` (`const std::string &`) **Returns:** `void` Represents control parameters for flattening transparencies within a PDF file. Class that represents control parameters for flattening transparencies within a PDF file. PDF files can hold objects that are stacked, and that are partially or fully transparent. This means that these objects can blend in various ways with objects behind them. With a stacked set of transparent graphics or images in a PDF file, each one contributing to the final result that appears on the page. One or more graphics images presented together in a stack is referred to as a transparency group. With a stack of transparent images, the final colors shown are the result of blending the colors of all of the overlapping objects. Flatten Transparency merges a stack of transparent objects or graphics into a single image on the PDF page. Flattening images in a PDF file is generally necessary before you can send the document to a printer. The flattening process simplifies the PDF file and may make it smaller as well. ### set_quality ```cpp void datalogics_interface::FlattenTransparencyParams::set_quality(int quality) ``` **Parameters** - `quality` (`int`): the percentage of vector information to preserve (0-100). Lower values cause higher rasterization of vectors. **Returns:** `void` The percentage of vector information that is to be preserved. Lower values will cause higher rasterization of vectors. Range is 0 to 100. ### set_use_text_outlines ```cpp void datalogics_interface::FlattenTransparencyParams::set_use_text_outlines(bool value) ``` **Parameters** - `value` (`bool`): true to output text outlines instead of native text, false otherwise. **Returns:** `void` If true, output text outlines instead of native text. --- # Font Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font ```cpp class Font ``` **Namespace:** `datalogics_interface` ## Description Represents a font. Defines the typeface, size, style (bold, italic), Unicode values, and other details. The Font class represents a font installed on the system. **Referenced by:** [`Document`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md), [`Font`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md), [`TextRun`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextRun.md), [`WatermarkTextParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkTextParams.md) **Uses types:** [`EncodingInfo`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/EncodingInfo.md), [`Font`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md), [`FontCreateFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FontCreateFlags.md), [`FontFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FontFlags.md), [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md), [`WritingMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WritingMode.md) ## Constructors ### Font ```cpp datalogics_interface::Font::Font(const std::string &font_name) ``` *constructor* **Parameters** - `font_name` (`const std::string &`) Default constructor. Direct construction is prohibited. ### Font ```cpp datalogics_interface::Font::Font(const std::string &font_name, FontCreateFlags flags) ``` *constructor* **Parameters** - `font_name` (`const std::string &`) - `flags` ([`FontCreateFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FontCreateFlags.md)) Default constructor. Direct construction is prohibited. ### Font ```cpp datalogics_interface::Font::Font(const std::string &font_name, FontCreateFlags flags, WritingMode mode) ``` *constructor* **Parameters** - `font_name` (`const std::string &`) - `flags` ([`FontCreateFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FontCreateFlags.md)) - `mode` ([`WritingMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WritingMode.md)) Default constructor. Direct construction is prohibited. ### Font ```cpp datalogics_interface::Font::Font(Font &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Font &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md)) ### ~Font ```cpp datalogics_interface::Font::~Font() ``` *destructor* ## Methods ### embed_now ```cpp void datalogics_interface::Font::embed_now(Document &doc) const ``` **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): the Document the Font is embedded into **Returns:** `void` Embeds the Font. ### find_index_of_first_unrepresentable_char ```cpp unsigned int datalogics_interface::Font::find_index_of_first_unrepresentable_char(const std::string &text) const ``` **Parameters** - `text` (`const std::string &`): the text to check **Returns:** `unsigned int` The index of the first character that cannot be represented in this font. Find the index of the first character that cannot be represented in this font. This will return the index of the first character in the string for which the font has no glyph. If all characters can be represented (i.e. if IsTextRepresentable() would return true), this will return the length of the string. ### get_ascent ```cpp double datalogics_interface::Font::get_ascent() const ``` **Returns:** `double` The Ascent value of the font in glyph space units. the Ascent value from the font descriptor. This is the maximum height above the baseline reached by glyphs in this font, excluding the height of glyphs for accented characters. ### get_avg_width ```cpp double datalogics_interface::Font::get_avg_width() const ``` **Returns:** `double` The AvgWidth value of the font in glyph space units, or 0 if not defined. the AvgWidth value from the font descriptor. This is the average width of glyphs in the font, or 0 if the value is not defined in the font descriptor. ### get_bbox ```cpp Rect datalogics_interface::Font::get_bbox() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The bounding box of the font as a Rect, in glyph space units. The Bounding Box rectangle of the font. ### get_cap_height ```cpp double datalogics_interface::Font::get_cap_height() const ``` **Returns:** `double` The CapHeight value of the font in glyph space units, or 0 if not defined. the CapHeight value from the font descriptor. This is the vertical coordinate of the top of flat capital letters, measured from the baseline, or 0 if the value is not defined in the font descriptor. ### get_cid_font_type ```cpp std::string datalogics_interface::Font::get_cid_font_type() const ``` **Returns:** `std::string` The CID font type, or an empty string if not a CID font. Get the CID font type of the font. ### get_descent ```cpp double datalogics_interface::Font::get_descent() const ``` **Returns:** `double` The descent value of the font. the Descent value from the font descriptor. This is the maximum depth below the baseline reached by glyphs in this font. The value is a negative number. ### get_embedded ```cpp bool datalogics_interface::Font::get_embedded() const ``` **Returns:** `bool` true if the font is embedded, false if it is not. Tests whether the font is embedded in the document it was created for. ### get_encoding ```cpp std::string datalogics_interface::Font::get_encoding() const ``` **Returns:** `std::string` The encoding of the font, eg: WinAnsiEncoding MacRomanEncoding Return the encoding of the font. For a font created from a system font by name, this is the encoding PDFL gives the font when it is written to a document: WinAnsiEncoding on Windows and Linux, MacRomanEncoding on macOS, or Identity-H/V for a Type0 font. Symbolic fonts (Symbol, ZapfDingbats, Wingdings) use their own built-in encoding and return an empty string. ### get_encoding_info ```cpp std::unique_ptr< EncodingInfo > datalogics_interface::Font::get_encoding_info() const ``` **Returns:** [`std::unique_ptr< EncodingInfo >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/EncodingInfo.md) The EncodingInfo object containing encoding details for this font. Get the populated CEncodingInfo object. ### get_flags ```cpp FontFlags datalogics_interface::Font::get_flags() const ``` **Returns:** [`FontFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FontFlags.md) The font descriptor flags as a CFontFlags bitmask. Get the font flags for a font. ### get_font_list ```cpp static std::vector< Font > datalogics_interface::Font::get_font_list() ``` *static* **Returns:** [`std::vector< Font >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md) The list of available fonts. Get a list of available fonts. ### get_full_name ```cpp std::string datalogics_interface::Font::get_full_name() const ``` **Returns:** `std::string` The Full Name of the font. Note: This method only returns a meaningful result for TrueType-based technology fonts. Get the Full Name of the font. ### get_glyph_widths ```cpp std::vector< double > datalogics_interface::Font::get_glyph_widths() const ``` **Returns:** `std::vector< double >` 256 glyph advances in 1000-em character-space units. Retrieve the glyph width table for the font's single-byte encoding. Retrieve the 256-entry glyph width table for this font's single-byte encoding. Values are in character-space units (1000 per em); for the user-space width of character code `c` at font size `s` use `widths[c] * s / 1000.0`. Only meaningful for simple single-byte fonts; CID/Type-0 fonts should use measure_text_width. Returns the 256-entry glyph advance table in character-space units (1000 units per em). For the user-space width of character code c at font size s: widths[c] * s / 1000.0. The returned vector always has 256 entries; positions outside the font's defined encoding are filled with whatever advance the font reports for unmapped codes (typically zero or the missing-glyph advance). This API is therefore only meaningful for simple single-byte fonts — Type 1, TrueType with a simple encoding, etc. CID / Type 0 fonts need per-glyph measurement via MeasureTextWidth instead. ### get_italic_angle ```cpp double datalogics_interface::Font::get_italic_angle() const ``` **Returns:** `double` The ItalicAngle value of the font in degrees. the ItalicAngle value from the font descriptor. This is the angle, expressed in degrees counterclockwise from the vertical, of the dominant vertical strokes of the font, defined in the font descriptor. ### get_leading ```cpp double datalogics_interface::Font::get_leading() const ``` **Returns:** `double` The leading value of the font, or 0 if not present. the Leading value from the font descriptor. This is the spacing between baselines of consecutive lines of text, or 0 if the value is not defined in the font descriptor. ### get_max_width ```cpp double datalogics_interface::Font::get_max_width() const ``` **Returns:** `double` The MaxWidth value of the font in glyph space units, or 0 if not present. the MaxWidth value from the font descriptor. This is the maximum glyph width present in the font, or 0 if the value is not defined in the font descriptor. ### get_missing_width ```cpp double datalogics_interface::Font::get_missing_width() const ``` **Returns:** `double` The MissingWidth value of the font in glyph space units, or 0 if not present. the MissingWidth value from the font descriptor. This is the width given to characters that do not have corresponding glyphs defined in the font, or 0 if the value is not defined in the font descriptor. ### get_name ```cpp std::string datalogics_interface::Font::get_name() const ``` **Returns:** `std::string` The name of the font. Get the name of the font. ### get_pdf_dict ```cpp PDFDict datalogics_interface::Font::get_pdf_dict() const ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The PDFDict for this font's COS dictionary object. Retrieve the PDFDict representation of this font. ### get_stem_h ```cpp double datalogics_interface::Font::get_stem_h() const ``` **Returns:** `double` The StemH value of the font in glyph space units, or 0 if not present. the StemH value from the font descriptor. This is the vertical thickness of the dominant horizontal stems of the font's glyphs, or 0 if the value is not defined in the font descriptor. ### get_stem_v ```cpp double datalogics_interface::Font::get_stem_v() const ``` **Returns:** `double` The StemV value of the font in glyph space units, or 0 if not present. the StemV value from the font descriptor. This is the horizontal thickness of the dominant vertical stems of the font's glyphs, or 0 if the value is not defined in the font descriptor. ### get_type ```cpp std::string datalogics_interface::Font::get_type() const ``` **Returns:** `std::string` The type of the font. Type0 Type1 MMType1 TrueType Get the type of the font. ### get_writing_mode ```cpp WritingMode datalogics_interface::Font::get_writing_mode() const ``` **Returns:** [`WritingMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WritingMode.md) The WritingMode of the font. Get the writing mode of the font. The writing mode of the fontwhether it will place glyphs horizontally or vertically. Text written with this font will run in the direction of the writing mode. ### get_x_height ```cpp double datalogics_interface::Font::get_x_height() const ``` **Returns:** `double` The XHeight value of the font in glyph space units, or 0 if not present. the XHeight value from the font descriptor. This is the vertical coordinate of the top of flat nonascending lowercase letters in fonts that have Latin characters, as measured from the baseline, or 0 if the value is not defined in the font descriptor. ### is_from_doc ```cpp bool datalogics_interface::Font::is_from_doc() const ``` **Returns:** `bool` true if the font was loaded from a document, false if it was created from a system font. Determine whether this font was obtained from an existing document rather than the system. ### is_text_representable ```cpp bool datalogics_interface::Font::is_text_representable(const std::string &text) const ``` **Parameters** - `text` (`const std::string &`): the text to check **Returns:** `bool` true if all characters in the text have corresponding glyphs in this font. Is this text representable in this font? ### measure_text_width ```cpp double datalogics_interface::Font::measure_text_width(const std::string &text, double font_size) const ``` **Parameters** - `text` (`const std::string &`): the Text to be measured - `font_size` (`double`): the Font size to be used **Returns:** `double` The width of the text in points. Measures the width of the specified text in points, using the Font at the specified size. ### operator= ```cpp Font & datalogics_interface::Font::operator=(Font &&) noexcept ``` **Parameters** - (unnamed) ([`Font &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md)) **Returns:** [`Font &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md) --- # FontCreateFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FontCreateFlags **Namespace:** `datalogics_interface` ## Description Flags for creating fonts. ## Values - `Embedded = 0x0001`: Embed the font. By itself, this does not subset the font. - `Subset = 0x0002`: Subset the font. Combine with Embedded; call Document::embed_fonts() to apply. Both flags together produce a CFF font. - `DoNotEmbed = 0x0004`: Do not embed the font. Cannot be combined with Embedded or Subset. - `EncodeByGID = 0x0008`: Create a CIDFont with identity (GID) encoding. - `DeferWidths = 0x0010`: Defer width-table population (Type0 fonts only). - `GIDOverride = 0x0020`: Convert character code to GID with identity embedded. - `ToUnicode = 0x0040`: Create a ToUnicode CMap. - `AllWidths = 0x0080`: Supply the entire widths table (Type0 fonts only). - `EmbedOpenType = 0x0100`: Embed an OpenType-style font subset, when applicable. --- # FontFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/FontFlags **Namespace:** `datalogics_interface` ## Description Font descriptor flags. ## Values - `FixedWidth = 0x1`: All glyphs have the same width (monospaced font). - `Serif = 0x2`: Glyphs have serifs. - `Symbolic = 0x4`: Font uses a custom (non-standard) character set or encoding. - `Script = 0x8`: Glyphs resemble cursive handwriting. - `Standard = 0x20`: Font uses the Adobe standard Latin character set or a subset. - `Italic = 0x40`: Dominant vertical strokes are slanted (italic). - `AllCap = 0x10000`: Font has no lowercase letters; lowercase input maps to uppercase glyphs. - `SmallCap = 0x20000`: Font contains both uppercase and small-capital glyphs for lowercase letters. - `ForceBold = 0x40000`: Bold glyphs drawn with extra stroke width at small pixel sizes. --- # Form Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form ```cpp class Form : Element ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) ## Description Represents a PDF form XObject. This is not to be confused with a PDF fillable form; a Form XObject is an object outside the page content stream. A form XObject is a way to group a number of PDF objects together, into a single container. A Form XObject can hold both text and images, and can be defined once within a PDF file and then reused multiple times in the same PDF, and across multiple pages. **Referenced by:** [`Annotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md), [`CircleAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CircleAnnotation.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`FreeTextAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FreeTextAnnotation.md), [`HighlightAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/HighlightAnnotation.md), [`InkAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/InkAnnotation.md), [`LineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LineAnnotation.md), [`LinkAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LinkAnnotation.md), [`OCREngine`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCREngine.md), [`PolyLineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PolyLineAnnotation.md), [`PolygonAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PolygonAnnotation.md), [`Redaction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Redaction.md), [`SquareAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SquareAnnotation.md), [`TextMarkupAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextMarkupAnnotation.md), [`UnderlineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/UnderlineAnnotation.md) **Uses types:** [`Clip`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md), [`Content`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md), [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md), [`ElementCloneFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags.md), [`ElementType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`GraphicState`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md), [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md), [`OptionalContentMembershipDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentMembershipDict.md), [`PDFStream`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFStream.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### Form ```cpp datalogics_interface::Form::Form(Content &content, Document &document) ``` *constructor* **Parameters** - `content` ([`Content &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md)): The content from which to create the form - `document` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): the document in which the image is intended to be used. Create a form with the given Content. Specifying the document optimizes data usage for this image within that document. ### Form ```cpp datalogics_interface::Form::Form(Form &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Form &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)) ### ~Form ```cpp datalogics_interface::Form::~Form() override ``` *destructor* ## Methods ### clear_content ```cpp void datalogics_interface::Form::clear_content() ``` **Returns:** `void` Removes the content from this form. ### clear_graphic_state ```cpp void datalogics_interface::Form::clear_graphic_state() ``` **Returns:** `void` Removes the graphic state from this form. ### clear_optional_content_membership_dict ```cpp void datalogics_interface::Form::clear_optional_content_membership_dict() ``` **Returns:** `void` Removes the optional content membership dictionary from this form. ### clone ```cpp std::unique_ptr< Element > datalogics_interface::Element::clone(ElementCloneFlags flags) const ``` **Parameters** - `flags` ([`ElementCloneFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags.md)) **Returns:** [`std::unique_ptr< Element >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) The copied element. Makes a copy of the element. Make a copy of an element to obtain a new element that has a distinct set of attributes. Note: TextRun objects may not be cloned. ### clone ```cpp std::unique_ptr< Form > datalogics_interface::Form::clone() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) The newly created form object. Creates a new form from an existing form object. Creates a copy of the Form, including the underlying Content. ### get_bounding_box ```cpp Rect datalogics_interface::Element::get_bounding_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The bounding box for this element. The coordinates of the bounding box are specified in user space coordinates, relative to the element's Content. Note that user space coordinates correspond to unrotated pages; any rotation specified in the page dictionary is not taken into account. The bounding box for this element. The bounding box is a rectangle that is guaranteed to encompass the element, but it is not guaranteed to be the smallest box that could contain the element. For example, if the element is a Path that contains an arc, the bounding box encompasses the bezier control points, and not just the curve itself. ### get_clip ```cpp std::unique_ptr< Clip > datalogics_interface::Element::get_clip() ``` **Returns:** [`std::unique_ptr< Clip >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md) The current Clip for this Element, or NULL if no clip is set. Gets the current Clip for an Element. ### get_content ```cpp std::unique_ptr< Content > datalogics_interface::Form::get_content() const ``` **Returns:** [`std::unique_ptr< Content >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md) The Content of the form. The Content contained in the form. Returns the content associated with this form XObject. ### get_element_type ```cpp ElementType datalogics_interface::Element::get_element_type() const ``` **Returns:** [`ElementType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType.md) Returns the runtime type of this element. ### get_graphic_state ```cpp std::unique_ptr< GraphicState > datalogics_interface::Form::get_graphic_state() ``` **Returns:** [`std::unique_ptr< GraphicState >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md) The GraphicState of this Form, or null if none is set. Get the graphic state of this Form. May return null if this element does not have a GraphicState. ### get_matrix ```cpp Matrix datalogics_interface::Element::get_matrix() const ``` **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) The current transformation matrix applied to this element. The transformation matrix for the element. ### get_optional_content_membership_dict ```cpp std::unique_ptr< OptionalContentMembershipDict > datalogics_interface::Form::get_optional_content_membership_dict() const ``` **Returns:** [`std::unique_ptr< OptionalContentMembershipDict >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentMembershipDict.md) the OptionalContentMembershipDict The OptionalContentMembershipDict property for this Form. Setting this property will attach the Form to an OptionalContentMembershipDict; it will then be associated with the OptionalContentGroups and be subject to the VisibilityPolicy and VisibilityExpression of that MembershipDict. By setting this property to null, the Form is detached from any OptionalContentMembershipDict. ### get_stream ```cpp std::unique_ptr< PDFStream > datalogics_interface::Form::get_stream() ``` **Returns:** [`std::unique_ptr< PDFStream >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFStream.md) The stream associated with the form. Get the stream associated with the form. Returns the underlying PDF stream (COS object) for this form XObject. ### operator= ```cpp Form & datalogics_interface::Form::operator=(Form &&) noexcept ``` **Parameters** - (unnamed) ([`Form &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)) **Returns:** [`Form &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) ### rotate ```cpp void datalogics_interface::Element::rotate(double theta) ``` **Parameters** - `theta` (`double`): The rotation angle in degrees. **Returns:** `void` Rotate an element by theta degrees counterclockwise using the matrix [ cos T sin T -sin T cos T 0 0 ]. ### scale ```cpp void datalogics_interface::Element::scale(double sx, double sy) ``` **Parameters** - `sx` (`double`): The horizontal scale factor. - `sy` (`double`): The vertical scale factor. **Returns:** `void` Scale an element by (sx,sy) units using the matrix [ sx 0 0 sy 0 0 ]. ### set_clip ```cpp void datalogics_interface::Element::set_clip(Clip &clip) ``` **Parameters** - `clip` ([`Clip &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md)): The clip to set as the current clip for this element, or NULL to remove clipping. **Returns:** `void` Sets the current Clip for an Element. ### set_content ```cpp void datalogics_interface::Form::set_content(const Content &content) ``` **Parameters** - `content` ([`const Content &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md)): The new content for the form. **Returns:** `void` Set the Content of the form. Setting new content also dynamically recalculates the form's bounding box. ### set_graphic_state ```cpp void datalogics_interface::Form::set_graphic_state(const GraphicState &gstate) ``` **Parameters** - `gstate` ([`const GraphicState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md)): The new/updated Graphic State for the Form. **Returns:** `void` Set the Graphic State of this Form. ### set_matrix ```cpp void datalogics_interface::Element::set_matrix(const Matrix &matrix) ``` **Parameters** - `matrix` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)): The transformation matrix for the element. **Returns:** `void` Set the transformation matrix for the element. ### set_optional_content_membership_dict ```cpp void datalogics_interface::Form::set_optional_content_membership_dict(const OptionalContentMembershipDict &ocmd) ``` **Parameters** - `ocmd` ([`const OptionalContentMembershipDict &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentMembershipDict.md)): the OptionalContentMembershipDict **Returns:** `void` The OptionalContentMembershipDict property for this Form. Setting this property will attach the Form to an OptionalContentMembershipDict; it will then be associated with the OptionalContentGroups and be subject to the VisibilityPolicy and VisibilityExpression of that MembershipDict. By setting this property to null, the Form is detached from any OptionalContentMembershipDict. ### translate ```cpp void datalogics_interface::Element::translate(double tx, double ty) ``` **Parameters** - `tx` (`double`): The horizontal translation distance in user space units. - `ty` (`double`): The vertical translation distance in user space units. **Returns:** `void` Translate an element by (tx,ty) units using the matrix [ 1 0 0 1 tx ty ]. ### try_as ```cpp T * datalogics_interface::Element::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this element to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Element::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # FreeTextAnnotation Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FreeTextAnnotation ```cpp class FreeTextAnnotation : Annotation ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Annotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md) ## Description The free text annotation allows a user to place text directly on a PDF page. An ordinary text annotation appears in a pop up window, and is attached to an icon; it represents a note added to a PDF file, and can be opened for viewing, or closed. But a free text annotation always appears open on the page. A free text annotation can be included anywhere in a PDF file by specifying the location and the CallOutLine points. **Uses types:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`HorizontalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HorizontalAlignment.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### FreeTextAnnotation ```cpp datalogics_interface::FreeTextAnnotation::FreeTextAnnotation(Page &page, const Rect &rect, const std::string &default_appearance) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the FreeTextAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. - `default_appearance` (`const std::string &`): The default appearance string to be used in formatting the text. Create a new FreeTextAnnotation at the end of a page's annotation array. To create a FreeTextAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### FreeTextAnnotation ```cpp datalogics_interface::FreeTextAnnotation::FreeTextAnnotation(Page &page, const Rect &rect, const std::string &default_appearance, int add_after) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the FreeTextAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. - `default_appearance` (`const std::string &`): The default appearance string to be used in formatting the text. - `add_after` (`int`) Create a new FreeTextAnnotation at the end of a page's annotation array. To create a FreeTextAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### ~FreeTextAnnotation ```cpp datalogics_interface::FreeTextAnnotation::~FreeTextAnnotation() override ``` *destructor* ## Methods ### clear_interior_color ```cpp void datalogics_interface::Annotation::clear_interior_color() ``` **Returns:** `void` Clear the interior color. ### generate_appearance ```cpp virtual std::unique_ptr< Form > datalogics_interface::Annotation::generate_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the visual appearance, or null if the appearance could not be generated. Generate a new appearance stream with the current annotation properties. The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance. ### get_annotation_feature_level ```cpp virtual double datalogics_interface::Annotation::get_annotation_feature_level() const ``` **Returns:** `double` The minimum PDF version level (e.g. 1.3, 1.4, or 1.5). The minimum PDF version necessary to support the features used in this annotation. ### get_border_dash_pattern ```cpp std::vector< double > datalogics_interface::FreeTextAnnotation::get_border_dash_pattern() const ``` **Returns:** `std::vector< double >` An array defining a pattern of dashes and gaps to be used in drawing a dashed border (border style D). The dash array is a series of numbers that specify the lengths of alternating dashes and gaps. Lengths must be nonnegative, and are expressed in user space units. Default value is [3] ### get_border_style ```cpp std::string datalogics_interface::FreeTextAnnotation::get_border_style() const ``` **Returns:** `std::string` The border style. Can be one of: S - Solid D - Dashed. The dash pattern is specified as an array (see DashPattern) B - Beveled I - Inset U - Underline Other border styles may be defined in the future. Default is "S" ### get_border_style_width ```cpp double datalogics_interface::FreeTextAnnotation::get_border_style_width() const ``` **Returns:** `double` The border width in points. If this value is 0, no border is drawn. The default is 1.0. ### get_color ```cpp Color datalogics_interface::Annotation::get_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The annotation's color. The color of the annotation. ### get_contents ```cpp std::string datalogics_interface::Annotation::get_contents() const ``` **Returns:** `std::string` The annotation's text contents. The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### get_default_appearance ```cpp std::string datalogics_interface::FreeTextAnnotation::get_default_appearance() const ``` **Returns:** `std::string` The default appearance string to be used in formatting the text. ### get_flags ```cpp AnnotationFlags datalogics_interface::Annotation::get_flags() const ``` **Returns:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md) The annotation's flags. The flags for the annotation. ### get_font_face ```cpp std::string datalogics_interface::FreeTextAnnotation::get_font_face() const ``` **Returns:** `std::string` current Font face Get Font face for the text ### get_font_size ```cpp double datalogics_interface::FreeTextAnnotation::get_font_size() const ``` **Returns:** `double` current font size Get font size for the text; ### get_interior_color ```cpp std::unique_ptr< Color > datalogics_interface::Annotation::get_interior_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The interior fill color, or null if no interior color is set. The interior color with which to fill the annotation's rectangle or circle. The color of the border itself can be retrieved from Annotation.Color. ### get_normal_appearance ```cpp std::unique_ptr< Form > datalogics_interface::Annotation::get_normal_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the annotation's normal appearance, or null if no normal appearance has been set. The normal appearance of the annotation, represented as a Form XObject. ### get_opacity ```cpp double datalogics_interface::Annotation::get_opacity() const ``` **Returns:** `double` The opacity value for this annotation. The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### get_quadding ```cpp HorizontalAlignment datalogics_interface::FreeTextAnnotation::get_quadding() const ``` **Returns:** [`HorizontalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HorizontalAlignment.md) A code specifiying the form of quadding (justification) to be used in displaying the annotation's text. ### get_rect ```cpp Rect datalogics_interface::Annotation::get_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The annotation's bounding rectangle in user space coordinates. The size and location of the annotation on its page. ### get_subtype ```cpp std::string datalogics_interface::Annotation::get_subtype() const ``` **Returns:** `std::string` The subtype string (e.g. "Circle", "Square", "Line"). The annotation's subtype. ### get_text_color ```cpp Color datalogics_interface::FreeTextAnnotation::get_text_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) color Freetext Annotation's text The text color which used for drawing text ### get_title ```cpp std::string datalogics_interface::Annotation::get_title() const ``` **Returns:** `std::string` The title string. The title of the annotation. ### has_rich_text_data ```cpp bool datalogics_interface::Annotation::has_rich_text_data() const ``` **Returns:** `bool` true if the annotation contains Rich Text String content. Checks the annotation for Rich Text String content (PDFReference 1.7 Section 8.6.2). Annotations that contain Rich Text String content and do not have a normal appearance set will not be visible when rendering the page. ### operator== ```cpp bool datalogics_interface::Annotation::operator==(const Annotation &other) const ``` **Parameters** - `other` ([`const Annotation &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)): The annotation to compare with this annotation. **Returns:** `bool` true if the two annotations are equal. Test annotations for equality (if they are the same annotation). ### set_annotation_feature_level ```cpp virtual void datalogics_interface::Annotation::set_annotation_feature_level(double level) ``` **Parameters** - `level` (`double`): The target PDF version level. Features requiring a higher version will be removed. **Returns:** `void` Removes features not supported in the supplied version number. ### set_border_dash_pattern ```cpp void datalogics_interface::FreeTextAnnotation::set_border_dash_pattern(const std::vector< double > &pattern) ``` **Parameters** - `pattern` (`const std::vector< double > &`): the border style dash pattern **Returns:** `void` ### set_border_style ```cpp void datalogics_interface::FreeTextAnnotation::set_border_style(const std::string &style) ``` **Parameters** - `style` (`const std::string &`): the border style **Returns:** `void` ### set_border_style_width ```cpp void datalogics_interface::FreeTextAnnotation::set_border_style_width(double width) ``` **Parameters** - `width` (`double`): the border style width **Returns:** `void` ### set_color ```cpp void datalogics_interface::Annotation::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new color to set. **Returns:** `void` The color of the annotation. ### set_contents ```cpp void datalogics_interface::Annotation::set_contents(const std::string &contents) ``` **Parameters** - `contents` (`const std::string &`): The new text contents. **Returns:** `void` The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### set_default_appearance ```cpp void datalogics_interface::FreeTextAnnotation::set_default_appearance(const std::string &da) ``` **Parameters** - `da` (`const std::string &`) **Returns:** `void` The default appearance string to be used in formatting the text. ### set_flags ```cpp void datalogics_interface::Annotation::set_flags(AnnotationFlags flags) ``` **Parameters** - `flags` ([`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md)): The new annotation flags to set. **Returns:** `void` The flags for the annotation. ### set_font_face ```cpp void datalogics_interface::FreeTextAnnotation::set_font_face(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): font face for the text **Returns:** `void` Set Font face for the text ### set_font_size ```cpp void datalogics_interface::FreeTextAnnotation::set_font_size(double size) ``` **Parameters** - `size` (`double`): font size for text **Returns:** `void` Set font size for text ### set_interior_color ```cpp void datalogics_interface::Annotation::set_interior_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new interior fill color. Pass null to remove the interior color. **Returns:** `void` The interior color with which to fill the annotation's rectangle or circle. Only RGB colors are allowed. The color of the border itself can be retrieved from Annotation.Color. ### set_normal_appearance ```cpp void datalogics_interface::Annotation::set_normal_appearance(Form &form) ``` **Parameters** - `form` ([`Form &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)): The Form to use as the annotation's normal appearance. **Returns:** `void` The normal appearance of the annotation, represented as a Form XObject. ### set_opacity ```cpp void datalogics_interface::Annotation::set_opacity(double opacity) ``` **Parameters** - `opacity` (`double`): The new opacity value to set. **Returns:** `void` The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### set_quadding ```cpp void datalogics_interface::FreeTextAnnotation::set_quadding(HorizontalAlignment quadding) ``` **Parameters** - `quadding` ([`HorizontalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HorizontalAlignment.md)): a code specifiying the form of quadding (justification) to be used in displaying the annotation's text **Returns:** `void` A code specifiying the form of quadding (justification) to be used in displaying the annotation's text. ### set_rect ```cpp void datalogics_interface::Annotation::set_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The new bounding rectangle in user space coordinates. **Returns:** `void` The size and location of the annotation on its page. ### set_text_color ```cpp void datalogics_interface::FreeTextAnnotation::set_text_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): the text color which used for drawing text **Returns:** `void` The text color which used for drawing text ### set_title ```cpp void datalogics_interface::Annotation::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): The new title string. **Returns:** `void` The title of the annotation. ### to_string ```cpp std::string datalogics_interface::Annotation::to_string() const ``` **Returns:** `std::string` A string describing this annotation, including its type and rectangle. Returns a string representation of this annotation. ### try_as ```cpp T * datalogics_interface::Annotation::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this annotation to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Annotation::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # Function Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function ```cpp class Function ``` **Namespace:** `datalogics_interface` **Derived classes:** [`ExponentialFunction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExponentialFunction.md), [`PostScriptCalculatorFunction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PostScriptCalculatorFunction.md) ## Description A function is a process. A function takes input values and manipulates them to create output values. **Referenced by:** [`DeviceNColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DeviceNColorSpace.md), [`SeparationColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationColorSpace.md) ## Constructors ### Function ```cpp datalogics_interface::Function::Function(Function &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Function &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md)) ### ~Function ```cpp virtual datalogics_interface::Function::~Function() ``` *destructor* ## Methods ### apply ```cpp std::vector< double > datalogics_interface::Function::apply(const std::vector< double > &args) const ``` **Parameters** - `args` (`const std::vector< double > &`): input values for the function. The number of input values must agree with the number of inputs the function takes. **Returns:** `std::vector< double >` a list of the result values from the function Apply the function to supplied input values ### get_domain ```cpp std::vector< double > datalogics_interface::Function::get_domain() const ``` **Returns:** `std::vector< double >` The domain of the function. Contains 2 * m elements, where m is the number of inputs to the function. Each successive pair of elements gives the minimum and maximum values for one of the inputs. Input values to the function are clamped to these minimum and maximum values. ### get_n_inputs ```cpp int datalogics_interface::Function::get_n_inputs() const ``` **Returns:** `int` The number of inputs to the function. ### get_n_outputs ```cpp int datalogics_interface::Function::get_n_outputs() const ``` **Returns:** `int` The number of outputs from the function. ### operator= ```cpp Function & datalogics_interface::Function::operator=(Function &&) noexcept ``` **Parameters** - (unnamed) ([`Function &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md)) **Returns:** [`Function &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md) ### set_domain ```cpp void datalogics_interface::Function::set_domain(const std::vector< double > &domain) ``` **Parameters** - `domain` (`const std::vector< double > &`) **Returns:** `void` The domain of the function. Contains 2 * m elements, where m is the number of inputs to the function. Each successive pair of elements gives the minimum and maximum values for one of the inputs. Input values to the function are clamped to these minimum and maximum values. ### to_string ```cpp virtual std::string datalogics_interface::Function::to_string() const ``` **Returns:** `std::string` A string representation of the function. Convert the function to a displayable string. --- # GoToAction Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GoToAction ```cpp class GoToAction : Action ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Action`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md) ## Description A go-to action can be executed in a PDF document. A go-to action includes a hyperlink that, when clicked, takes the reader to a different place within the same document. The action is linked to a bookmark within the document. A remote go-to action includes a hyperlink that takes the reader to a destination in a separate document. **Uses types:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`ViewDestination`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md) ## Constructors ### GoToAction ```cpp datalogics_interface::GoToAction::GoToAction(Document &doc, const std::string &named_destination) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)) - `named_destination` (`const std::string &`) Create a GoTo action that resolves a named destination at view time. The named destination is looked up in the document's /Names/Dests name tree when the action fires; use NameTree::put(name, dest) (or the equivalent string-keyed put) to register it. ### GoToAction ```cpp datalogics_interface::GoToAction::GoToAction(GoToAction &&) noexcept=default ``` *constructor* **Parameters** - (unnamed) ([`GoToAction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GoToAction.md)) ### GoToAction ```cpp datalogics_interface::GoToAction::GoToAction(ViewDestination &dest) ``` *constructor* **Parameters** - `dest` ([`ViewDestination &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md)): The ViewDestination contained in this class. General constructor ### ~GoToAction ```cpp datalogics_interface::GoToAction::~GoToAction() override ``` *destructor* ## Methods ### clear_destination ```cpp void datalogics_interface::GoToAction::clear_destination() ``` **Returns:** `void` Removes the destination from this action. ### get_destination ```cpp std::unique_ptr< ViewDestination > datalogics_interface::GoToAction::get_destination() const ``` **Returns:** [`std::unique_ptr< ViewDestination >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md) The ViewDestination for this action. The ViewDestination that this go-to action navigates to. ### get_pdf_dict ```cpp PDFDict datalogics_interface::Action::get_pdf_dict() ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The underlying PDF dictionary for this Action. Retrieve the PDFObject representation of this object. ### get_subtype ```cpp std::string datalogics_interface::Action::get_subtype() const ``` **Returns:** `std::string` The subtype string for this action, such as "GoTo", "URI", "Launch", or "GoToR". The action's subtype. ### operator= ```cpp GoToAction & datalogics_interface::GoToAction::operator=(GoToAction &&) noexcept=default ``` **Parameters** - (unnamed) ([`GoToAction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GoToAction.md)) **Returns:** [`GoToAction &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GoToAction.md) ### operator== ```cpp bool datalogics_interface::Action::operator==(const Action &other) const ``` **Parameters** - `other` ([`const Action &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md)) **Returns:** `bool` true if the two objects refer to the same action, false otherwise. Determines whether this Action is equal to another. Two Actions are considered equal if they refer to the same underlying PDF action object. ### set_destination ```cpp void datalogics_interface::GoToAction::set_destination(const ViewDestination &dest) ``` **Parameters** - `dest` ([`const ViewDestination &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md)): The ViewDestination to set, or null to remove. **Returns:** `void` The ViewDestination that this go-to action navigates to. Setting the destination to null removes the destination entry from the action dictionary. ### to_string ```cpp std::string datalogics_interface::Action::to_string() const ``` **Returns:** `std::string` A string describing this Action. Returns a string representation of this Action. The string includes the action's subtype. ### try_as ```cpp T * datalogics_interface::Action::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this action to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Action::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # GraphicState Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState ```cpp class GraphicState ``` **Namespace:** `datalogics_interface` ## Description The graphic state is an internal data structure in a PDF file. The graphics state holds the parameters that describe graphics within that file. These parameters define how individual graphics are presented on the page, including layers and transparencies. **Referenced by:** [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md), [`Path`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Path.md), [`TextRun`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextRun.md) **Uses types:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`LineCap`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineCap.md), [`LineJoin`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineJoin.md), [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md) ## Constructors ### GraphicState ```cpp datalogics_interface::GraphicState::GraphicState() ``` *constructor* Create a new default GraphicState. ### GraphicState ```cpp datalogics_interface::GraphicState::GraphicState(GraphicState &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`GraphicState &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md)) ### ~GraphicState ```cpp datalogics_interface::GraphicState::~GraphicState() ``` *destructor* ## Methods ### clear_extended_graphic_state ```cpp void datalogics_interface::GraphicState::clear_extended_graphic_state() ``` **Returns:** `void` Removes the extended graphic state from this graphic state. ### get_dash_pattern ```cpp std::vector< double > datalogics_interface::GraphicState::get_dash_pattern() const ``` **Returns:** `std::vector< double >` A list containing the dash phase followed by the contents of the DashPattern. The line DashPattern controls the pattern of dashes and gaps used to stroke paths. It is specified by a dash phase and then a series of elements of a DashPattern list. The DashPattern's members are numbers that specify the lengths of alternating dashes and gaps; the numbers must be nonnegative and not all zero. The dash phase specifies the distance into the dash pattern at which to start the dash. The elements of both the DashPattern List and the dash phase are expressed in user space units. This retrieves the DashPattern used by the Pattern list current graphic state. ### get_extended_graphic_state ```cpp ExtendedGraphicState * datalogics_interface::GraphicState::get_extended_graphic_state() ``` **Returns:** [`ExtendedGraphicState *`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExtendedGraphicState.md) The ExtendedGraphicState, or null if none is set. The ExtendedGraphicState associated with this GraphicState. The ExtendedGraphicState can contain additional parameters such as transparency, blend mode, and overprint settings that are not part of the basic GraphicState. DeprecatedNot yet implemented — always returns nullptr ### get_fill_color ```cpp Color datalogics_interface::GraphicState::get_fill_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The current fill color. The color used for filling operations in the current GraphicState. ### get_line_cap ```cpp LineCap datalogics_interface::GraphicState::get_line_cap() const ``` **Returns:** [`LineCap`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineCap.md) The current line cap style. The line cap style used by the current GraphicState, specifying the shape at the ends of open subpaths when stroked. ### get_line_flatness ```cpp double datalogics_interface::GraphicState::get_line_flatness() const ``` **Returns:** `double` The current line flatness value. The line flatness tolerance in the current GraphicState, corresponding to the i operator. Default is 1.0. Flatness controls the maximum distance (in device pixels) between a curve and the flattened line segments that approximate it. ### get_line_join ```cpp LineJoin datalogics_interface::GraphicState::get_line_join() const ``` **Returns:** [`LineJoin`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineJoin.md) The current line join style. The line join style used by the current GraphicState, specifying the shape at the corners where consecutive segments of a path connect at an angle. ### get_miter_limit ```cpp double datalogics_interface::GraphicState::get_miter_limit() const ``` **Returns:** `double` The current miter limit. The miter limit for line joins in the current GraphicState, corresponding to the M operator. Default is 10.0. When two line segments meet at a sharp angle and mitered joins have been specified, the miter limit controls when the join is beveled instead. ### get_render_intent ```cpp RenderIntent datalogics_interface::GraphicState::get_render_intent() const ``` **Returns:** [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md) The current rendering intent. The color rendering intent for the current GraphicState, corresponding to the Intent key in the image dictionary. The default is RelColorimetric. ### get_stroke_color ```cpp Color datalogics_interface::GraphicState::get_stroke_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The current stroke color. The color used for stroking operations in the current GraphicState. ### get_width ```cpp double datalogics_interface::GraphicState::get_width() const ``` **Returns:** `double` The current line width. The line width used for stroking operations by the current GraphicState, in user space units. ### operator= ```cpp GraphicState & datalogics_interface::GraphicState::operator=(GraphicState &&) noexcept ``` **Parameters** - (unnamed) ([`GraphicState &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md)) **Returns:** [`GraphicState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md) ### set_dash_pattern ```cpp void datalogics_interface::GraphicState::set_dash_pattern(const std::vector< double > &pattern) ``` **Parameters** - `pattern` (`const std::vector< double > &`): A list containing the dash phase followed by the contents of the DashPattern. **Returns:** `void` The line DashPattern controls the pattern of dashes and gaps used to stroke paths. It is specified by a dash phase and then a series of elements of a DashPattern list. The DashPattern's members are numbers that specify the lengths of alternating dashes and gaps; the numbers must be nonnegative and not all zero. The dash phase specifies the distance into the dash pattern at which to start the dash. The elements of both the DashPattern List and the dash phase are expressed in user space units. This retrieves the DashPattern used by the Pattern list current graphic state. ### set_extended_graphic_state ```cpp void datalogics_interface::GraphicState::set_extended_graphic_state(const ExtendedGraphicState &egs) ``` **Parameters** - `egs` ([`const ExtendedGraphicState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExtendedGraphicState.md)): The new ExtendedGraphicState, or null to remove it. **Returns:** `void` The ExtendedGraphicState associated with this GraphicState. The ExtendedGraphicState can contain additional parameters such as transparency, blend mode, and overprint settings that are not part of the basic GraphicState. **Note:** The GraphicState copies the EGS internally. ### set_fill_color ```cpp void datalogics_interface::GraphicState::set_fill_color(Color color) ``` **Parameters** - `color` ([`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new fill color. **Returns:** `void` The color used for filling operations in the current GraphicState. The color may be specified in DeviceGray, DeviceRGB, or DeviceCMYK color spaces. ### set_line_cap ```cpp void datalogics_interface::GraphicState::set_line_cap(LineCap cap) ``` **Parameters** - `cap` ([`LineCap`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineCap.md)): The new line cap style. **Returns:** `void` The line cap style used by the current GraphicState, specifying the shape at the ends of open subpaths when stroked. ### set_line_flatness ```cpp void datalogics_interface::GraphicState::set_line_flatness(double flatness) ``` **Parameters** - `flatness` (`double`): The new flatness value. **Returns:** `void` The line flatness tolerance in the current GraphicState, corresponding to the i operator. Default is 1.0. ### set_line_join ```cpp void datalogics_interface::GraphicState::set_line_join(LineJoin join) ``` **Parameters** - `join` ([`LineJoin`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineJoin.md)): The new line join style. **Returns:** `void` The line join style to be used by the current GraphicState, specifying the shape at the corners where consecutive segments of a path connect at an angle. ### set_miter_limit ```cpp void datalogics_interface::GraphicState::set_miter_limit(double limit) ``` **Parameters** - `limit` (`double`): The new miter limit value. **Returns:** `void` The miter limit for line joins in the current GraphicState, corresponding to the M operator. Default is 10.0. ### set_render_intent ```cpp void datalogics_interface::GraphicState::set_render_intent(RenderIntent intent) ``` **Parameters** - `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)): The new rendering intent. **Returns:** `void` The color rendering intent for the current GraphicState, corresponding to the Intent key in the image dictionary. The default is RelColorimetric. ### set_stroke_color ```cpp void datalogics_interface::GraphicState::set_stroke_color(Color color) ``` **Parameters** - `color` ([`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new stroke color. **Returns:** `void` The color used for stroking operations in the current GraphicState. The color may be specified in DeviceGray, DeviceRGB, or DeviceCMYK color spaces. ### set_width ```cpp void datalogics_interface::GraphicState::set_width(double width) ``` **Parameters** - `width` (`double`): The new line width. **Returns:** `void` The line width used for stroking operations by the current GraphicState, in user space units. --- # Group Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Group ```cpp class Group : Element ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) ## Description A set of elements to be used within a PDF document. A Group represents objects in a content object, but it resides in memory. Therefore the group has no state and is not represented in any way in a PDF content stream. When used in a Clip, a group is used to associate Text objects into a single clipping object. **Referenced by:** [`Group`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Group.md) **Uses types:** [`Clip`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md), [`Content`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md), [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md), [`ElementCloneFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags.md), [`ElementType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType.md), [`Group`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Group.md), [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### Group ```cpp datalogics_interface::Group::Group() ``` *constructor* Create a new Group. ### Group ```cpp datalogics_interface::Group::Group(Content *content) ``` *constructor* **Parameters** - `content` ([`Content *`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md)) Create a new Group. ### Group ```cpp datalogics_interface::Group::Group(Group &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Group &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Group.md)) ### ~Group ```cpp datalogics_interface::Group::~Group() override ``` *destructor* ## Methods ### clear_content ```cpp void datalogics_interface::Group::clear_content() ``` **Returns:** `void` Removes the content from this group. ### clone ```cpp std::unique_ptr< Element > datalogics_interface::Element::clone(ElementCloneFlags flags) const ``` **Parameters** - `flags` ([`ElementCloneFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags.md)) **Returns:** [`std::unique_ptr< Element >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) The copied element. Makes a copy of the element. Make a copy of an element to obtain a new element that has a distinct set of attributes. Note: TextRun objects may not be cloned. ### clone ```cpp std::unique_ptr< Group > datalogics_interface::Group::clone() const ``` **Returns:** [`std::unique_ptr< Group >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Group.md) The copied group. Makes a copy of the group. Make a copy of an group to obtain a new group that has a distinct set of attributes. ### get_bounding_box ```cpp Rect datalogics_interface::Element::get_bounding_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The bounding box for this element. The coordinates of the bounding box are specified in user space coordinates, relative to the element's Content. Note that user space coordinates correspond to unrotated pages; any rotation specified in the page dictionary is not taken into account. The bounding box for this element. The bounding box is a rectangle that is guaranteed to encompass the element, but it is not guaranteed to be the smallest box that could contain the element. For example, if the element is a Path that contains an arc, the bounding box encompasses the bezier control points, and not just the curve itself. ### get_clip ```cpp std::unique_ptr< Clip > datalogics_interface::Element::get_clip() ``` **Returns:** [`std::unique_ptr< Clip >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md) The current Clip for this Element, or NULL if no clip is set. Gets the current Clip for an Element. ### get_content ```cpp std::unique_ptr< Content > datalogics_interface::Group::get_content() const ``` **Returns:** [`std::unique_ptr< Content >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md) The Content associated with this Group. Obtain the content of a Group. ### get_element_type ```cpp ElementType datalogics_interface::Element::get_element_type() const ``` **Returns:** [`ElementType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType.md) Returns the runtime type of this element. ### get_matrix ```cpp Matrix datalogics_interface::Element::get_matrix() const ``` **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) The current transformation matrix applied to this element. The transformation matrix for the element. ### operator= ```cpp Group & datalogics_interface::Group::operator=(Group &&) noexcept ``` **Parameters** - (unnamed) ([`Group &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Group.md)) **Returns:** [`Group &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Group.md) ### rotate ```cpp void datalogics_interface::Element::rotate(double theta) ``` **Parameters** - `theta` (`double`): The rotation angle in degrees. **Returns:** `void` Rotate an element by theta degrees counterclockwise using the matrix [ cos T sin T -sin T cos T 0 0 ]. ### scale ```cpp void datalogics_interface::Element::scale(double sx, double sy) ``` **Parameters** - `sx` (`double`): The horizontal scale factor. - `sy` (`double`): The vertical scale factor. **Returns:** `void` Scale an element by (sx,sy) units using the matrix [ sx 0 0 sy 0 0 ]. ### set_clip ```cpp void datalogics_interface::Element::set_clip(Clip &clip) ``` **Parameters** - `clip` ([`Clip &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md)): The clip to set as the current clip for this element, or NULL to remove clipping. **Returns:** `void` Sets the current Clip for an Element. ### set_content ```cpp void datalogics_interface::Group::set_content(const Content &content) ``` **Parameters** - `content` ([`const Content &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md)): The new Content of the group. Must not be null. **Returns:** `void` Set the content of a Group. ### set_matrix ```cpp void datalogics_interface::Element::set_matrix(const Matrix &matrix) ``` **Parameters** - `matrix` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)): The transformation matrix for the element. **Returns:** `void` Set the transformation matrix for the element. ### translate ```cpp void datalogics_interface::Element::translate(double tx, double ty) ``` **Parameters** - `tx` (`double`): The horizontal translation distance in user space units. - `ty` (`double`): The vertical translation distance in user space units. **Returns:** `void` Translate an element by (tx,ty) units using the matrix [ 1 0 0 1 tx ty ]. ### try_as ```cpp T * datalogics_interface::Element::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this element to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Element::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # HighlightAnnotation Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/HighlightAnnotation ```cpp class HighlightAnnotation : TextMarkupAnnotation ``` **Namespace:** `datalogics_interface` **Inherits from:** [`TextMarkupAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextMarkupAnnotation.md) ## Description Allows the user to highlight text appearing on a PDF page. The annotated text is still readable on the PDF, but highlighted in yellow. **Uses types:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`Quad`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### HighlightAnnotation ```cpp datalogics_interface::HighlightAnnotation::HighlightAnnotation(Page &page, const std::vector< Quad > &quads) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the HighlightAnnotation is added. - `quads` ([`const std::vector< Quad > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md)): A list of quads to highlight. Each quad encompasses a word or group of contiguous words in the text underlying the annotation. Create a new HighlightAnnotation at the end of a page's annotation array. To create a FreeTextAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### HighlightAnnotation ```cpp datalogics_interface::HighlightAnnotation::HighlightAnnotation(Page &page, int add_after, const std::vector< Quad > &quads) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the HighlightAnnotation is added. - `add_after` (`int`): A list of quads to highlight. Each quad encompasses a word or group of contiguous words in the text underlying the annotation. - `quads` ([`const std::vector< Quad > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md)) Create a new HighlightAnnotation at the end of a page's annotation array. To create a FreeTextAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### ~HighlightAnnotation ```cpp datalogics_interface::HighlightAnnotation::~HighlightAnnotation() override ``` *destructor* ## Methods ### clear_interior_color ```cpp void datalogics_interface::Annotation::clear_interior_color() ``` **Returns:** `void` Clear the interior color. ### generate_appearance ```cpp virtual std::unique_ptr< Form > datalogics_interface::Annotation::generate_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the visual appearance, or null if the appearance could not be generated. Generate a new appearance stream with the current annotation properties. The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance. ### get_annotated_text ```cpp std::string datalogics_interface::TextMarkupAnnotation::get_annotated_text(bool split_lines=false) ``` **Parameters** - `split_lines` (`bool`): If true, text corresponding to each quadrilateral will be separated by CRLF characters. If false, text corresponding to each quadrilateral will be separated by spaces. **Returns:** `std::string` The text marked by the annotation. The text that is marked by the annotation. Marked text is defined as text which falls within one or more of the quadrilaterals specified by the annotation's QuadPoints entry. If the annotation marks partial words, only those portions of the word that are bounded within the QuadPoints array will be returned. If the annotation marks partial characters, the characters that fall partially within the annotation bounds may not be returned. ### get_annotation_feature_level ```cpp virtual double datalogics_interface::Annotation::get_annotation_feature_level() const ``` **Returns:** `double` The minimum PDF version level (e.g. 1.3, 1.4, or 1.5). The minimum PDF version necessary to support the features used in this annotation. ### get_color ```cpp Color datalogics_interface::Annotation::get_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The annotation's color. The color of the annotation. ### get_contents ```cpp std::string datalogics_interface::Annotation::get_contents() const ``` **Returns:** `std::string` The annotation's text contents. The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### get_flags ```cpp AnnotationFlags datalogics_interface::Annotation::get_flags() const ``` **Returns:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md) The annotation's flags. The flags for the annotation. ### get_interior_color ```cpp std::unique_ptr< Color > datalogics_interface::Annotation::get_interior_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The interior fill color, or null if no interior color is set. The interior color with which to fill the annotation's rectangle or circle. The color of the border itself can be retrieved from Annotation.Color. ### get_normal_appearance ```cpp std::unique_ptr< Form > datalogics_interface::Annotation::get_normal_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the annotation's normal appearance, or null if no normal appearance has been set. The normal appearance of the annotation, represented as a Form XObject. ### get_opacity ```cpp double datalogics_interface::Annotation::get_opacity() const ``` **Returns:** `double` The opacity value for this annotation. The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### get_quads ```cpp std::vector< Quad > datalogics_interface::TextMarkupAnnotation::get_quads() const ``` **Returns:** [`std::vector< Quad >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md) A list of quads to mark. Each quad encompasses a word or group of contiguous words in the text underlying the annotation. ### get_rect ```cpp Rect datalogics_interface::Annotation::get_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The annotation's bounding rectangle in user space coordinates. The size and location of the annotation on its page. ### get_subtype ```cpp std::string datalogics_interface::Annotation::get_subtype() const ``` **Returns:** `std::string` The subtype string (e.g. "Circle", "Square", "Line"). The annotation's subtype. ### get_title ```cpp std::string datalogics_interface::Annotation::get_title() const ``` **Returns:** `std::string` The title string. The title of the annotation. ### has_rich_text_data ```cpp bool datalogics_interface::Annotation::has_rich_text_data() const ``` **Returns:** `bool` true if the annotation contains Rich Text String content. Checks the annotation for Rich Text String content (PDFReference 1.7 Section 8.6.2). Annotations that contain Rich Text String content and do not have a normal appearance set will not be visible when rendering the page. ### operator== ```cpp bool datalogics_interface::Annotation::operator==(const Annotation &other) const ``` **Parameters** - `other` ([`const Annotation &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)): The annotation to compare with this annotation. **Returns:** `bool` true if the two annotations are equal. Test annotations for equality (if they are the same annotation). ### set_annotation_feature_level ```cpp virtual void datalogics_interface::Annotation::set_annotation_feature_level(double level) ``` **Parameters** - `level` (`double`): The target PDF version level. Features requiring a higher version will be removed. **Returns:** `void` Removes features not supported in the supplied version number. ### set_color ```cpp void datalogics_interface::Annotation::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new color to set. **Returns:** `void` The color of the annotation. ### set_contents ```cpp void datalogics_interface::Annotation::set_contents(const std::string &contents) ``` **Parameters** - `contents` (`const std::string &`): The new text contents. **Returns:** `void` The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### set_flags ```cpp void datalogics_interface::Annotation::set_flags(AnnotationFlags flags) ``` **Parameters** - `flags` ([`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md)): The new annotation flags to set. **Returns:** `void` The flags for the annotation. ### set_interior_color ```cpp void datalogics_interface::Annotation::set_interior_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new interior fill color. Pass null to remove the interior color. **Returns:** `void` The interior color with which to fill the annotation's rectangle or circle. Only RGB colors are allowed. The color of the border itself can be retrieved from Annotation.Color. ### set_normal_appearance ```cpp void datalogics_interface::Annotation::set_normal_appearance(Form &form) ``` **Parameters** - `form` ([`Form &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)): The Form to use as the annotation's normal appearance. **Returns:** `void` The normal appearance of the annotation, represented as a Form XObject. ### set_opacity ```cpp void datalogics_interface::Annotation::set_opacity(double opacity) ``` **Parameters** - `opacity` (`double`): The new opacity value to set. **Returns:** `void` The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### set_quads ```cpp void datalogics_interface::TextMarkupAnnotation::set_quads(const std::vector< Quad > &quads) ``` **Parameters** - `quads` ([`const std::vector< Quad > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md)): a list of quads to mark. Each quad encompasses a word or group of contiguous words in the text underlying the annotation **Returns:** `void` A list of quads to mark. Each quad encompasses a word or group of contiguous words in the text underlying the annotation. ### set_rect ```cpp void datalogics_interface::Annotation::set_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The new bounding rectangle in user space coordinates. **Returns:** `void` The size and location of the annotation on its page. ### set_title ```cpp void datalogics_interface::Annotation::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): The new title string. **Returns:** `void` The title of the annotation. ### to_string ```cpp std::string datalogics_interface::Annotation::to_string() const ``` **Returns:** `std::string` A string describing this annotation, including its type and rectangle. Returns a string representation of this annotation. ### try_as ```cpp T * datalogics_interface::Annotation::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this annotation to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Annotation::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # HighlightStyle Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HighlightStyle **Namespace:** `datalogics_interface` ## Description Specifies the visual effect used when a link annotation is activated (clicked). ## Values - `None = 0`: No visual highlight when activated. - `Invert = 1`: Invert the colors inside the link's annotation rectangle. - `Outline = 2`: Invert the annotation's border. - `Push = 3`: Display the annotation as if it were being pushed below its rectangle. --- # HorizontalAlignment Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HorizontalAlignment **Namespace:** `datalogics_interface` ## Description Specifies horizontal alignment (quadding) for text layout. ## Values - `Left = 0`: Text is aligned to the left edge. - `Center = 1`: Text is centered horizontally. - `Right = 2`: Text is aligned to the right edge. --- # ICCBasedColorSpace Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ICCBasedColorSpace ```cpp class ICCBasedColorSpace : ColorSpace ``` **Namespace:** `datalogics_interface` **Inherits from:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) ## Description Works with the ICC color space. The International Color Consortium (ICC) developed the ICC color space in 1993 to serve as a universal standard for for printing or presenting content with digital devices, and across all operating systems and platforms. The ICC color standard applies regardless the hardware or software involved, and is used to make sure that color images and text appear properly on a wide variety of platforms. **Uses types:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md), [`PDFStream`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFStream.md) ## Constructors ### ICCBasedColorSpace ```cpp datalogics_interface::ICCBasedColorSpace::ICCBasedColorSpace(const PDFStream &icc_stream) ``` *constructor* **Parameters** - `icc_stream` ([`const PDFStream &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFStream.md)): stream containing the ICC profile Create an ICC-based color stream. ### ICCBasedColorSpace ```cpp datalogics_interface::ICCBasedColorSpace::ICCBasedColorSpace(const PDFStream &icc_stream, int num_components) ``` *constructor* **Parameters** - `icc_stream` ([`const PDFStream &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFStream.md)): stream containing the ICC profile - `num_components` (`int`): The number of components (1, 3, or 4) Create an ICC-based color stream. ## Methods ### get_alternate ```cpp std::unique_ptr< ColorSpace > datalogics_interface::ICCBasedColorSpace::get_alternate() const ``` **Returns:** [`std::unique_ptr< ColorSpace >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) An alternate color space to be used in case the one specified in the stream data is not supported (for example, by applications designed for earlier versions of PDF). The alternate space may be any valid color space (except a Pattern color space) that has the number of components specified by N. If this entry is omitted and the application does not understand the ICC profile data, the color space used is DeviceGray, DeviceRGB, or DeviceCMYK, depending on whether the value of N is 1, 3, or 4, respectively. ### get_name ```cpp std::string datalogics_interface::ColorSpace::get_name() const ``` **Returns:** `std::string` The name of the color space. A named color space may be named something like DeviceRGB. More complicated color spaces may have a name like Indexed or ICCBased. ### get_num_components ```cpp int datalogics_interface::ColorSpace::get_num_components() const ``` **Returns:** `int` The number of color components. The number of components in the color space. For example, DeviceGray has 1 component, DeviceRGB has 3, and DeviceCMYK has 4. ### get_pdf_object ```cpp std::unique_ptr< PDFObject > datalogics_interface::ColorSpace::get_pdf_object() const ``` **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The PDFObject associated with the color space. Get the PDFObject associated with the color space. This may be a PDFName, PDFDict, PDFStream, or PDFArray. ### get_range ```cpp std::vector< double > datalogics_interface::ICCBasedColorSpace::get_range() const ``` **Returns:** `std::vector< double >` An array of 2 * NumComponents numbers [ min0 max0 min1 max1 ... ] specifying the minimum and maximum valid values of the corresponding color components. These values must match the information in the ICC profile. Default value: [ 0.0 1.0 0.0 1.0 ... ] ### get_stream ```cpp std::unique_ptr< PDFStream > datalogics_interface::ICCBasedColorSpace::get_stream() const ``` **Returns:** [`std::unique_ptr< PDFStream >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFStream.md) The PDFStream containing the ICC-based data and other attributes. ### operator== ```cpp virtual bool datalogics_interface::ColorSpace::operator==(const ColorSpace &other) const ``` **Parameters** - `other` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): The ColorSpace to compare against. **Returns:** `bool` true if the two color spaces are equal, false otherwise. Test for equality. This works best for named color spaces. More complex color spaces (such as ICCBased) do not support equality testing and will always return false. ### set_alternate ```cpp void datalogics_interface::ICCBasedColorSpace::set_alternate(ColorSpace &alternate) ``` **Parameters** - `alternate` ([`ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): an alternate color space to be used in case the one specified in the stream data is not supported (for example, by ap... value of N is 1, 3, or 4, respectively. **Returns:** `void` An alternate color space to be used in case the one specified in the stream data is not supported (for example, by applications designed for earlier versions of PDF). The alternate space may be any valid color space (except a Pattern color space) that has the number of components specified by N. If this entry is omitted and the application does not understand the ICC profile data, the color space used is DeviceGray, DeviceRGB, or DeviceCMYK, depending on whether the ### set_range ```cpp void datalogics_interface::ICCBasedColorSpace::set_range(const std::vector< double > &range) ``` **Parameters** - `range` (`const std::vector< double > &`): an array of 2 * NumComponents numbers [ min0 max0 min1 max1 ... ] specifying the minimum and maximum valid values of... **Returns:** `void` An array of 2 * NumComponents numbers [ min0 max0 min1 max1 ... ] specifying the minimum and maximum valid values of the corresponding color components. These values must match the information in the ICC profile. Default value: [ 0.0 1.0 0.0 1.0 ... ] ### to_string ```cpp std::string datalogics_interface::ColorSpace::to_string() const ``` **Returns:** `std::string` A string describing this ColorSpace. Convert a ColorSpace to a string representation. --- # Image Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image ```cpp class Image : Element ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) ## Description An image resource can either be an image XObject or inline image found in a page's content stream. An Image Xobject is stored separately from the graphics content stream in a PDF, and so can be used multiple times in the document, even across pages. The image is described in the /Xobject entry in the resources dictionary on the PDF page. Image size and resoultion: For images that are imported from raster image files, the design width and height are stored in the Image object's Matrix, in the A (width) and D (depth) Matrix members, when the image is imported. These are stored in PDF units. To derive the effective resolution of an image imported from a raster image file: Horizontal resolution: divide the Image Width by the Image's Matrix A member and multiply by 72 to scale to DPI (dots per inch). Vertical resolution: divide the Image Height by the Image's Matrix D member and multiply by 72 to scale to DPI (dots per inch). **Referenced by:** [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md), [`ImageCollection`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageCollection.md), [`Page`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md) **Uses types:** [`Clip`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md), [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md), [`CompressionCode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CompressionCode.md), [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md), [`ElementCloneFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags.md), [`ElementType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType.md), [`GraphicState`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md), [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md), [`ImageData`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageData.md), [`ImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ImageType.md), [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### Image ```cpp datalogics_interface::Image::Image(const std::string &file_name) ``` *constructor* **Parameters** - `file_name` (`const std::string &`): the filename of the image file. Create a new Image from an existing physical file. This file can be a bitmap, gif, jpeg, png, or a tiff file. An exception will be thrown if the image file is not any of the above. NOTICE on tiff files: If the tiff file is multi-paged, then the first "page" only of the file will be converted to an Image. See ImageCollection to convert each page in a multi-page tiff file to an Image. ### Image ```cpp datalogics_interface::Image::Image(const std::string &file_name, class Document &document) ``` *constructor* **Parameters** - `file_name` (`const std::string &`): the filename of the image file. - `document` ([`class Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)) Create a new Image from an existing physical file. This file can be a bitmap, gif, jpeg, png, or a tiff file. An exception will be thrown if the image file is not any of the above. NOTICE on tiff files: If the tiff file is multi-paged, then the first "page" only of the file will be converted to an Image. See ImageCollection to convert each page in a multi-page tiff file to an Image. ### Image ```cpp datalogics_interface::Image::Image(const std::vector< unsigned char > &buffer, int width, int height, const ColorSpace &color_space) ``` *constructor* **Parameters** - `buffer` (`const std::vector< unsigned char > &`): the filename of the image file. - `width` (`int`) - `height` (`int`) - `color_space` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)) Create a new Image from an existing physical file. This file can be a bitmap, gif, jpeg, png, or a tiff file. An exception will be thrown if the image file is not any of the above. NOTICE on tiff files: If the tiff file is multi-paged, then the first "page" only of the file will be converted to an Image. See ImageCollection to convert each page in a multi-page tiff file to an Image. ### Image ```cpp datalogics_interface::Image::Image(Image &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Image &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md)) ### Image ```cpp datalogics_interface::Image::Image(std::istream &input_stream) ``` *constructor* **Parameters** - `input_stream` (`std::istream &`) Create an Image from an input stream containing image data. Supports TIFF, JPEG, BMP, PNG, GIF formats. The stream only needs to remain valid for the duration of construction. ### Image ```cpp datalogics_interface::Image::Image(std::istream &input_stream, Document &document) ``` *constructor* **Parameters** - `input_stream` (`std::istream &`) - `document` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)) Create an Image from an input stream, optimized for a specific document. ### ~Image ```cpp datalogics_interface::Image::~Image() override ``` *destructor* ## Methods ### change_resolution ```cpp Image datalogics_interface::Image::change_resolution(int dpi) ``` **Parameters** - `dpi` (`int`): - the new resolution **Returns:** [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md) newimage - the original image modified to the new resolution. Create a new image from an existing one modifying the resolution (dots per inch) ### clone ```cpp std::unique_ptr< Element > datalogics_interface::Element::clone(ElementCloneFlags flags) const ``` **Parameters** - `flags` ([`ElementCloneFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags.md)) **Returns:** [`std::unique_ptr< Element >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) The copied element. Makes a copy of the element. Make a copy of an element to obtain a new element that has a distinct set of attributes. Note: TextRun objects may not be cloned. ### clone ```cpp std::unique_ptr< Image > datalogics_interface::Image::clone() const ``` **Returns:** [`std::unique_ptr< Image >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md) The copied image. Makes a copy of the image. Make a copy of an image to obtain a new image that has a distinct set of attributes. ### get_bits_per_component ```cpp int datalogics_interface::Image::get_bits_per_component() const ``` **Returns:** `int` The number of bits per component (e.g. 1, 2, 4, 8, or 16). The number of bits per component in the image. ### get_bounding_box ```cpp Rect datalogics_interface::Element::get_bounding_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The bounding box for this element. The coordinates of the bounding box are specified in user space coordinates, relative to the element's Content. Note that user space coordinates correspond to unrotated pages; any rotation specified in the page dictionary is not taken into account. The bounding box for this element. The bounding box is a rectangle that is guaranteed to encompass the element, but it is not guaranteed to be the smallest box that could contain the element. For example, if the element is a Path that contains an arc, the bounding box encompasses the bezier control points, and not just the curve itself. ### get_clip ```cpp std::unique_ptr< Clip > datalogics_interface::Element::get_clip() ``` **Returns:** [`std::unique_ptr< Clip >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md) The current Clip for this Element, or NULL if no clip is set. Gets the current Clip for an Element. ### get_color_space ```cpp std::unique_ptr< ColorSpace > datalogics_interface::Image::get_color_space() const ``` **Returns:** [`std::unique_ptr< ColorSpace >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) return the ColorSpace with which this Image was created. ### get_compression ```cpp CompressionCode datalogics_interface::Image::get_compression() const ``` **Returns:** [`CompressionCode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CompressionCode.md) A compression code which represents the filter used in the image data. The compression filter applied to the image data. ### get_data ```cpp std::vector< unsigned char > datalogics_interface::Image::get_data() const ``` **Returns:** `std::vector< unsigned char >` A byte array containing the raw image data. The actual bytes that make up the image, exactly as they appear in the image data. ### get_did_warnings_occur_during_import ```cpp bool datalogics_interface::Image::get_did_warnings_occur_during_import() const ``` **Returns:** `bool` true if warnings were generated during the image import process, false otherwise. Indicates whether warnings occurred during import of the raster image file. ### get_element_type ```cpp ElementType datalogics_interface::Element::get_element_type() const ``` **Returns:** [`ElementType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType.md) Returns the runtime type of this element. ### get_graphic_state ```cpp GraphicState datalogics_interface::Image::get_graphic_state() ``` **Returns:** [`GraphicState`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md) The GraphicState associated with this image element. The graphic state of the current element. ### get_height ```cpp int datalogics_interface::Image::get_height() const ``` **Returns:** `int` The height of the image in pixels. The height of the image in pixels. ### get_intent ```cpp std::string datalogics_interface::Image::get_intent() const ``` **Returns:** `std::string` The rendering intent name as a string. The color rendering intent for the image. ### get_is_image_mask ```cpp bool datalogics_interface::Image::get_is_image_mask() const ``` **Returns:** `bool` true if the image is an image mask, false otherwise. Indicates whether this image is an image mask. An image mask is a 1-bit-per-pixel image used to select painting in the current color rather than displaying image samples. ### get_large_data ```cpp std::vector< ImageData > datalogics_interface::Image::get_large_data() ``` **Returns:** [`std::vector< ImageData >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageData.md) A list of ImageData chunks containing the decompressed image data. Gets the decompressed image data from very large images. NOTE: This function is only supported in 64-bit, only if enough contiguous memory is available. The data size must exceed nearly 2GB, otherwise an exception is thrown and you would use the Data member instead to access the image data. The first members of the list returned contain a close to 2GB chunk of the data, but the last member containing the remaining data will be smaller in size. This facilitates retrieving the data in .NET and Java which have 2GB limits on object sizes. ### get_matrix ```cpp Matrix datalogics_interface::Element::get_matrix() const ``` **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) The current transformation matrix applied to this element. The transformation matrix for the element. ### get_number_components ```cpp int datalogics_interface::Image::get_number_components() const ``` **Returns:** `int` The number of color components (e.g. 1 for grayscale, 3 for RGB, 4 for CMYK). The number of color components in the image. ### get_soft_mask ```cpp std::unique_ptr< Image > datalogics_interface::Image::get_soft_mask() const ``` **Returns:** [`std::unique_ptr< Image >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md) image - an image, the soft mask Gets, for this image, the soft mask (also an image). ### get_width ```cpp int datalogics_interface::Image::get_width() const ``` **Returns:** `int` The width of the image in pixels. The width of the image in pixels. ### get_xmp_metadata ```cpp std::string datalogics_interface::Image::get_xmp_metadata() const ``` **Returns:** `std::string` Returns XMP metadata from the image's stream dictionary, or empty string if none. ### operator= ```cpp Image & datalogics_interface::Image::operator=(Image &&) noexcept ``` **Parameters** - (unnamed) ([`Image &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md)) **Returns:** [`Image &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md) ### rotate ```cpp void datalogics_interface::Element::rotate(double theta) ``` **Parameters** - `theta` (`double`): The rotation angle in degrees. **Returns:** `void` Rotate an element by theta degrees counterclockwise using the matrix [ cos T sin T -sin T cos T 0 0 ]. ### save ```cpp void datalogics_interface::Image::save(const std::string &filename, ImageType type) ``` **Parameters** - `filename` (`const std::string &`): - The physical image file which will be created. - `type` ([`ImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ImageType.md)): - The ImageType used for saving the image. **Returns:** `void` Save an image into a particular file format with the given parameters for saving. ### save ```cpp void datalogics_interface::Image::save(const std::string &filename, ImageType type, const ImageSaveParams ¶ms) ``` **Parameters** - `filename` (`const std::string &`): - The physical image file which will be created. - `type` ([`ImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ImageType.md)): - The ImageType used for saving the image. - `params` ([`const ImageSaveParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageSaveParams.md)): - The ImageSaveParams for saving the image. **Returns:** `void` Save an image into a particular file format with the given parameters for saving. ### scale ```cpp void datalogics_interface::Element::scale(double sx, double sy) ``` **Parameters** - `sx` (`double`): The horizontal scale factor. - `sy` (`double`): The vertical scale factor. **Returns:** `void` Scale an element by (sx,sy) units using the matrix [ sx 0 0 sy 0 0 ]. ### set_clip ```cpp void datalogics_interface::Element::set_clip(Clip &clip) ``` **Parameters** - `clip` ([`Clip &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md)): The clip to set as the current clip for this element, or NULL to remove clipping. **Returns:** `void` Sets the current Clip for an Element. ### set_compression ```cpp void datalogics_interface::Image::set_compression(CompressionCode code) ``` **Parameters** - `code` ([`CompressionCode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CompressionCode.md)): The new new compression scheme to be applied. **Returns:** `void` Set a Compression scheme for the image data. To apply a G3 or G4 filter, the image must be bi-color (black and white) and 1 bit per pixel. ### set_graphic_state ```cpp void datalogics_interface::Image::set_graphic_state(GraphicState gs) ``` **Parameters** - `gs` ([`GraphicState`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md)): - the new/updated Graphic State for the element. **Returns:** `void` Set the Graphic State of the current element. ### set_intent ```cpp void datalogics_interface::Image::set_intent(const std::string &intent) ``` **Parameters** - `intent` (`const std::string &`): the intent name **Returns:** `void` SetIntent allows to set color rendering intent for the image. ### set_matrix ```cpp void datalogics_interface::Element::set_matrix(const Matrix &matrix) ``` **Parameters** - `matrix` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)): The transformation matrix for the element. **Returns:** `void` Set the transformation matrix for the element. ### set_soft_mask ```cpp void datalogics_interface::Image::set_soft_mask(Image &mask) ``` **Parameters** - `mask` ([`Image &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md)): - an image, the soft mask. If set to NULL, the soft mask is removed. **Returns:** `void` Sets, for this image, the soft mask (also an image). ### translate ```cpp void datalogics_interface::Element::translate(double tx, double ty) ``` **Parameters** - `tx` (`double`): The horizontal translation distance in user space units. - `ty` (`double`): The vertical translation distance in user space units. **Returns:** `void` Translate an element by (tx,ty) units using the matrix [ 1 0 0 1 tx ty ]. ### try_as ```cpp T * datalogics_interface::Element::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this element to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Element::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # ImageCollection Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageCollection ```cpp class ImageCollection ``` **Namespace:** `datalogics_interface` ## Description An image collection can hold multiple images, created from an image file. The full set of images in the collection can be saved to a single image file, but only as a .tif image file. For any other file type (JPG, PNG, and so on), the collection can only be saved as one image object per file. **Referenced by:** [`Page`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md) **Uses types:** [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md), [`ImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ImageType.md) ## Constructors ### ImageCollection ```cpp datalogics_interface::ImageCollection::ImageCollection() ``` *constructor* Create an empty image collection, which can have Image objects added to it. ### ImageCollection ```cpp datalogics_interface::ImageCollection::ImageCollection(const std::string &file_name) ``` *constructor* **Parameters** - `file_name` (`const std::string &`) Create an empty image collection, which can have Image objects added to it. ### ImageCollection ```cpp datalogics_interface::ImageCollection::ImageCollection(ImageCollection &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`ImageCollection &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageCollection.md)) ### ~ImageCollection ```cpp datalogics_interface::ImageCollection::~ImageCollection() ``` *destructor* ## Methods ### append ```cpp void datalogics_interface::ImageCollection::append(Image image) ``` **Parameters** - `image` ([`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md)): the Image object to be inserted. **Returns:** `void` Insert the given Image object at the end of the ImageCollection. ### get_count ```cpp int datalogics_interface::ImageCollection::get_count() const ``` **Returns:** `int` The count of Image objects in the collection. Gets the number of Image objects in this collection. ### get_image ```cpp Image datalogics_interface::ImageCollection::get_image(int index) const ``` **Parameters** - `index` (`int`): the index of the Image to be retrieved. **Returns:** [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md) the Image object at the specified index. Retrieve the Image object at the specified index. Note that an exception will be generated if an index is given which is out of range. ### operator= ```cpp ImageCollection & datalogics_interface::ImageCollection::operator=(ImageCollection &&) noexcept ``` **Parameters** - (unnamed) ([`ImageCollection &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageCollection.md)) **Returns:** [`ImageCollection &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageCollection.md) ### save ```cpp void datalogics_interface::ImageCollection::save(const std::string &filename, ImageType type) ``` **Parameters** - `filename` (`const std::string &`): the file which to save the image. - `type` ([`ImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ImageType.md)): the image type to which to be saved. NOTE: The resolution of the first Image in the collection is used as the target Resolution for saving. (Support for saving multiple, different resolutions isn't available) **Returns:** `void` Save the images in the collection to the specified file and image type. Multiple images can only be save to an image type of TIFF, otherwise an exception will be thrown. ### save ```cpp void datalogics_interface::ImageCollection::save(const std::string &filename, ImageType type, const ImageSaveParams ¶ms) ``` **Parameters** - `filename` (`const std::string &`): the file which to save the image. - `type` ([`ImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ImageType.md)): the image type to which to be saved. NOTE: The resolution of the first Image in the collection is used as the target Resolution for saving. (Support for saving multiple, different resolutions isn't available) - `params` ([`const ImageSaveParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageSaveParams.md)) **Returns:** `void` Save the images in the collection to the specified file and image type. Multiple images can only be save to an image type of TIFF, otherwise an exception will be thrown. --- # ImageData Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageData ```cpp class ImageData ``` **Namespace:** `datalogics_interface` ## Description A class representing the decompressed Image Data. **Referenced by:** [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md) ## Constructors ### ImageData ```cpp datalogics_interface::ImageData::ImageData(ImageData &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`ImageData &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageData.md)) ### ~ImageData ```cpp datalogics_interface::ImageData::~ImageData() ``` *destructor* ## Methods ### get_raw_data ```cpp std::vector< unsigned char > datalogics_interface::ImageData::get_raw_data() const ``` **Returns:** `std::vector< unsigned char >` A byte array containing the uncompressed image pixel data. Gets the raw bytes of the decompressed image data. ### operator= ```cpp ImageData & datalogics_interface::ImageData::operator=(ImageData &&) noexcept ``` **Parameters** - (unnamed) ([`ImageData &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageData.md)) **Returns:** [`ImageData &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageData.md) --- # ImageSaveParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageSaveParams ```cpp class ImageSaveParams ``` **Namespace:** `datalogics_interface` ## Description Class that defines parameters for saving an image to a graphics file. The parameters include the file type (such as PNG or JPG), compression, image quality, and gray scale. **Uses types:** [`CompressionCode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CompressionCode.md), [`TIFFByteOrder`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TIFFByteOrder.md) ## Constructors ### ImageSaveParams ```cpp datalogics_interface::ImageSaveParams::ImageSaveParams() ``` *constructor* Default constructor. All options are initialised to defaults. ### ImageSaveParams ```cpp datalogics_interface::ImageSaveParams::ImageSaveParams(ImageSaveParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`ImageSaveParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageSaveParams.md)) ### ~ImageSaveParams ```cpp datalogics_interface::ImageSaveParams::~ImageSaveParams() ``` *destructor* ## Methods ### get_compression ```cpp CompressionCode datalogics_interface::ImageSaveParams::get_compression() const ``` **Returns:** [`CompressionCode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CompressionCode.md) The compression code currently set. The default is CompressionCode.Default. Gets the type of compression to be used in saving the image to a file. ### get_disable_alpha_channel_generation ```cpp bool datalogics_interface::ImageSaveParams::get_disable_alpha_channel_generation() const ``` **Returns:** `bool` true if alpha channel generation is disabled, false otherwise. Gets whether alpha channel generation is disabled for the output image. When false, RGB image data with a Mask will be combined as RGBA + Alpha Channel output (32-bit). When true, the Mask is not combined and the output is RGB (24-bit). This is only valid for TIFF and PNG output formats. ### get_halftone_gray_images ```cpp bool datalogics_interface::ImageSaveParams::get_halftone_gray_images() const ``` **Returns:** `bool` true if halftone conversion is enabled, false otherwise. Gets whether grayscale images are converted to halftone. When true, converts 8bpc grayscale images to 1bpc (B/W) images using a 45 degree line screen set for 106lpi at 600dpi. Note this can only be set to true for an image of ColorSpace of DeviceGray. ### get_jpeg_quality ```cpp int datalogics_interface::ImageSaveParams::get_jpeg_quality() const ``` **Returns:** `int` The JPEG quality value (0-100). The default is 0. Gets the quality of a JPEG output image. ### get_monochrome_threshold ```cpp unsigned char datalogics_interface::ImageSaveParams::get_monochrome_threshold() const ``` **Returns:** `unsigned char` The monochrome threshold value (0-255). The default is 128. Gets the threshold for determining which bits are white or black for Monochrome output. Note: this is only valid for TIF Images using G3 or G4 compression and HalftoneGrayImages must be set to false. ### get_raise_exception_if_not_usable_color ```cpp bool datalogics_interface::ImageSaveParams::get_raise_exception_if_not_usable_color() const ``` **Returns:** `bool` true if an exception will be raised for unsupported color formats, false otherwise. Gets whether an exception is raised if the image color format is not natively supported. When true, an exception will be raised if the image being saved is not in a format this graphic form can save natively. When false, the image will be automatically converted into a form that can be saved natively (generally DeviceRGB using the sRGB profile). ### get_reverse_gray ```cpp bool datalogics_interface::ImageSaveParams::get_reverse_gray() const ``` **Returns:** `bool` true if the grayscale output will be reversed, false otherwise. Gets whether the GrayScale output is reversed. Note this is only valid for an image with a DeviceGray Colorspace. ### get_tiff_black_is_one ```cpp bool datalogics_interface::ImageSaveParams::get_tiff_black_is_one() const ``` **Returns:** `bool` true if the TIFF image is photometrically reversed, false otherwise. Gets whether a TIFF file is photometrically reversed. Note this is only valid for a 1-bit TIFF image with a DeviceGray Colorspace. ### get_tiff_byte_order ```cpp TIFFByteOrder datalogics_interface::ImageSaveParams::get_tiff_byte_order() const ``` **Returns:** [`TIFFByteOrder`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TIFFByteOrder.md) The current TIFF byte order setting. Gets the byte order used within the TIFF file. This is only valid for TIFF output. ### get_tiff_cmyk_alpha ```cpp bool datalogics_interface::ImageSaveParams::get_tiff_cmyk_alpha() const ``` **Returns:** `bool` true if CMYK + Alpha channel TIFF output is enabled, false otherwise. Gets whether CMYK image data is combined with the Soft Mask in TIFF output. Note: This is only valid for CMYK image data which has a Soft Mask; the output will be 40-bit. ### get_write_separation_colors_to_tiff ```cpp bool datalogics_interface::ImageSaveParams::get_write_separation_colors_to_tiff() const ``` **Returns:** `bool` true if separation colors are written to TIFF, false if converted to sRGB. Gets whether separation colors are written to TIFF using the Photoshop tag. When false, separation colors will be converted to their alternate color space and rendered as RGB. When true, separation colors are output using the TIFF Photoshop tag. ### operator= ```cpp ImageSaveParams & datalogics_interface::ImageSaveParams::operator=(ImageSaveParams &&) noexcept ``` **Parameters** - (unnamed) ([`ImageSaveParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageSaveParams.md)) **Returns:** [`ImageSaveParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageSaveParams.md) ### set_compression ```cpp void datalogics_interface::ImageSaveParams::set_compression(CompressionCode code) ``` **Parameters** - `code` ([`CompressionCode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CompressionCode.md)) **Returns:** `void` The compression code currently set. The default is CompressionCode.Default. Gets the type of compression to be used in saving the image to a file. ### set_disable_alpha_channel_generation ```cpp void datalogics_interface::ImageSaveParams::set_disable_alpha_channel_generation(bool disable) ``` **Parameters** - `disable` (`bool`) **Returns:** `void` true if alpha channel generation is disabled, false otherwise. Gets whether alpha channel generation is disabled for the output image. When false, RGB image data with a Mask will be combined as RGBA + Alpha Channel output (32-bit). When true, the Mask is not combined and the output is RGB (24-bit). This is only valid for TIFF and PNG output formats. ### set_halftone_gray_images ```cpp void datalogics_interface::ImageSaveParams::set_halftone_gray_images(bool halftone) ``` **Parameters** - `halftone` (`bool`) **Returns:** `void` true if halftone conversion is enabled, false otherwise. Gets whether grayscale images are converted to halftone. When true, converts 8bpc grayscale images to 1bpc (B/W) images using a 45 degree line screen set for 106lpi at 600dpi. Note this can only be set to true for an image of ColorSpace of DeviceGray. ### set_jpeg_quality ```cpp void datalogics_interface::ImageSaveParams::set_jpeg_quality(int quality) ``` **Parameters** - `quality` (`int`) **Returns:** `void` The JPEG quality value (0-100). The default is 0. Gets the quality of a JPEG output image. ### set_monochrome_threshold ```cpp void datalogics_interface::ImageSaveParams::set_monochrome_threshold(unsigned char threshold) ``` **Parameters** - `threshold` (`unsigned char`) **Returns:** `void` The monochrome threshold value (0-255). The default is 128. Gets the threshold for determining which bits are white or black for Monochrome output. Note: this is only valid for TIF Images using G3 or G4 compression and HalftoneGrayImages must be set to false. ### set_raise_exception_if_not_usable_color ```cpp void datalogics_interface::ImageSaveParams::set_raise_exception_if_not_usable_color(bool raise) ``` **Parameters** - `raise` (`bool`) **Returns:** `void` true if an exception will be raised for unsupported color formats, false otherwise. Gets whether an exception is raised if the image color format is not natively supported. When true, an exception will be raised if the image being saved is not in a format this graphic form can save natively. When false, the image will be automatically converted into a form that can be saved natively (generally DeviceRGB using the sRGB profile). ### set_reverse_gray ```cpp void datalogics_interface::ImageSaveParams::set_reverse_gray(bool reverse) ``` **Parameters** - `reverse` (`bool`) **Returns:** `void` true if the grayscale output will be reversed, false otherwise. Gets whether the GrayScale output is reversed. Note this is only valid for an image with a DeviceGray Colorspace. ### set_tiff_black_is_one ```cpp void datalogics_interface::ImageSaveParams::set_tiff_black_is_one(bool black_is_one) ``` **Parameters** - `black_is_one` (`bool`) **Returns:** `void` true if the TIFF image is photometrically reversed, false otherwise. Gets whether a TIFF file is photometrically reversed. Note this is only valid for a 1-bit TIFF image with a DeviceGray Colorspace. ### set_tiff_byte_order ```cpp void datalogics_interface::ImageSaveParams::set_tiff_byte_order(TIFFByteOrder order) ``` **Parameters** - `order` ([`TIFFByteOrder`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TIFFByteOrder.md)) **Returns:** `void` The current TIFF byte order setting. Gets the byte order used within the TIFF file. This is only valid for TIFF output. ### set_tiff_cmyk_alpha ```cpp void datalogics_interface::ImageSaveParams::set_tiff_cmyk_alpha(bool cmyk_alpha) ``` **Parameters** - `cmyk_alpha` (`bool`) **Returns:** `void` true if CMYK + Alpha channel TIFF output is enabled, false otherwise. Gets whether CMYK image data is combined with the Soft Mask in TIFF output. Note: This is only valid for CMYK image data which has a Soft Mask; the output will be 40-bit. ### set_write_separation_colors_to_tiff ```cpp void datalogics_interface::ImageSaveParams::set_write_separation_colors_to_tiff(bool write) ``` **Parameters** - `write` (`bool`) **Returns:** `void` true if separation colors are written to TIFF, false if converted to sRGB. Gets whether separation colors are written to TIFF using the Photoshop tag. When false, separation colors will be converted to their alternate color space and rendered as RGB. When true, separation colors are output using the TIFF Photoshop tag. --- # ImageType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ImageType **Namespace:** `datalogics_interface` ## Description Graphic types for importing an image and exporting a page to. Specifies the format of the raster image file to import or export. ## Values - `Invalid = 0`: Indicates an invalid or unrecognized image type. - `TIFF = 1`: Tagged Image File Format. - `JPEG = 2`: Joint Photographic Experts Group. - `BMP = 3`: Microsoft Windows Bitmap. - `PNG = 4`: Portable Network Graphic. - `GIF = 5`: Graphics Interchange Format. --- # IndexedColorSpace Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/IndexedColorSpace ```cpp class IndexedColorSpace : ColorSpace ``` **Namespace:** `datalogics_interface` **Inherits from:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) ## Description Indexed color spaces are used to reduce the amount of memory used for processing images. Indexed color spaces are used when a limited number of colors are needed. Commonly, an image with an indexed color space can be one third the size of the same image with a standard color space, because the indexed image uses a smaller palette of colors. **Uses types:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Constructors ### IndexedColorSpace ```cpp datalogics_interface::IndexedColorSpace::IndexedColorSpace(const ColorSpace &base, long hival, const std::vector< long > &lookup) ``` *constructor* **Parameters** - `base` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): The base color space in which the values in the color table are to be interpreted. It can be any device or CIE-based color space or (in PDF 1.3) a Separation or DeviceN space, but not a Pattern space or another Indexed space. - `hival` (`long`): an integer that specifies the maximum valid index value. In other words, the color table is to be indexed by integers in the range 0 to hival. hival can be no greater than 255. - `lookup` (`const std::vector< long > &`): a list of integers in the range 0..255. There must be m * (hival + 1) values, where m is the number of components of the base color space. Create a Indexed color space. ## Methods ### get_base ```cpp std::unique_ptr< ColorSpace > datalogics_interface::IndexedColorSpace::get_base() const ``` **Returns:** [`std::unique_ptr< ColorSpace >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) The base color space in which the values in the color table are to be interpreted. It can be any device or CIE-based color space or (in PDF 1.3) a Separation or DeviceN space, but not a Pattern space or another Indexed space. ### get_hival ```cpp long datalogics_interface::IndexedColorSpace::get_hival() const ``` **Returns:** `long` an integer that specifies the maximum valid index value. In other words, the color table is to be indexed by integers in the range 0 to hival. hival can be no greater than 255. ### get_lookup ```cpp std::vector< long > datalogics_interface::IndexedColorSpace::get_lookup() const ``` **Returns:** `std::vector< long >` A list of integers in the range 0..255. There must be m * (hival + 1) values, where m is the number of components of the base color space. ### get_name ```cpp std::string datalogics_interface::ColorSpace::get_name() const ``` **Returns:** `std::string` The name of the color space. A named color space may be named something like DeviceRGB. More complicated color spaces may have a name like Indexed or ICCBased. ### get_num_components ```cpp int datalogics_interface::ColorSpace::get_num_components() const ``` **Returns:** `int` The number of color components. The number of components in the color space. For example, DeviceGray has 1 component, DeviceRGB has 3, and DeviceCMYK has 4. ### get_pdf_object ```cpp std::unique_ptr< PDFObject > datalogics_interface::ColorSpace::get_pdf_object() const ``` **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The PDFObject associated with the color space. Get the PDFObject associated with the color space. This may be a PDFName, PDFDict, PDFStream, or PDFArray. ### operator== ```cpp virtual bool datalogics_interface::ColorSpace::operator==(const ColorSpace &other) const ``` **Parameters** - `other` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): The ColorSpace to compare against. **Returns:** `bool` true if the two color spaces are equal, false otherwise. Test for equality. This works best for named color spaces. More complex color spaces (such as ICCBased) do not support equality testing and will always return false. ### to_string ```cpp std::string datalogics_interface::ColorSpace::to_string() const ``` **Returns:** `std::string` A string describing this ColorSpace. Convert a ColorSpace to a string representation. --- # Ink Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Ink ```cpp class Ink ``` **Namespace:** `datalogics_interface` ## Description The ink object represents the color in the color space, CYMK or RGB. **Referenced by:** [`Page`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md) **Uses types:** [`InkType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/InkType.md), [`SeparationPreviewOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SeparationPreviewOption.md) ## Constructors ### Ink ```cpp datalogics_interface::Ink::Ink(Ink &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Ink &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Ink.md)) ### ~Ink ```cpp datalogics_interface::Ink::~Ink() ``` *destructor* ## Methods ### get_alias ```cpp std::string datalogics_interface::Ink::get_alias() const ``` **Returns:** `std::string` An alternate name (alias) for this colorant. ### get_angle ```cpp double datalogics_interface::Ink::get_angle() const ``` **Returns:** `double` The halftone screen angle for this ink, in degrees. ### get_black ```cpp double datalogics_interface::Ink::get_black() const ``` **Returns:** `double` The black component of the CMYK color swatch. ### get_blue ```cpp int datalogics_interface::Ink::get_blue() const ``` **Returns:** `int` The blue component of the RGB color swatch for on-screen display. ### get_colorant_name ```cpp std::string datalogics_interface::Ink::get_colorant_name() const ``` **Returns:** `std::string` The name of the colorant from the Separation or DeviceN color space, or the process color name. ### get_cyan ```cpp double datalogics_interface::Ink::get_cyan() const ``` **Returns:** `double` The cyan component of the CMYK color swatch. ### get_density ```cpp double datalogics_interface::Ink::get_density() const ``` **Returns:** `double` The neutral density of this ink. ### get_frequency ```cpp double datalogics_interface::Ink::get_frequency() const ``` **Returns:** `double` The halftone screen frequency for this ink, in lines per inch. ### get_green ```cpp int datalogics_interface::Ink::get_green() const ``` **Returns:** `int` The green component of the RGB color swatch for on-screen display. ### get_ink_type ```cpp InkType datalogics_interface::Ink::get_ink_type() const ``` **Returns:** [`InkType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/InkType.md) The ink type of this ink, used for trapping. ### get_is_process_color ```cpp bool datalogics_interface::Ink::get_is_process_color() const ``` **Returns:** `bool` Whether this ink represents a process color or a spot color. True if this is a process color, false if this is a spot color. ### get_magenta ```cpp double datalogics_interface::Ink::get_magenta() const ``` **Returns:** `double` The magenta component of the CMYK color swatch. ### get_preview_option ```cpp SeparationPreviewOption datalogics_interface::Ink::get_preview_option() const ``` **Returns:** [`SeparationPreviewOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SeparationPreviewOption.md) How the colorant is handled during a separation preview. ### get_red ```cpp int datalogics_interface::Ink::get_red() const ``` **Returns:** `int` The red component of the RGB color swatch for on-screen display. ### get_yellow ```cpp double datalogics_interface::Ink::get_yellow() const ``` **Returns:** `double` The yellow component of the CMYK color swatch. ### operator= ```cpp Ink & datalogics_interface::Ink::operator=(Ink &&) noexcept ``` **Parameters** - (unnamed) ([`Ink &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Ink.md)) **Returns:** [`Ink &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Ink.md) ### set_alias ```cpp void datalogics_interface::Ink::set_alias(const std::string &alias) ``` **Parameters** - `alias` (`const std::string &`): an alternate name (alias) for this colorant **Returns:** `void` An alternate name (alias) for this colorant. ### set_angle ```cpp void datalogics_interface::Ink::set_angle(double angle) ``` **Parameters** - `angle` (`double`): the halftone screen angle for this ink, in degrees **Returns:** `void` The halftone screen angle for this ink, in degrees. ### set_colorant_name ```cpp void datalogics_interface::Ink::set_colorant_name(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): the name of the colorant from the Separation or DeviceN color space, or the process color name **Returns:** `void` The name of the colorant from the Separation or DeviceN color space, or the process color name. ### set_density ```cpp void datalogics_interface::Ink::set_density(double density) ``` **Parameters** - `density` (`double`): the neutral density of this ink **Returns:** `void` The neutral density of this ink. ### set_frequency ```cpp void datalogics_interface::Ink::set_frequency(double frequency) ``` **Parameters** - `frequency` (`double`): the halftone screen frequency for this ink, in lines per inch **Returns:** `void` The halftone screen frequency for this ink, in lines per inch. ### set_ink_type ```cpp void datalogics_interface::Ink::set_ink_type(InkType type) ``` **Parameters** - `type` ([`InkType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/InkType.md)): the ink type of this ink, used for trapping **Returns:** `void` The ink type of this ink, used for trapping. ### set_is_process_color ```cpp void datalogics_interface::Ink::set_is_process_color(bool value) ``` **Parameters** - `value` (`bool`): the whether this ink represents a process color or a spot color **Returns:** `void` Whether this ink represents a process color or a spot color. True if this is a process color, false if this is a spot color. ### set_preview_option ```cpp void datalogics_interface::Ink::set_preview_option(SeparationPreviewOption option) ``` **Parameters** - `option` ([`SeparationPreviewOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SeparationPreviewOption.md)): the how the colorant is handled during a separation preview **Returns:** `void` How the colorant is handled during a separation preview. --- # InkAnnotation Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/InkAnnotation ```cpp class InkAnnotation : Annotation ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Annotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md) ## Description A type of annotation allowing a user to edit a PDF document. Ink annotations in a PDF file allow a user to work with a PDF document displayed on a screen just as if it were on paper, such as scribbling notes in the margins, or circling or underlining text. These types of annotations require a stylus or pen used on a tablet device. **Uses types:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### InkAnnotation ```cpp datalogics_interface::InkAnnotation::InkAnnotation(Page &page, const Rect &rect) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the InkAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. Create a new InkAnnotation at the end of a page's annotation array. To create a InkAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### InkAnnotation ```cpp datalogics_interface::InkAnnotation::InkAnnotation(Page &page, const Rect &rect, int add_after) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the InkAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. - `add_after` (`int`) Create a new InkAnnotation at the end of a page's annotation array. To create a InkAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### ~InkAnnotation ```cpp datalogics_interface::InkAnnotation::~InkAnnotation() override ``` *destructor* ## Methods ### add_scribble ```cpp void datalogics_interface::InkAnnotation::add_scribble(const std::vector< Point > &scribble) ``` **Parameters** - `scribble` ([`const std::vector< Point > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): The array of points, in order, that define the vertices of the scribble in user space coordinates, to add to the ink annotation. **Returns:** `void` The vertices that define one of many scribbles in an ink annotation, in user space. ### clear_interior_color ```cpp void datalogics_interface::Annotation::clear_interior_color() ``` **Returns:** `void` Clear the interior color. ### generate_appearance ```cpp virtual std::unique_ptr< Form > datalogics_interface::Annotation::generate_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the visual appearance, or null if the appearance could not be generated. Generate a new appearance stream with the current annotation properties. The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance. ### get_annotation_feature_level ```cpp virtual double datalogics_interface::Annotation::get_annotation_feature_level() const ``` **Returns:** `double` The minimum PDF version level (e.g. 1.3, 1.4, or 1.5). The minimum PDF version necessary to support the features used in this annotation. ### get_border_dash_pattern ```cpp std::vector< double > datalogics_interface::InkAnnotation::get_border_dash_pattern() const ``` **Returns:** `std::vector< double >` An array defining a pattern of dashes and gaps to be used in drawing a dashed border (border style D). The dash array is a series of numbers that specify the lengths of alternating dashes and gaps. Lengths must be nonnegative, and are expressed in user space units. Default value is [3] ### get_border_style ```cpp std::string datalogics_interface::InkAnnotation::get_border_style() const ``` **Returns:** `std::string` The border style. Can be one of: S - Solid D - Dashed. The dash pattern is specified as an array (see DashPattern) B - Beveled I - Inset U - Underline Other border styles may be defined in the future. Default is "S" ### get_border_style_width ```cpp double datalogics_interface::InkAnnotation::get_border_style_width() const ``` **Returns:** `double` The border width in points. If this value is 0, no border is drawn. The default is 1.0. ### get_color ```cpp Color datalogics_interface::Annotation::get_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The annotation's color. The color of the annotation. ### get_contents ```cpp std::string datalogics_interface::Annotation::get_contents() const ``` **Returns:** `std::string` The annotation's text contents. The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### get_flags ```cpp AnnotationFlags datalogics_interface::Annotation::get_flags() const ``` **Returns:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md) The annotation's flags. The flags for the annotation. ### get_interior_color ```cpp std::unique_ptr< Color > datalogics_interface::Annotation::get_interior_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The interior fill color, or null if no interior color is set. The interior color with which to fill the annotation's rectangle or circle. The color of the border itself can be retrieved from Annotation.Color. ### get_normal_appearance ```cpp std::unique_ptr< Form > datalogics_interface::Annotation::get_normal_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the annotation's normal appearance, or null if no normal appearance has been set. The normal appearance of the annotation, represented as a Form XObject. ### get_num_scribbles ```cpp int datalogics_interface::InkAnnotation::get_num_scribbles() const ``` **Returns:** `int` The number of scribbles in the ink annotation. The number of scribbles in the ink annotation. ### get_opacity ```cpp double datalogics_interface::Annotation::get_opacity() const ``` **Returns:** `double` The opacity value for this annotation. The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### get_rect ```cpp Rect datalogics_interface::Annotation::get_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The annotation's bounding rectangle in user space coordinates. The size and location of the annotation on its page. ### get_scribble ```cpp std::vector< Point > datalogics_interface::InkAnnotation::get_scribble(int index) const ``` **Parameters** - `index` (`int`): The index of the scribble to get. **Returns:** [`std::vector< Point >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) An array of points, in order, that define the indexed scribble of the ink annotation, in user space coordinates. ### get_subtype ```cpp std::string datalogics_interface::Annotation::get_subtype() const ``` **Returns:** `std::string` The subtype string (e.g. "Circle", "Square", "Line"). The annotation's subtype. ### get_title ```cpp std::string datalogics_interface::Annotation::get_title() const ``` **Returns:** `std::string` The title string. The title of the annotation. ### has_rich_text_data ```cpp bool datalogics_interface::Annotation::has_rich_text_data() const ``` **Returns:** `bool` true if the annotation contains Rich Text String content. Checks the annotation for Rich Text String content (PDFReference 1.7 Section 8.6.2). Annotations that contain Rich Text String content and do not have a normal appearance set will not be visible when rendering the page. ### operator== ```cpp bool datalogics_interface::Annotation::operator==(const Annotation &other) const ``` **Parameters** - `other` ([`const Annotation &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)): The annotation to compare with this annotation. **Returns:** `bool` true if the two annotations are equal. Test annotations for equality (if they are the same annotation). ### remove_scribble ```cpp void datalogics_interface::InkAnnotation::remove_scribble(int index) ``` **Parameters** - `index` (`int`): The array of points, in order, that define the vertices of the scribble in user space coordinates, to remove from the ink annotation. **Returns:** `void` The vertices that define one of many scribbles in an ink annotation, in user space. ### set_annotation_feature_level ```cpp virtual void datalogics_interface::Annotation::set_annotation_feature_level(double level) ``` **Parameters** - `level` (`double`): The target PDF version level. Features requiring a higher version will be removed. **Returns:** `void` Removes features not supported in the supplied version number. ### set_border_dash_pattern ```cpp void datalogics_interface::InkAnnotation::set_border_dash_pattern(const std::vector< double > &pattern) ``` **Parameters** - `pattern` (`const std::vector< double > &`): the border style dash pattern **Returns:** `void` ### set_border_style ```cpp void datalogics_interface::InkAnnotation::set_border_style(const std::string &style) ``` **Parameters** - `style` (`const std::string &`): the border style **Returns:** `void` ### set_border_style_width ```cpp void datalogics_interface::InkAnnotation::set_border_style_width(double width) ``` **Parameters** - `width` (`double`): the border style width **Returns:** `void` ### set_color ```cpp void datalogics_interface::Annotation::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new color to set. **Returns:** `void` The color of the annotation. ### set_contents ```cpp void datalogics_interface::Annotation::set_contents(const std::string &contents) ``` **Parameters** - `contents` (`const std::string &`): The new text contents. **Returns:** `void` The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### set_flags ```cpp void datalogics_interface::Annotation::set_flags(AnnotationFlags flags) ``` **Parameters** - `flags` ([`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md)): The new annotation flags to set. **Returns:** `void` The flags for the annotation. ### set_interior_color ```cpp void datalogics_interface::Annotation::set_interior_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new interior fill color. Pass null to remove the interior color. **Returns:** `void` The interior color with which to fill the annotation's rectangle or circle. Only RGB colors are allowed. The color of the border itself can be retrieved from Annotation.Color. ### set_normal_appearance ```cpp void datalogics_interface::Annotation::set_normal_appearance(Form &form) ``` **Parameters** - `form` ([`Form &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)): The Form to use as the annotation's normal appearance. **Returns:** `void` The normal appearance of the annotation, represented as a Form XObject. ### set_opacity ```cpp void datalogics_interface::Annotation::set_opacity(double opacity) ``` **Parameters** - `opacity` (`double`): The new opacity value to set. **Returns:** `void` The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### set_rect ```cpp void datalogics_interface::Annotation::set_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The new bounding rectangle in user space coordinates. **Returns:** `void` The size and location of the annotation on its page. ### set_title ```cpp void datalogics_interface::Annotation::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): The new title string. **Returns:** `void` The title of the annotation. ### to_string ```cpp std::string datalogics_interface::Annotation::to_string() const ``` **Returns:** `std::string` A string describing this annotation, including its type and rectangle. Returns a string representation of this annotation. ### try_as ```cpp T * datalogics_interface::Annotation::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this annotation to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Annotation::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # InkType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/InkType **Namespace:** `datalogics_interface` ## Description Specifies the ink type used for trapping purposes. ## Values - `Normal = 0`: Normal ink type for trapping. - `Transparent = 1`: Transparent ink type for trapping. - `Opaque = 2`: Opaque ink type for trapping. - `OpaqueIgnore = 3`: Opaque Ignore ink type for trapping. --- # LabColorSpace Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LabColorSpace ```cpp class LabColorSpace : ColorSpace ``` **Namespace:** `datalogics_interface` **Inherits from:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) ## Description A Lab color space is a CIE-based ABC color space with two transformation stages. In this type of space, A, B, and C represent the L*, a*, and b* components of a CIE 1976 L*a*b* space. The range of the first (L*) component is always 0 to 100; the ranges of the second and third (a* and b*) components are defined by the Range. **Uses types:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Constructors ### LabColorSpace ```cpp datalogics_interface::LabColorSpace::LabColorSpace(const std::vector< double > &white_point) ``` *constructor* **Parameters** - `white_point` (`const std::vector< double > &`): An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. The numbers X and Z must be positive, and Y must be equal to 1.0. Create a Lab color space. ### LabColorSpace ```cpp datalogics_interface::LabColorSpace::LabColorSpace(const std::vector< double > &white_point, const std::vector< double > &black_point, const std::vector< double > &range) ``` *constructor* **Parameters** - `white_point` (`const std::vector< double > &`): An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. The numbers X and Z must be positive, and Y must be equal to 1.0. - `black_point` (`const std::vector< double > &`): An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse black point. All three of these numbers must be non-negative. - `range` (`const std::vector< double > &`): An array of four numbers [ amin amax bmin bmax ] specifying the range of valid values for the a* and b* (B and C) components of the color space. Create a Lab color space. ## Methods ### get_black_point ```cpp std::vector< double > datalogics_interface::LabColorSpace::get_black_point() const ``` **Returns:** `std::vector< double >` An array of three doubles representing the X, Y, and Z tristimulus values of the black point. The black point tristimulus value for this Lab color space. An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse black point. All three of these numbers must be non-negative. If no black point was specified during construction, the default value [0.0, 0.0, 0.0] is returned. ### get_name ```cpp std::string datalogics_interface::ColorSpace::get_name() const ``` **Returns:** `std::string` The name of the color space. A named color space may be named something like DeviceRGB. More complicated color spaces may have a name like Indexed or ICCBased. ### get_num_components ```cpp int datalogics_interface::ColorSpace::get_num_components() const ``` **Returns:** `int` The number of color components. The number of components in the color space. For example, DeviceGray has 1 component, DeviceRGB has 3, and DeviceCMYK has 4. ### get_pdf_object ```cpp std::unique_ptr< PDFObject > datalogics_interface::ColorSpace::get_pdf_object() const ``` **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The PDFObject associated with the color space. Get the PDFObject associated with the color space. This may be a PDFName, PDFDict, PDFStream, or PDFArray. ### get_range ```cpp std::vector< double > datalogics_interface::LabColorSpace::get_range() const ``` **Returns:** `std::vector< double >` An array of four doubles specifying the minimum and maximum values for a* and b*. The range of valid values for the a* and b* components. An array of four numbers [ amin amax bmin bmax ] specifying the range of valid values for the a* and b* (B and C) components of the color space. If no range was specified during construction, the default value [-100, 100, -100, 100] is returned. ### get_white_point ```cpp std::vector< double > datalogics_interface::LabColorSpace::get_white_point() const ``` **Returns:** `std::vector< double >` An array of three doubles representing the X, Y, and Z tristimulus values of the white point. The white point tristimulus value for this Lab color space. An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. The numbers X and Z must be positive, and Y must be equal to 1.0. ### operator== ```cpp virtual bool datalogics_interface::ColorSpace::operator==(const ColorSpace &other) const ``` **Parameters** - `other` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): The ColorSpace to compare against. **Returns:** `bool` true if the two color spaces are equal, false otherwise. Test for equality. This works best for named color spaces. More complex color spaces (such as ICCBased) do not support equality testing and will always return false. ### to_string ```cpp std::string datalogics_interface::ColorSpace::to_string() const ``` **Returns:** `std::string` A string describing this ColorSpace. Convert a ColorSpace to a string representation. --- # LaunchAction Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LaunchAction ```cpp class LaunchAction : Action ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Action`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md) ## Description A launch action launches an application or opens or prints a document. **Uses types:** [`FileSpecification`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md), [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) ## Constructors ### LaunchAction ```cpp datalogics_interface::LaunchAction::LaunchAction(FileSpecification &file_spec) ``` *constructor* **Parameters** - `file_spec` ([`FileSpecification &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md)): A FileSpecification representing the application to be launched or the document to be opened or printed by this action. General constructor. The action's target will be the path referenced in the FileSpecification parameter. If the path is absolute, the target path will also be absolute. If the path is relative, the target path will also be relative. Generally, the FileSpecification should be associated with the same Document that contains the LaunchAction. (Both FileSpecification and LaunchAction objects are associated with a Document at creation time, and the association cannot be changed.) The LaunchAction will be associated with the same Document that the FileSpecification parameter is associated with. If the action's FileSpecification is changed during program execution such that the FileSpecification is associated with a different Document than the LaunchAction, saving the Document that contains the action will create a copy of the FileSpecification in the Document that contains the action. ### LaunchAction ```cpp datalogics_interface::LaunchAction::LaunchAction(LaunchAction &&) noexcept=default ``` *constructor* **Parameters** - (unnamed) ([`LaunchAction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LaunchAction.md)) ### ~LaunchAction ```cpp datalogics_interface::LaunchAction::~LaunchAction() override ``` *destructor* ## Methods ### clear_file_specification ```cpp void datalogics_interface::LaunchAction::clear_file_specification() ``` **Returns:** `void` Removes the file specification from this action. ### get_file_specification ```cpp std::unique_ptr< FileSpecification > datalogics_interface::LaunchAction::get_file_specification() const ``` **Returns:** [`std::unique_ptr< FileSpecification >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md) The FileSpecification associated with the LaunchAction. The FileSpecification for this action. Generally, the FileSpecification should be associated with the same Document that contains the LaunchAction. (Both FileSpecification and LaunchAction are associated with a Document at creation time.) ### get_new_window ```cpp bool datalogics_interface::LaunchAction::get_new_window() const ``` **Returns:** `bool` true if the destination document is set to open in a new window, false otherwise. Whether the destination document should be opened in a new window. By default, this flag is not present. If the action's FileSpecification is not a PDF, this flag is ignored. ### get_pdf_dict ```cpp PDFDict datalogics_interface::Action::get_pdf_dict() ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The underlying PDF dictionary for this Action. Retrieve the PDFObject representation of this object. ### get_subtype ```cpp std::string datalogics_interface::Action::get_subtype() const ``` **Returns:** `std::string` The subtype string for this action, such as "GoTo", "URI", "Launch", or "GoToR". The action's subtype. ### operator= ```cpp LaunchAction & datalogics_interface::LaunchAction::operator=(LaunchAction &&) noexcept=default ``` **Parameters** - (unnamed) ([`LaunchAction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LaunchAction.md)) **Returns:** [`LaunchAction &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LaunchAction.md) ### operator== ```cpp bool datalogics_interface::Action::operator==(const Action &other) const ``` **Parameters** - `other` ([`const Action &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md)) **Returns:** `bool` true if the two objects refer to the same action, false otherwise. Determines whether this Action is equal to another. Two Actions are considered equal if they refer to the same underlying PDF action object. ### set_file_specification ```cpp void datalogics_interface::LaunchAction::set_file_specification(const FileSpecification &file_spec) ``` **Parameters** - `file_spec` ([`const FileSpecification &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md)): The FileSpecification to associate with the LaunchAction. **Returns:** `void` Set the FileSpecification for this action. Generally, the FileSpecification should be associated with the same Document that contains the LaunchAction. (Both FileSpecification and LaunchAction are associated with a Document at creation time.) If the FileSpecification is associated with a different Document than the LaunchAction, saving the Document that contains the action will create a copy of the FileSpecification in that Document. ### set_new_window ```cpp void datalogics_interface::LaunchAction::set_new_window(bool new_window) ``` **Parameters** - `new_window` (`bool`): true to open the destination document in a new window, false otherwise. **Returns:** `void` Set whether the destination document should be opened in a new window. By default, this flag is not present. If the action's FileSpecification is not a PDF, this flag is ignored. ### to_string ```cpp std::string datalogics_interface::Action::to_string() const ``` **Returns:** `std::string` A string describing this Action. Returns a string representation of this Action. The string includes the action's subtype. ### try_as ```cpp T * datalogics_interface::Action::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this action to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Action::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # Library Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Library ```cpp class Library ``` **Namespace:** `datalogics_interface` ## Description Used to create a new instance of a library object or change properties. A Library object can be used to create a new instance of a library or change the properties of an existing library. Threading: per-thread. Each thread that touches the SDK must construct its own `Library` before creating any `Document`, `Page`, or `PDFObject`, and that `Library` must outlive every object it backs. Do not share a `Library` instance across threads. See `datalogics_interface.hpp` for the full threading model. **Uses types:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md), [`LibraryFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LibraryFlags.md), [`LogParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LogParams.md), [`TempStoreType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TempStoreType.md) ## Constructors ### Library ```cpp datalogics_interface::Library::Library() ``` *constructor* Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library. Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library. ### Library ```cpp datalogics_interface::Library::Library(const std::vector< std::string > &font_paths) ``` *constructor* **Parameters** - `font_paths` (`const std::vector< std::string > &`) Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library. Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library. ### Library ```cpp datalogics_interface::Library::Library(const std::vector< std::string > &font_paths, const std::string &cmap_path, const std::string &unicode_path, const std::string &color_profile_path, LibraryFlags flags) ``` *constructor* **Parameters** - `font_paths` (`const std::vector< std::string > &`) - `cmap_path` (`const std::string &`) - `unicode_path` (`const std::string &`) - `color_profile_path` (`const std::string &`) - `flags` ([`LibraryFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LibraryFlags.md)) Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library. Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library. ### Library ```cpp datalogics_interface::Library::Library(const std::vector< std::string > &font_paths, const std::string &cmap_path, const std::string &unicode_path, LibraryFlags flags) ``` *constructor* **Parameters** - `font_paths` (`const std::vector< std::string > &`) - `cmap_path` (`const std::string &`) - `unicode_path` (`const std::string &`) - `flags` ([`LibraryFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LibraryFlags.md)) Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library. Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library. ### Library ```cpp datalogics_interface::Library::Library(const std::vector< std::string > &font_paths, LibraryFlags flags) ``` *constructor* **Parameters** - `font_paths` (`const std::vector< std::string > &`) - `flags` ([`LibraryFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LibraryFlags.md)) Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library. Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library. ### Library ```cpp datalogics_interface::Library::Library(Library &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Library &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Library.md)) ### Library ```cpp datalogics_interface::Library::Library(LibraryFlags flags) ``` *constructor* **Parameters** - `flags` ([`LibraryFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LibraryFlags.md)) Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library. Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library. ### ~Library ```cpp datalogics_interface::Library::~Library() ``` *destructor* Destroy this handle to the PDF Library. Also terminate the library if this is the last Library object on this thread. ## Methods ### change_working_space_cmyk ```cpp void datalogics_interface::Library::change_working_space_cmyk(ColorProfile profile) ``` **Parameters** - `profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): The path on disk of the Color Profile to be used. **Returns:** `void` Sets the current CMYK working space to the specified ICC profile. ### change_working_space_cmyk ```cpp void datalogics_interface::Library::change_working_space_cmyk(const std::string &profile_path) ``` **Parameters** - `profile_path` (`const std::string &`): The path on disk of the Color Profile to be used. **Returns:** `void` Sets the current CMYK working space to the specified ICC profile. ### change_working_space_gray ```cpp void datalogics_interface::Library::change_working_space_gray(ColorProfile profile) ``` **Parameters** - `profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): The path on disk of the Color Profile to be used. **Returns:** `void` Sets the current Gray working space to the specified ICC profile. ### change_working_space_gray ```cpp void datalogics_interface::Library::change_working_space_gray(const std::string &profile_path) ``` **Parameters** - `profile_path` (`const std::string &`): The path on disk of the Color Profile to be used. **Returns:** `void` Sets the current Gray working space to the specified ICC profile. ### change_working_space_rgb ```cpp void datalogics_interface::Library::change_working_space_rgb(ColorProfile profile) ``` **Parameters** - `profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): The path on disk of the Color Profile to be used. **Returns:** `void` Sets the current RGB working space to the specified ICC profile. ### change_working_space_rgb ```cpp void datalogics_interface::Library::change_working_space_rgb(const std::string &profile_path) ``` **Parameters** - `profile_path` (`const std::string &`): The path on disk of the Color Profile to be used. **Returns:** `void` Sets the current RGB working space to the specified ICC profile. ### enable_licensed_behavior ```cpp static bool datalogics_interface::Library::enable_licensed_behavior(const std::string &key) ``` *static* **Parameters** - `key` (`const std::string &`): A base64-encoded string containing the encrypted license key. **Returns:** `bool` true if the licensed behavior has been successfully enabled. This is used to turn on licensed behaviors in DLE. The function parameter is a base64-encoded string containing the encrypted licensed key. **Note:** When using the Render bypass key, this requires you also set the BypassCopyPerm property to true of the DrawParams or PageImageParams classes for it to work. ### get_allow_opening_xfa ```cpp bool datalogics_interface::Library::get_allow_opening_xfa() const ``` **Returns:** `bool` Allow opening PDF files that contain XFA forms. By default, an exception will be raised when attempting to open this type of document. ### get_allow_relaxed_syntax ```cpp bool datalogics_interface::Library::get_allow_relaxed_syntax() const ``` **Returns:** `bool` true if these minor errors are ignored. Check to see if minor parsing errors are ignored while opening PDF files. ### get_apdfl_version ```cpp static std::string datalogics_interface::Library::get_apdfl_version() ``` *static* **Returns:** `std::string` The version of the C/C++ SDK, as reported in legacy versions of APDFL. E.g., 21.0.0P1a ### get_default_temp_path ```cpp std::string datalogics_interface::Library::get_default_temp_path() const ``` **Returns:** `std::string` string with current default directory for temporary files, or null if none was set by the user. Gets the default temporary directory. ### get_default_temp_store ```cpp TempStoreType datalogics_interface::Library::get_default_temp_store() const ``` **Returns:** [`TempStoreType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TempStoreType.md) current temporary storage type. Gets default temporary storage. PDFL uses Disk storage type by default. ### get_default_temp_store_mem_limit ```cpp int datalogics_interface::Library::get_default_temp_store_mem_limit() const ``` **Returns:** `int` current memory limit. It returns zero value for cases when unlimited memory amount is used or when current storage type is Disk. Call DefaultTempStore to get the exact meaning of the zero value Gets current memory limit. ### get_forms_extension_version ```cpp static std::string datalogics_interface::Library::get_forms_extension_version() ``` *static* **Returns:** `std::string` The Forms Extension Version ### get_install_location ```cpp static std::string datalogics_interface::Library::get_install_location() ``` *static* **Returns:** `std::string` the installation location as a UTF-8 path. The installation location. This is inferred from the location of the native code and returned as a UTF-8 path. ### get_license_key ```cpp static std::string datalogics_interface::Library::get_license_key() ``` *static* **Returns:** `std::string` A string containing a license key, as an alternative to using a license file. Only applicable to License-Managed versions. ### get_log_params ```cpp LogParams datalogics_interface::Library::get_log_params() const ``` **Returns:** [`LogParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LogParams.md) The LogParams object which contains currently used logging settings. Gets LogParams object with preferences for logging. ### get_resource_directory ```cpp static std::string datalogics_interface::Library::get_resource_directory() ``` *static* **Returns:** `std::string` the resource directory as a UTF-8 path The resource directory. ### get_version ```cpp static std::string datalogics_interface::Library::get_version() ``` *static* **Returns:** `std::string` The version of the SDK, as reported in legacy versions of APDFL. E.g., 21.0.0.0 ### initialized ```cpp static bool datalogics_interface::Library::initialized() ``` *static* **Returns:** `bool` true if the PDF Library is initialized on this thread Check to see if the library is initialized ### is_forms_extension_available ```cpp bool datalogics_interface::Library::is_forms_extension_available() ``` **Returns:** `bool` true if the Forms Extension dependencies are present, and false if they are not. Validate the Forms Extension dependencies are present. Indicates if all of the necessary dependencies are present for the Forms extension. ### operator= ```cpp Library & datalogics_interface::Library::operator=(Library &&) noexcept ``` **Parameters** - (unnamed) ([`Library &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Library.md)) **Returns:** [`Library &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Library.md) ### set_allow_opening_xfa ```cpp void datalogics_interface::Library::set_allow_opening_xfa(bool allow) ``` **Parameters** - `allow` (`bool`): true to allow opening PDF files that contain XFA forms; false to throw an exception on such files. **Returns:** `void` Allow opening PDF files that contain XFA forms. By default, an exception will be raised when attempting to open this type of document. ### set_allow_relaxed_syntax ```cpp void datalogics_interface::Library::set_allow_relaxed_syntax(bool allow) ``` **Parameters** - `allow` (`bool`): the ignore minor parsing errors while opening PDF files. By default, exceptions are raised when such errors occur **Returns:** `void` Ignore minor parsing errors while opening PDF files. By default, exceptions are raised when such errors occur. ### set_default_temp_path ```cpp void datalogics_interface::Library::set_default_temp_path(const std::string &path) ``` **Parameters** - `path` (`const std::string &`): the default temporary path to the directory indicated by the specified path name **Returns:** `void` Sets the default temporary path to the directory indicated by the specified path name. Pass null as the path to use the system default temporary file directory. ### set_default_temp_store ```cpp void datalogics_interface::Library::set_default_temp_store(TempStoreType type) ``` **Parameters** - `type` ([`TempStoreType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TempStoreType.md)): temporary storage type. **Returns:** `void` Allows to switch between different types of temporary storages. Use Disk type to turn off in-memory file system usage. Use Memory type to turn on in-memory file system with unlimited RAM amount by default. ### set_default_temp_store_mem_limit ```cpp void datalogics_interface::Library::set_default_temp_store_mem_limit(int limit_kb) ``` **Parameters** - `limit_kb` (`int`) **Returns:** `void` Sets memory limit for Memory storage type. Accepts any positive integer to set threshold for using RAM in kilobytes. When occupied memory exceeds specified threshold, temporary files creation will be redirected to physical disk. Throws an exception if current storage type is Disk. Throws an exception if input value less than 0; ### set_license_key ```cpp static void datalogics_interface::Library::set_license_key(const std::string &key) ``` *static* **Parameters** - `key` (`const std::string &`): a string containing a license, as an alternative to using a license file. Only applicable to License-Managed versions **Returns:** `void` A string containing a license, as an alternative to using a license file. Only applicable to License-Managed versions. ### set_log_params ```cpp void datalogics_interface::Library::set_log_params(const LogParams ¶ms) ``` **Parameters** - `params` ([`const LogParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LogParams.md)): the new parameters for logging. **Returns:** `void` Sets LogParams object with preferences for logging. ### terminate ```cpp void datalogics_interface::Library::terminate() ``` **Returns:** `void` Terminate the library with regard to this handle. (Note that if there are other Library objects in this thread, they may keep the library initialized. --- # LibraryFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LibraryFlags **Namespace:** `datalogics_interface` ## Description Flags for initializing the library. Unless you require fine-grain control of the intialization process of the library there is no need to use LibraryFlags or you can specify the value of NoFlags. ## Values - `None = 0`: No flags set; default initialization. - `IgnoreDefaultDirectories = 0x001`: When searching for fonts, ignore the compiled-in default directories. - `CheckSubFonts = 0x004`: Check for substitution fonts during initialization; fail if not found. - `InitPDFEdit = 0x020`: Initialize PDFEdit during library setup. - `IgnoreCurrentDirectory = 0x100`: Ignore the current working directory when searching for fonts. - `DisableMemorySuballocator = 0x200`: Disable memory suballocation. - `PreferLocalFonts = 0x400`: Prefer fonts loaded from local directories over OS-controlled directories. - `InitFormsExtension = 0x10000`: Load Forms Extension dependencies. Requires a separate license. --- # LineAnnotation Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LineAnnotation ```cpp class LineAnnotation : Annotation ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Annotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md) ## Description The line annotation displays a single straight line on a PDF page. When opened it displays a pop-up window containing the text of an associated note, placed at specific x/y coordinates for starting and ending points of the line. **Uses types:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`LineEndingStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineEndingStyle.md), [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### LineAnnotation ```cpp datalogics_interface::LineAnnotation::LineAnnotation(Page &page, const Rect &rect, const Point &start_point, const Point &end_point) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the LineAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. - `start_point` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): The starting coordinate of the line, in user space. - `end_point` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): The ending coordinate of the line, in user space. Create a new LineAnnotation at the end of a page's annotation array. To create a LineAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### LineAnnotation ```cpp datalogics_interface::LineAnnotation::LineAnnotation(Page &page, const Rect &rect, const Point &start_point, const Point &end_point, int add_after) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the LineAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. - `start_point` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): The starting coordinate of the line, in user space. - `end_point` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): The ending coordinate of the line, in user space. - `add_after` (`int`) Create a new LineAnnotation at the end of a page's annotation array. To create a LineAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### ~LineAnnotation ```cpp datalogics_interface::LineAnnotation::~LineAnnotation() override ``` *destructor* ## Methods ### clear_interior_color ```cpp void datalogics_interface::Annotation::clear_interior_color() ``` **Returns:** `void` Clear the interior color. ### generate_appearance ```cpp virtual std::unique_ptr< Form > datalogics_interface::Annotation::generate_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the visual appearance, or null if the appearance could not be generated. Generate a new appearance stream with the current annotation properties. The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance. ### get_annotation_feature_level ```cpp virtual double datalogics_interface::Annotation::get_annotation_feature_level() const ``` **Returns:** `double` The minimum PDF version level (e.g. 1.3, 1.4, or 1.5). The minimum PDF version necessary to support the features used in this annotation. ### get_border_dash_pattern ```cpp std::vector< double > datalogics_interface::LineAnnotation::get_border_dash_pattern() const ``` **Returns:** `std::vector< double >` An array defining a pattern of dashes and gaps to be used in drawing a dashed border (border style D). The dash array is a series of numbers that specify the lengths of alternating dashes and gaps. Lengths must be nonnegative, and are expressed in user space units. Default value is [3] ### get_border_style ```cpp std::string datalogics_interface::LineAnnotation::get_border_style() const ``` **Returns:** `std::string` The border style. Can be one of: S - Solid D - Dashed. The dash pattern is specified as an array (see DashPattern) B - Beveled I - Inset U - Underline Other border styles may be defined in the future. Default is "S" ### get_border_style_width ```cpp double datalogics_interface::LineAnnotation::get_border_style_width() const ``` **Returns:** `double` The border width in points. If this value is 0, no border is drawn. The default is 1.0. ### get_color ```cpp Color datalogics_interface::Annotation::get_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The annotation's color. The color of the annotation. ### get_contents ```cpp std::string datalogics_interface::Annotation::get_contents() const ``` **Returns:** `std::string` The annotation's text contents. The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### get_end_ending_style ```cpp LineEndingStyle datalogics_interface::LineAnnotation::get_end_ending_style() const ``` **Returns:** [`LineEndingStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineEndingStyle.md) The ending style applied to the end point of the line (for example, an arrowhead, circle, or square). ### get_end_point ```cpp Point datalogics_interface::LineAnnotation::get_end_point() const ``` **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) The ending coordinate of the line, in user space. If the line has leader lines, the end point represents the ending point of the leader line rather than the line itself. ### get_flags ```cpp AnnotationFlags datalogics_interface::Annotation::get_flags() const ``` **Returns:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md) The annotation's flags. The flags for the annotation. ### get_interior_color ```cpp std::unique_ptr< Color > datalogics_interface::Annotation::get_interior_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The interior fill color, or null if no interior color is set. The interior color with which to fill the annotation's rectangle or circle. The color of the border itself can be retrieved from Annotation.Color. ### get_normal_appearance ```cpp std::unique_ptr< Form > datalogics_interface::Annotation::get_normal_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the annotation's normal appearance, or null if no normal appearance has been set. The normal appearance of the annotation, represented as a Form XObject. ### get_opacity ```cpp double datalogics_interface::Annotation::get_opacity() const ``` **Returns:** `double` The opacity value for this annotation. The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### get_rect ```cpp Rect datalogics_interface::Annotation::get_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The annotation's bounding rectangle in user space coordinates. The size and location of the annotation on its page. ### get_start_ending_style ```cpp LineEndingStyle datalogics_interface::LineAnnotation::get_start_ending_style() const ``` **Returns:** [`LineEndingStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineEndingStyle.md) The ending style applied to the start point of the line (for example, an arrowhead, circle, or square). ### get_start_point ```cpp Point datalogics_interface::LineAnnotation::get_start_point() const ``` **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) The starting coordinate of the line, in user space. If the line has leader lines, the start point represents the starting point of the leader line rather than the line itself. ### get_subtype ```cpp std::string datalogics_interface::Annotation::get_subtype() const ``` **Returns:** `std::string` The subtype string (e.g. "Circle", "Square", "Line"). The annotation's subtype. ### get_title ```cpp std::string datalogics_interface::Annotation::get_title() const ``` **Returns:** `std::string` The title string. The title of the annotation. ### has_rich_text_data ```cpp bool datalogics_interface::Annotation::has_rich_text_data() const ``` **Returns:** `bool` true if the annotation contains Rich Text String content. Checks the annotation for Rich Text String content (PDFReference 1.7 Section 8.6.2). Annotations that contain Rich Text String content and do not have a normal appearance set will not be visible when rendering the page. ### operator== ```cpp bool datalogics_interface::Annotation::operator==(const Annotation &other) const ``` **Parameters** - `other` ([`const Annotation &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)): The annotation to compare with this annotation. **Returns:** `bool` true if the two annotations are equal. Test annotations for equality (if they are the same annotation). ### set_annotation_feature_level ```cpp virtual void datalogics_interface::Annotation::set_annotation_feature_level(double level) ``` **Parameters** - `level` (`double`): The target PDF version level. Features requiring a higher version will be removed. **Returns:** `void` Removes features not supported in the supplied version number. ### set_border_dash_pattern ```cpp void datalogics_interface::LineAnnotation::set_border_dash_pattern(const std::vector< double > &pattern) ``` **Parameters** - `pattern` (`const std::vector< double > &`): the border style dash pattern **Returns:** `void` ### set_border_style ```cpp void datalogics_interface::LineAnnotation::set_border_style(const std::string &style) ``` **Parameters** - `style` (`const std::string &`): the border style **Returns:** `void` ### set_border_style_width ```cpp void datalogics_interface::LineAnnotation::set_border_style_width(double width) ``` **Parameters** - `width` (`double`): the border style width **Returns:** `void` ### set_color ```cpp void datalogics_interface::Annotation::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new color to set. **Returns:** `void` The color of the annotation. ### set_contents ```cpp void datalogics_interface::Annotation::set_contents(const std::string &contents) ``` **Parameters** - `contents` (`const std::string &`): The new text contents. **Returns:** `void` The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### set_end_ending_style ```cpp void datalogics_interface::LineAnnotation::set_end_ending_style(LineEndingStyle style) ``` **Parameters** - `style` ([`LineEndingStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineEndingStyle.md)): the ending style applied to the end point of the line (for example, an arrowhead, circle, or square) **Returns:** `void` The ending style applied to the end point of the line (for example, an arrowhead, circle, or square). ### set_end_point ```cpp void datalogics_interface::LineAnnotation::set_end_point(const Point &p) ``` **Parameters** - `p` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): the ending coordinate of the line, in user space **Returns:** `void` The ending coordinate of the line, in user space. If the line has leader lines, the end point represents the ending point of the leader line rather than the line itself. ### set_flags ```cpp void datalogics_interface::Annotation::set_flags(AnnotationFlags flags) ``` **Parameters** - `flags` ([`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md)): The new annotation flags to set. **Returns:** `void` The flags for the annotation. ### set_interior_color ```cpp void datalogics_interface::Annotation::set_interior_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new interior fill color. Pass null to remove the interior color. **Returns:** `void` The interior color with which to fill the annotation's rectangle or circle. Only RGB colors are allowed. The color of the border itself can be retrieved from Annotation.Color. ### set_normal_appearance ```cpp void datalogics_interface::Annotation::set_normal_appearance(Form &form) ``` **Parameters** - `form` ([`Form &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)): The Form to use as the annotation's normal appearance. **Returns:** `void` The normal appearance of the annotation, represented as a Form XObject. ### set_opacity ```cpp void datalogics_interface::Annotation::set_opacity(double opacity) ``` **Parameters** - `opacity` (`double`): The new opacity value to set. **Returns:** `void` The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### set_rect ```cpp void datalogics_interface::Annotation::set_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The new bounding rectangle in user space coordinates. **Returns:** `void` The size and location of the annotation on its page. ### set_start_ending_style ```cpp void datalogics_interface::LineAnnotation::set_start_ending_style(LineEndingStyle style) ``` **Parameters** - `style` ([`LineEndingStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineEndingStyle.md)): the ending style applied to the start point of the line (for example, an arrowhead, circle, or square) **Returns:** `void` The ending style applied to the start point of the line (for example, an arrowhead, circle, or square). ### set_start_point ```cpp void datalogics_interface::LineAnnotation::set_start_point(const Point &p) ``` **Parameters** - `p` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): the starting coordinate of the line, in user space **Returns:** `void` The starting coordinate of the line, in user space. If the line has leader lines, the start point represents the starting point of the leader line rather than the line itself. ### set_title ```cpp void datalogics_interface::Annotation::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): The new title string. **Returns:** `void` The title of the annotation. ### to_string ```cpp std::string datalogics_interface::Annotation::to_string() const ``` **Returns:** `std::string` A string describing this annotation, including its type and rectangle. Returns a string representation of this annotation. ### try_as ```cpp T * datalogics_interface::Annotation::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this annotation to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Annotation::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # LineCap Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineCap **Namespace:** `datalogics_interface` ## Description The line cap style specifies the shape to be used at the ends of open subpaths (and dashes, if any) when they are stroked. ## Values - `Butt = 0`: Stroke is squared off at the endpoint with no projection beyond the path. - `Round = 1`: Semicircular arc of diameter equal to the line width is drawn around the endpoint and filled in. - `Square = 2`: Stroke continues beyond the endpoint for half the line width and is squared off. --- # LineEndingStyle Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineEndingStyle **Namespace:** `datalogics_interface` ## Description Line-ending shape for annotations whose appearance includes line endings (line, polyline, polygon, free-text callouts). ## Values - `Square = 0`: Filled square at the line endpoint. - `Circle = 1`: Filled circle at the line endpoint. - `Diamond = 2`: Filled diamond at the line endpoint. - `OpenArrow = 3`: Two unfilled lines forming an open arrowhead. - `ClosedArrow = 4`: Two unfilled lines forming a closed (triangular) arrowhead. - `Butt = 5`: A short line perpendicular to the path. - `ReverseOpenArrow = 6`: Open arrowhead pointing back toward the line. - `ReverseClosedArrow = 7`: Closed (triangular) arrowhead pointing back toward the line. - `Slash = 8`: Single short slanted line at the endpoint. - `None = 9`: No line ending. --- # LineJoin Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineJoin **Namespace:** `datalogics_interface` ## Description The line join style specifies the shape to be used at the corners of paths that are stroked. Join styles are significant only at points where consecutive segments of a path connect at an angle; segments that meet or intersect fortuitously receive no special treatment. ## Values - `Miter = 0`: Outer edges of strokes for adjoining segments extend until they meet at an angle. Falls back to bevel if the angle is too sharp. - `Round = 1`: Arc of a circle equal to the line width is drawn at the corner, producing a rounded join. - `Bevel = 2`: Adjoining segments end with butt caps and the resulting notch is filled with a triangle. --- # LineTo Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LineTo ```cpp class LineTo : Segment ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Segment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Segment.md) ## Description A lineto operator, which draws a straight line. A lineto operator creates a line path element. It draws a straight line from the current position (MoveTo) to a new position-a new set of (x,y) coordinates: MoveTo{x:0 y:50} LineTo{x:100 y:100} **Uses types:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) ## Constructors ### LineTo ```cpp datalogics_interface::LineTo::LineTo(const Point &pt) ``` *constructor* **Parameters** - `pt` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): The destination point for the line segment. Create a line to a new point. Append a straight line segment from the current point to the lineToPoint. The new current point is the point the line is drawn to. ### LineTo ```cpp datalogics_interface::LineTo::LineTo(double x, double y) ``` *constructor* **Parameters** - `x` (`double`): The destination point for the line segment. - `y` (`double`) Create a line to a new point. Append a straight line segment from the current point to the lineToPoint. The new current point is the point the line is drawn to. ### ~LineTo ```cpp datalogics_interface::LineTo::~LineTo() override ``` *destructor* ## Methods ### point ```cpp Point datalogics_interface::LineTo::point() const ``` **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) The destination of the line-to. ### to_string ```cpp std::string datalogics_interface::LineTo::to_string() const override ``` **Returns:** `std::string` Represents a segment, or a single line, within a path. --- # LinkAnnotation Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LinkAnnotation ```cpp class LinkAnnotation : Annotation ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Annotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md) ## Description A link annotation, which features an embedded hyperlink. **Uses types:** [`Action`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md), [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`HighlightStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HighlightStyle.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md), [`ViewDestination`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md) ## Constructors ### LinkAnnotation ```cpp datalogics_interface::LinkAnnotation::LinkAnnotation(Page &page, const Rect &rect) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the LinkAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. Create a new LinkAnnotation at the end of a page's annotation array. To create a LinkAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### LinkAnnotation ```cpp datalogics_interface::LinkAnnotation::LinkAnnotation(Page &page, const Rect &rect, int add_after) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the LinkAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. - `add_after` (`int`) Create a new LinkAnnotation at the end of a page's annotation array. To create a LinkAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### ~LinkAnnotation ```cpp datalogics_interface::LinkAnnotation::~LinkAnnotation() override ``` *destructor* ## Methods ### clear_interior_color ```cpp void datalogics_interface::Annotation::clear_interior_color() ``` **Returns:** `void` Clear the interior color. ### generate_appearance ```cpp virtual std::unique_ptr< Form > datalogics_interface::Annotation::generate_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the visual appearance, or null if the appearance could not be generated. Generate a new appearance stream with the current annotation properties. The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance. ### get_action ```cpp std::unique_ptr< Action > datalogics_interface::LinkAnnotation::get_action() const ``` **Returns:** [`std::unique_ptr< Action >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md) The Action object for this link. Note that setting the Action will wipe out the Link's Destination member a link annotation cannot have both members. ### get_annotation_feature_level ```cpp virtual double datalogics_interface::Annotation::get_annotation_feature_level() const ``` **Returns:** `double` The minimum PDF version level (e.g. 1.3, 1.4, or 1.5). The minimum PDF version necessary to support the features used in this annotation. ### get_border_dash_pattern ```cpp std::vector< double > datalogics_interface::LinkAnnotation::get_border_dash_pattern() const ``` **Returns:** `std::vector< double >` An array defining a pattern of dashes and gaps to be used in drawing a dashed border (border style D). The dash array is a series of numbers that specify the lengths of alternating dashes and gaps. Lengths must be nonnegative, and are expressed in user space units. Default value is [3] ### get_border_style ```cpp std::string datalogics_interface::LinkAnnotation::get_border_style() const ``` **Returns:** `std::string` The border style. Can be one of: S - Solid D - Dashed. The dash pattern is specified as an array (see DashPattern) B - Beveled I - Inset U - Underline Other border styles may be defined in the future. Default is "S" ### get_border_style_width ```cpp double datalogics_interface::LinkAnnotation::get_border_style_width() const ``` **Returns:** `double` The border width in points. If this value is 0, no border is drawn. The default is 1.0. ### get_color ```cpp Color datalogics_interface::Annotation::get_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The annotation's color. The color of the annotation. ### get_contents ```cpp std::string datalogics_interface::Annotation::get_contents() const ``` **Returns:** `std::string` The annotation's text contents. The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### get_destination ```cpp std::unique_ptr< ViewDestination > datalogics_interface::LinkAnnotation::get_destination() const ``` **Returns:** [`std::unique_ptr< ViewDestination >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md) The Destination for this link. Note that setting the Destination will wipe out the Link's Action member a link annotation cannot have both members. ### get_flags ```cpp AnnotationFlags datalogics_interface::Annotation::get_flags() const ``` **Returns:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md) The annotation's flags. The flags for the annotation. ### get_highlight ```cpp HighlightStyle datalogics_interface::LinkAnnotation::get_highlight() const ``` **Returns:** [`HighlightStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HighlightStyle.md) The HighlightStyle for this link. ### get_interior_color ```cpp std::unique_ptr< Color > datalogics_interface::Annotation::get_interior_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The interior fill color, or null if no interior color is set. The interior color with which to fill the annotation's rectangle or circle. The color of the border itself can be retrieved from Annotation.Color. ### get_normal_appearance ```cpp std::unique_ptr< Form > datalogics_interface::Annotation::get_normal_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the annotation's normal appearance, or null if no normal appearance has been set. The normal appearance of the annotation, represented as a Form XObject. ### get_opacity ```cpp double datalogics_interface::Annotation::get_opacity() const ``` **Returns:** `double` The opacity value for this annotation. The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### get_rect ```cpp Rect datalogics_interface::Annotation::get_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The annotation's bounding rectangle in user space coordinates. The size and location of the annotation on its page. ### get_subtype ```cpp std::string datalogics_interface::Annotation::get_subtype() const ``` **Returns:** `std::string` The subtype string (e.g. "Circle", "Square", "Line"). The annotation's subtype. ### get_title ```cpp std::string datalogics_interface::Annotation::get_title() const ``` **Returns:** `std::string` The title string. The title of the annotation. ### has_rich_text_data ```cpp bool datalogics_interface::Annotation::has_rich_text_data() const ``` **Returns:** `bool` true if the annotation contains Rich Text String content. Checks the annotation for Rich Text String content (PDFReference 1.7 Section 8.6.2). Annotations that contain Rich Text String content and do not have a normal appearance set will not be visible when rendering the page. ### operator== ```cpp bool datalogics_interface::Annotation::operator==(const Annotation &other) const ``` **Parameters** - `other` ([`const Annotation &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)): The annotation to compare with this annotation. **Returns:** `bool` true if the two annotations are equal. Test annotations for equality (if they are the same annotation). ### set_action ```cpp void datalogics_interface::LinkAnnotation::set_action(Action &action) ``` **Parameters** - `action` ([`Action &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md)): the Action object for this link **Returns:** `void` The Action object for this link. Note that setting the Action will wipe out the Link's Destination member a link annotation cannot have both members. ### set_annotation_feature_level ```cpp virtual void datalogics_interface::Annotation::set_annotation_feature_level(double level) ``` **Parameters** - `level` (`double`): The target PDF version level. Features requiring a higher version will be removed. **Returns:** `void` Removes features not supported in the supplied version number. ### set_border_dash_pattern ```cpp void datalogics_interface::LinkAnnotation::set_border_dash_pattern(const std::vector< double > &pattern) ``` **Parameters** - `pattern` (`const std::vector< double > &`): the border style dash pattern **Returns:** `void` ### set_border_style ```cpp void datalogics_interface::LinkAnnotation::set_border_style(const std::string &style) ``` **Parameters** - `style` (`const std::string &`): the border style **Returns:** `void` ### set_border_style_width ```cpp void datalogics_interface::LinkAnnotation::set_border_style_width(double width) ``` **Parameters** - `width` (`double`): the border style width **Returns:** `void` ### set_color ```cpp void datalogics_interface::Annotation::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new color to set. **Returns:** `void` The color of the annotation. ### set_contents ```cpp void datalogics_interface::Annotation::set_contents(const std::string &contents) ``` **Parameters** - `contents` (`const std::string &`): The new text contents. **Returns:** `void` The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### set_destination ```cpp void datalogics_interface::LinkAnnotation::set_destination(ViewDestination &dest) ``` **Parameters** - `dest` ([`ViewDestination &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md)): the Destination for this link **Returns:** `void` The Destination for this link. Note that setting the Destination will wipe out the Link's Action member a link annotation cannot have both members. ### set_flags ```cpp void datalogics_interface::Annotation::set_flags(AnnotationFlags flags) ``` **Parameters** - `flags` ([`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md)): The new annotation flags to set. **Returns:** `void` The flags for the annotation. ### set_highlight ```cpp void datalogics_interface::LinkAnnotation::set_highlight(HighlightStyle style) ``` **Parameters** - `style` ([`HighlightStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HighlightStyle.md)): the HighlightStyle for this link **Returns:** `void` The HighlightStyle for this link. ### set_interior_color ```cpp void datalogics_interface::Annotation::set_interior_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new interior fill color. Pass null to remove the interior color. **Returns:** `void` The interior color with which to fill the annotation's rectangle or circle. Only RGB colors are allowed. The color of the border itself can be retrieved from Annotation.Color. ### set_normal_appearance ```cpp void datalogics_interface::Annotation::set_normal_appearance(Form &form) ``` **Parameters** - `form` ([`Form &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)): The Form to use as the annotation's normal appearance. **Returns:** `void` The normal appearance of the annotation, represented as a Form XObject. ### set_opacity ```cpp void datalogics_interface::Annotation::set_opacity(double opacity) ``` **Parameters** - `opacity` (`double`): The new opacity value to set. **Returns:** `void` The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### set_rect ```cpp void datalogics_interface::Annotation::set_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The new bounding rectangle in user space coordinates. **Returns:** `void` The size and location of the annotation on its page. ### set_title ```cpp void datalogics_interface::Annotation::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): The new title string. **Returns:** `void` The title of the annotation. ### to_string ```cpp std::string datalogics_interface::Annotation::to_string() const ``` **Returns:** `std::string` A string describing this annotation, including its type and rectangle. Returns a string representation of this annotation. ### try_as ```cpp T * datalogics_interface::Annotation::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this annotation to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Annotation::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # LogOutputFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LogOutputFlags **Namespace:** `datalogics_interface` ## Description Flags that control where DLE log output is written. Multiple flags can be combined using bitwise OR to send log output to more than one destination simultaneously. ## Values - `None = 0`: Disable all logging. - `Console = 0x0002`: Write log to console. - `File = 0x0004`: Write log to file. - `EventLog = 0x0008`: Post log in Windows Event Log (Windows only). --- # LogParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LogParams ```cpp class LogParams ``` **Namespace:** `datalogics_interface` ## Description Defines the parameters for writing error messages to a log file. The messages include the date and time, the source of the error, and the error type: debug, info, warning, error, or fatal. This class also defines the log file name and path. **Referenced by:** [`Library`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Library.md) **Uses types:** [`LogOutputFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LogOutputFlags.md) ## Constructors ### LogParams ```cpp datalogics_interface::LogParams::LogParams() ``` *constructor* LogParams constructor which allows to create LogParams instance. The LogParams object contains all settings required for logging. The log output, log file name and log string format can be configured with it. ### LogParams ```cpp datalogics_interface::LogParams::LogParams(const LogParams &other) ``` *constructor* **Parameters** - `other` ([`const LogParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LogParams.md)) Copy constructor. ### LogParams ```cpp datalogics_interface::LogParams::LogParams(LogParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`LogParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LogParams.md)) ### ~LogParams ```cpp datalogics_interface::LogParams::~LogParams() ``` *destructor* ## Methods ### get_log_file_name ```cpp std::string datalogics_interface::LogParams::get_log_file_name() const ``` **Returns:** `std::string` Path to the file to write the log to. Gets the path to the file to write the log to. ### get_log_format ```cpp std::string datalogics_interface::LogParams::get_log_format() const ``` **Returns:** `std::string` string Log record format. Gets log format string. The string which allows to write the log in a custom format. NOTE: PDFL supports the following markers to form output string: "%d" - current date (mmddyyyy). Example: 07292013 "%t" - current time (hhmmss). Example: 121311 "%s" - error source. Example: "DLFramework" "%e" - error type. It can be debug, info, warning, error, fatal. The value which will be output within this marker depends on severity value. It always outputs "error" string. "%m" - error message. Example: "Exception: InExistent.pdf: This file cannot be found. Error number: 1074397201" "%T" - full date. It contains current date, current time and the timezone (yyyy-mm- ddThh:mm:ss+/-hh:mm). Example: 2013-07-29T12:13:11+03:00 By default "%T | %s | %e | %m" string format is used. ### get_log_output_flags ```cpp LogOutputFlags datalogics_interface::LogParams::get_log_output_flags() const ``` **Returns:** [`LogOutputFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LogOutputFlags.md) currently used flags. Gets LogOutputFlags. Supported types of logging are: console, file and Event Log (for Windows only). The outputs can be mixed by ORing corresponding flags. It is also possible to suppress any logging using LogOutputFlags::None. ### operator= ```cpp LogParams & datalogics_interface::LogParams::operator=(const LogParams &other) ``` **Parameters** - `other` ([`const LogParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LogParams.md)) **Returns:** [`LogParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LogParams.md) Copy assignment. ### operator= ```cpp LogParams & datalogics_interface::LogParams::operator=(LogParams &&) noexcept ``` **Parameters** - (unnamed) ([`LogParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LogParams.md)) **Returns:** [`LogParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LogParams.md) ### set_log_file_name ```cpp void datalogics_interface::LogParams::set_log_file_name(const std::string &file_name) ``` **Parameters** - `file_name` (`const std::string &`): Path to the file to write the log to. **Returns:** `void` Sets file name to write the log to. NOTE: Ignored if LogOuputFlag::File flag is not set. ### set_log_format ```cpp void datalogics_interface::LogParams::set_log_format(const std::string &format) ``` **Parameters** - `format` (`const std::string &`): string Log record format. **Returns:** `void` Sets log format string. The string which allows to write the log in a custom format. NOTE: PDFL supports the following markers to form output string: "%d" - current date (mmddyyyy). Example: 07292013 "%t" - current time (hhmmss). Example: 121311 "%s" - error source. Example: "DLFramework" "%e" - error type. It can be debug, info, warning, error, fatal. The value which will be output within this marker depends on severity value. Currently it always outputs "error" string. "%m" - error message. Example: "Exception: InExistent.pdf: This file cannot be found. Error number: 1074397201" "%T" - full date. It contains current date, current time and the timezone (yyyy-mm- ddThh:mm:ss+/-hh:mm). Example: 2013-07-29T12:13:11+03:00 By default "%T | %s | %e | %m" string format is used. ### set_log_output_flags ```cpp void datalogics_interface::LogParams::set_log_output_flags(LogOutputFlags flags) ``` **Parameters** - `flags` ([`LogOutputFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LogOutputFlags.md)): the flags containing outputs to write the log to. **Returns:** `void` Sets LogOutputFlags. Allows to specify where to put DLE's log. Supported types of logging are: console, file and Event Log (for Windows only). The outputs can be mixed by ORing corresponding flags. It is also possible to suppress any logging using LogOutputFlags::None. --- # Matrix Struct Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix ```cpp struct Matrix ``` **Namespace:** `datalogics_interface` ## Description A transformation matrix in a PDF file is specified by six numbers. The matrix is usually in the form of an array containing the six elements [a b c d h v]. A translation is specified as [ 1 0 0 1 tx ty], where tx and ty are the distance to translate from the origin of the coordinate system in the horizontal and vertical dimension, respectively. A scaling is obtained by [sx 0 0 sy 0 0]. This scales the coordinates so that 1 unit in the horizontal and vertical dimension of the new coordinate system is the same size as sx and sy units, respectively, as in the previous coordinate system. A rotation is produced by [ cos T sin T -sin T cos T 0 0 ], which has the effect of rotating the coordinate system axes by an angle T (degrees) counterclockwise. This material indicates that the matrix specifying a transformation is premultiplied with the current transformation matrix, i.e., M' = Mt * M The implementation of the Scale, Rotate, and Translate convenience functions of Matrix reflect the same order of operations, so that they are consistent with the PDF Reference manual. They are also consistent with the scale, rotate, and translate operators in PostScript, from which the coordinate system model in PDF is derived. **Referenced by:** [`Container`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md), [`Content`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md), [`DrawParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DrawParams.md), [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`Group`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Group.md), [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md), [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md), [`Path`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Path.md), [`Text`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Text.md), [`TextRun`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextRun.md) **Uses types:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) ## Constructors ### Matrix ```cpp datalogics_interface::Matrix::Matrix()=default ``` *constructor* ### Matrix ```cpp datalogics_interface::Matrix::Matrix(double a, double b, double c, double d, double h, double v) ``` *constructor* **Parameters** - `a` (`double`) - `b` (`double`) - `c` (`double`) - `d` (`double`) - `h` (`double`) - `v` (`double`) ## Fields ### a ```cpp double datalogics_interface::Matrix::a ``` ### b ```cpp double datalogics_interface::Matrix::b ``` ### c ```cpp double datalogics_interface::Matrix::c ``` ### d ```cpp double datalogics_interface::Matrix::d ``` ### h ```cpp double datalogics_interface::Matrix::h ``` ### v ```cpp double datalogics_interface::Matrix::v ``` ## Methods ### concat ```cpp Matrix datalogics_interface::Matrix::concat(const Matrix &other) const ``` **Parameters** - `other` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)) **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) ### invert ```cpp Matrix datalogics_interface::Matrix::invert() const ``` **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) ### multiply ```cpp static Matrix datalogics_interface::Matrix::multiply(const Matrix &m1, const Matrix &m2) ``` *static* **Parameters** - `m1` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)) - `m2` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)) **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) ### operator!= ```cpp bool datalogics_interface::Matrix::operator!=(const Matrix &rhs) const ``` **Parameters** - `rhs` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)) **Returns:** `bool` ### operator== ```cpp bool datalogics_interface::Matrix::operator==(const Matrix &rhs) const ``` **Parameters** - `rhs` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)) **Returns:** `bool` ### rotate ```cpp Matrix datalogics_interface::Matrix::rotate(double degrees) const ``` **Parameters** - `degrees` (`double`) **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) ### scale ```cpp Matrix datalogics_interface::Matrix::scale(double sx, double sy) const ``` **Parameters** - `sx` (`double`) - `sy` (`double`) **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) ### to_string ```cpp std::string datalogics_interface::Matrix::to_string() const ``` **Returns:** `std::string` ### translate ```cpp Matrix datalogics_interface::Matrix::translate(double tx, double ty) const ``` **Parameters** - `tx` (`double`) - `ty` (`double`) **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) --- # MirrorOption Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/MirrorOption **Namespace:** `datalogics_interface` ## Description Options for mirroring output in the PostScript stream. ## Values - `DontFlip = 0x01`: No mirroring. - `FlipX = 0x02`: Mirror across x-axis. - `FlipY = 0x04`: Mirror across y-axis. - `FlipXY = 0x08`: Mirror across x and y-axis. --- # MoveTo Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/MoveTo ```cpp class MoveTo : Segment ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Segment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Segment.md) ## Description An operator that creates a path by moving to a new current position. A LineTo operator creates an addition to a path element by moving to the (x,y) coordinates specified in the MoveTo statement. The MoveTo coordinates serve as the new current position, and from here a new path element can start. For example, the MoveTo coordinates can define the starting position for a LineTo operator. The LineTo operator draws a straight line from the current position (MoveTo) to a new position, the set of (x,y) coordinates defined with the LineTo operator: MoveTo{x:0 y:50} LineTo{x:100 y:100} **Uses types:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) ## Constructors ### MoveTo ```cpp datalogics_interface::MoveTo::MoveTo(const Point &pt) ``` *constructor* **Parameters** - `pt` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): The new current point to move to. Move to a new current point. Begin a new subpath by moving the current point to a new point, omitting any connecting line segment. If the previous path segment in the current path was also a MoveTo, the new m overrides it; no vestige of the previous MoveTo operation remains in the path. ### MoveTo ```cpp datalogics_interface::MoveTo::MoveTo(double x, double y) ``` *constructor* **Parameters** - `x` (`double`): The new current point to move to. - `y` (`double`) Move to a new current point. Begin a new subpath by moving the current point to a new point, omitting any connecting line segment. If the previous path segment in the current path was also a MoveTo, the new m overrides it; no vestige of the previous MoveTo operation remains in the path. ### ~MoveTo ```cpp datalogics_interface::MoveTo::~MoveTo() override ``` *destructor* ## Methods ### point ```cpp Point datalogics_interface::MoveTo::point() const ``` **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) The destination of the move-to. ### to_string ```cpp std::string datalogics_interface::MoveTo::to_string() const override ``` **Returns:** `std::string` Represents a segment, or a single line, within a path. --- # NamedColorSpace Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NamedColorSpace ```cpp class NamedColorSpace : ColorSpace ``` **Namespace:** `datalogics_interface` **Inherits from:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) ## Description Class used to define the color space in use. **Referenced by:** [`NamedColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NamedColorSpace.md) **Uses types:** [`NamedColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NamedColorSpace.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Constructors ### NamedColorSpace ```cpp datalogics_interface::NamedColorSpace::NamedColorSpace(const std::string &name) ``` *constructor* **Parameters** - `name` (`const std::string &`): the name of the color space. Create a named color space with the given name, e.g. DeviceRGB ## Methods ### device_cmyk ```cpp static NamedColorSpace datalogics_interface::NamedColorSpace::device_cmyk() ``` *static* **Returns:** [`NamedColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NamedColorSpace.md) A new NamedColorSpace for DeviceCMYK (4 components). Creates a NamedColorSpace representing the DeviceCMYK color space. ### device_gray ```cpp static NamedColorSpace datalogics_interface::NamedColorSpace::device_gray() ``` *static* **Returns:** [`NamedColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NamedColorSpace.md) A new NamedColorSpace for DeviceGray (1 component). Creates a NamedColorSpace representing the DeviceGray color space. ### device_rgb ```cpp static NamedColorSpace datalogics_interface::NamedColorSpace::device_rgb() ``` *static* **Returns:** [`NamedColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NamedColorSpace.md) A new NamedColorSpace for DeviceRGB (3 components). Creates a NamedColorSpace representing the DeviceRGB color space. ### get_name ```cpp std::string datalogics_interface::ColorSpace::get_name() const ``` **Returns:** `std::string` The name of the color space. A named color space may be named something like DeviceRGB. More complicated color spaces may have a name like Indexed or ICCBased. ### get_num_components ```cpp int datalogics_interface::ColorSpace::get_num_components() const ``` **Returns:** `int` The number of color components. The number of components in the color space. For example, DeviceGray has 1 component, DeviceRGB has 3, and DeviceCMYK has 4. ### get_pdf_object ```cpp std::unique_ptr< PDFObject > datalogics_interface::ColorSpace::get_pdf_object() const ``` **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The PDFObject associated with the color space. Get the PDFObject associated with the color space. This may be a PDFName, PDFDict, PDFStream, or PDFArray. ### operator== ```cpp virtual bool datalogics_interface::ColorSpace::operator==(const ColorSpace &other) const ``` **Parameters** - `other` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): The ColorSpace to compare against. **Returns:** `bool` true if the two color spaces are equal, false otherwise. Test for equality. This works best for named color spaces. More complex color spaces (such as ICCBased) do not support equality testing and will always return false. ### to_string ```cpp std::string datalogics_interface::ColorSpace::to_string() const ``` **Returns:** `std::string` A string describing this ColorSpace. Convert a ColorSpace to a string representation. --- # NameTree Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NameTree ```cpp class NameTree ``` **Namespace:** `datalogics_interface` ## Description The name tree is a common data structure in PDF files. A name tree is a type of dictionary that can store many more pairs of matched records than a standard object dictionary. A name tree uses keys that are character strings to map to data objects. The strings can use a standard coding format, such as Unicode, are sorted in order in the data structure, and can be associated with any type of object. **Referenced by:** [`Document`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md) **Uses types:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Constructors ### NameTree ```cpp datalogics_interface::NameTree::NameTree(Document &doc) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The Document in which to create the NameTree. Creates a new, empty NameTree in the specified Document. ### NameTree ```cpp datalogics_interface::NameTree::NameTree(NameTree &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`NameTree &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NameTree.md)) ### ~NameTree ```cpp datalogics_interface::NameTree::~NameTree() ``` *destructor* ## Methods ### get ```cpp std::unique_ptr< PDFObject > datalogics_interface::NameTree::get(PDFString &key) ``` **Parameters** - `key` ([`PDFString &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFString.md)): - The name of the PDFObject to get from the tree. **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) - The PDFObject value corresponding to the supplied key Retrieves an entry from this NameTree. ### get_pdf_dict ```cpp PDFDict datalogics_interface::NameTree::get_pdf_dict() ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The PDFDict representing the NameTree's data structure. Gets the underlying PDFDict of this NameTree. ### operator= ```cpp NameTree & datalogics_interface::NameTree::operator=(NameTree &&) noexcept ``` **Parameters** - (unnamed) ([`NameTree &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NameTree.md)) **Returns:** [`NameTree &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NameTree.md) ### put ```cpp void datalogics_interface::NameTree::put(const std::string &key, ViewDestination &dest) ``` **Parameters** - `key` (`const std::string &`) - `dest` ([`ViewDestination &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md)) **Returns:** `void` Convenience overload: put a ViewDestination into the name tree under the given string key. Encodes the destination as its PDF array representation. Equivalent to building a PDFString key and calling put() with the destination's underlying array. ### put ```cpp void datalogics_interface::NameTree::put(PDFString &key, PDFObject &value) ``` **Parameters** - `key` ([`PDFString &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFString.md)): - The name of the PDFObject to put in the tree. - `value` ([`PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): - The PDFObject to be associated with key. **Returns:** `void` Puts a new entry in this NameTree. If an entry with this name is already in the tree, it is replaced. ### remove ```cpp void datalogics_interface::NameTree::remove(PDFString &key) ``` **Parameters** - `key` ([`PDFString &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFString.md)): - The name of the PDFObject to remove from the tree. **Returns:** `void` Removes the specified PDFObject from this NameTree. It does nothing if no PDFObject of that name exists in this NameTree. --- # NumberStyle Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/NumberStyle **Namespace:** `datalogics_interface` ## Description Specifies the numbering style for page labels in a document. ## Values - `Decimal = 0`: Decimal arabic numerals (1, 2, 3, ...). - `RomanUppercase = 1`: Uppercase Roman numerals (I, II, III, ...). - `RomanLowercase = 2`: Lowercase Roman numerals (i, ii, iii, ...). - `LetterUppercase = 3`: Uppercase letters (A-Z, AA-ZZ, ...). - `LetterLowercase = 4`: Lowercase letters (a-z, aa-zz, ...). - `None = 5`: No numeric portion; only the prefix is rendered. --- # NumberTree Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NumberTree ```cpp class NumberTree ``` **Namespace:** `datalogics_interface` ## Description The number tree is a common data structure in PDF files. The number tree is a type of dictionary that can store many more pairs of matched records than a standard object dictionary. A number tree uses keys that are integers to map to data objects, sorted in ascending numerical order. **Uses types:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Constructors ### NumberTree ```cpp datalogics_interface::NumberTree::NumberTree(Document &doc) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The Document in which to create the NumberTree. Creates a new, empty NumberTree in the specified Document. ### NumberTree ```cpp datalogics_interface::NumberTree::NumberTree(NumberTree &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`NumberTree &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NumberTree.md)) ### ~NumberTree ```cpp datalogics_interface::NumberTree::~NumberTree() ``` *destructor* ## Methods ### get ```cpp std::unique_ptr< PDFObject > datalogics_interface::NumberTree::get(int32_t key) ``` **Parameters** - `key` (`int32_t`): The integer key of the PDFObject to get from the tree. **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The PDFObject value corresponding to the supplied key. Retrieves an entry from this NumberTree. ### get_pdf_dict ```cpp PDFDict datalogics_interface::NumberTree::get_pdf_dict() ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The PDFDict representing the NumberTree's data structure. Gets the underlying PDFDict of this NumberTree. ### operator= ```cpp NumberTree & datalogics_interface::NumberTree::operator=(NumberTree &&) noexcept ``` **Parameters** - (unnamed) ([`NumberTree &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NumberTree.md)) **Returns:** [`NumberTree &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NumberTree.md) ### put ```cpp void datalogics_interface::NumberTree::put(int32_t key, PDFObject &value) ``` **Parameters** - `key` (`int32_t`): - The integer of the PDFObject to put in the tree. - `value` ([`PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): - The PDFObject to be associated with key. **Returns:** `void` Puts a new entry in this NumberTree. If an entry with this name is already in the tree, it is replaced. ### remove ```cpp void datalogics_interface::NumberTree::remove(int32_t key) ``` **Parameters** - `key` (`int32_t`): - The integer of the PDFObject to remove from the tree. **Returns:** `void` Removes the specified PDFObject from this NumberTree. It does nothing if no PDFObject of that number exists in this NumberTree. --- # OCDrawingPolicy Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCDrawingPolicy **Namespace:** `datalogics_interface` ## Description The policy for drawing optional content within the document. ## Values - `VisibleOptionalContent = 0`: Draw optional content that is visible according to the current state of OptionalContentGroups and OptionalContentMembershipDicts. - `AllOptionalContent = 1`: Draw all optional content, regardless of visibility state. - `NoOptionalContent = 2`: Do not draw any optional content, regardless of visibility state. --- # OCREngine Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCREngine ```cpp class OCREngine ``` **Namespace:** `datalogics_interface` ## Description Represents an OCR Engine and its configuration. Create an OCREngine object once, and reuse it to convert multiple images to Form objects to avoid repeating the sometimes expensive initialization of the engine. The configuration of the engine can't be changed after it's created; if you need to do that, create another OCREngine object. **Uses types:** [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`OCRLanguage`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRLanguage.md), [`OCRMissingFontStrategy`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRMissingFontStrategy.md), [`OCRParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCRParams.md) ## Constructors ### OCREngine ```cpp datalogics_interface::OCREngine::OCREngine() ``` *constructor* Create an OCR engine with default parameters. ### OCREngine ```cpp datalogics_interface::OCREngine::OCREngine(OCREngine &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`OCREngine &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCREngine.md)) ### OCREngine ```cpp datalogics_interface::OCREngine::OCREngine(OCRParams params) ``` *constructor* **Parameters** - `params` ([`OCRParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCRParams.md)): the configuration to use Create an OCR engine with a specified configuration. ### ~OCREngine ```cpp datalogics_interface::OCREngine::~OCREngine() ``` *destructor* ## Methods ### get_available_languages ```cpp std::vector< OCRLanguage > datalogics_interface::OCREngine::get_available_languages() const ``` **Returns:** [`std::vector< OCRLanguage >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRLanguage.md) the list of languages supported, or null if that list can't be determined. Get a list of languages this OCREngine can use. ### is_language_available ```cpp bool datalogics_interface::OCREngine::is_language_available(OCRLanguage language) const ``` **Parameters** - `language` ([`OCRLanguage`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRLanguage.md)): the language to check **Returns:** `bool` true if the language is available, false otherwise Query if a language for OCR is available for use. ### operator= ```cpp OCREngine & datalogics_interface::OCREngine::operator=(OCREngine &&) noexcept ``` **Parameters** - (unnamed) ([`OCREngine &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCREngine.md)) **Returns:** [`OCREngine &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCREngine.md) ### place_text_under ```cpp std::unique_ptr< Form > datalogics_interface::OCREngine::place_text_under(Image &image) const ``` **Parameters** - `image` ([`Image &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md)): The image in which to recognize text. **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) a Form element containing the image with text underneath. Recognize text in the image, returning a form element with the image and the text underneath. Recognize text in the image, returning a form with the image and text underneath. Run the image through an OCR engine. Creates a Form element containing the image, and additional text underneath. The Form element has a transformation matrix which makes it directly substitutable for the image in a Content stream. This method may throw an exception if it can't find a font that will represent all the characters in a word. See the candidateFontNames on OCRParams to supply more fonts. ### place_text_under ```cpp std::unique_ptr< Form > datalogics_interface::OCREngine::place_text_under(Image &image, Document &document) const ``` **Parameters** - `image` ([`Image &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md)): The image in which to recognize text. - `document` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)) **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) a Form element containing the image with text underneath. Recognize text in the image, returning a form element with the image and the text underneath. Recognize text in the image within a destination document. Run the image through an OCR engine. Creates a Form element containing the image, and additional text underneath. The Form element has a transformation matrix which makes it directly substitutable for the image in a Content stream. This method may throw an exception if it can't find a font that will represent all the characters in a word. See the candidateFontNames on OCRParams to supply more fonts. ### place_text_under ```cpp std::unique_ptr< Form > datalogics_interface::OCREngine::place_text_under(Image &image, Document &document, double resolution) const ``` **Parameters** - `image` ([`Image &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md)): The image in which to recognize text. - `document` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)) - `resolution` (`double`) **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) a Form element containing the image with text underneath. Recognize text in the image, returning a form element with the image and the text underneath. Recognize text with a known image resolution. Run the image through an OCR engine. Creates a Form element containing the image, and additional text underneath. The Form element has a transformation matrix which makes it directly substitutable for the image in a Content stream. This method may throw an exception if it can't find a font that will represent all the characters in a word. See the candidateFontNames on OCRParams to supply more fonts. ### place_text_under ```cpp std::unique_ptr< Form > datalogics_interface::OCREngine::place_text_under(Image &image, Document &document, double resolution, OCRMissingFontStrategy strategy) const ``` **Parameters** - `image` ([`Image &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md)): The image in which to recognize text. - `document` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)) - `resolution` (`double`) - `strategy` ([`OCRMissingFontStrategy`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRMissingFontStrategy.md)) **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) a Form element containing the image with text underneath. Recognize text in the image, returning a form element with the image and the text underneath. Recognize text with known resolution and missing font strategy. Run the image through an OCR engine. Creates a Form element containing the image, and additional text underneath. The Form element has a transformation matrix which makes it directly substitutable for the image in a Content stream. This method may throw an exception if it can't find a font that will represent all the characters in a word. See the candidateFontNames on OCRParams to supply more fonts. ### place_text_under ```cpp std::unique_ptr< Form > datalogics_interface::OCREngine::place_text_under(Image &image, Document &document, OCRMissingFontStrategy strategy) const ``` **Parameters** - `image` ([`Image &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md)): The image in which to recognize text. - `document` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)) - `strategy` ([`OCRMissingFontStrategy`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRMissingFontStrategy.md)) **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) a Form element containing the image with text underneath. Recognize text in the image, returning a form element with the image and the text underneath. Recognize text with a missing font strategy. Run the image through an OCR engine. Creates a Form element containing the image, and additional text underneath. The Form element has a transformation matrix which makes it directly substitutable for the image in a Content stream. This method may throw an exception if it can't find a font that will represent all the characters in a word. See the candidateFontNames on OCRParams to supply more fonts. --- # OCRLanguage Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRLanguage **Namespace:** `datalogics_interface` ## Description Languages which may be selected for OCR recognition. Languages which may be selected. To find if a language is available, call IsLanguageAvailable() on the OCREngine. ## Values - `English = 0` - `Dutch = 1` - `French = 2` - `German = 3` - `Italian = 4` - `Portuguese = 5` - `Spanish = 6` - `Arabic = 7` - `ChineseTraditional = 8` - `ChineseTraditionalVertical = 9` - `ChineseSimplified = 10` - `ChineseSimplifiedVertical = 11` - `Japanese = 12` - `JapaneseVertical = 13` - `Korean = 14` - `KoreanVertical = 15` - `Afrikaans = 16` - `Amharic = 17` - `Assamese = 18` - `Azerbaijani = 19` - `AzerbaijaniCyrillic = 20` - `Belarusian = 21` - `Bengali = 22` - `Tibetan = 23` - `Bosnian = 24` - `Breton = 25` - `Bulgarian = 26` - `Catalan = 27` - `Corsican = 28` - `Cebuano = 29` - `Czech = 30` - `Cherokee = 31` - `Welsh = 32` - `Danish = 33` - `DanishFraktur = 34` - `Dzongkha = 35` - `Greek = 36` - `EnglishMiddle = 37` - `Esperanto = 38` - `MathEquationDetection = 39` - `Estonian = 40` - `Faroese = 41` - `Basque = 42` - `Persian = 43` - `Finnish = 44` - `Filipino = 45` - `GermanFraktur = 46` - `FrenchMiddle = 47` - `Frisian = 48` - `Irish = 49` - `Galician = 50` - `ScottishGaelic = 51` - `GreekAncient = 52` - `Gujarati = 53` - `Haitian = 54` - `Hebrew = 55` - `Hindi = 56` - `Croatian = 57` - `Hungarian = 58` - `Inuktitut = 59` - `Indonesian = 60` - `Icelandic = 61` - `ItalianOld = 62` - `Javanese = 63` - `Kannada = 64` - `Georgian = 65` - `GeorgianOld = 66` - `Kazakh = 67` - `CentralKhmer = 68` - `Kyrgyz = 69` - `Kurmanji = 70` - `Lao = 71` - `Latin = 72` - `Latvian = 73` - `Lithuanian = 74` - `Luxembourgish = 75` - `Malayalam = 76` - `Marathi = 77` - `Macedonian = 78` - `Maltese = 79` - `Mongolian = 80` - `Maori = 81` - `Malay = 82` - `Burmese = 83` - `Nepali = 84` - `Norwegian = 85` - `Occitan = 86` - `Oriya = 87` - `OrientationAndScriptDetection = 88` - `Panjabi = 89` - `Polish = 90` - `Pashto = 91` - `Quechua = 92` - `Romanian = 93` - `Russian = 94` - `Sanskrit = 95` - `Sinhala = 96` - `Slovak = 97` - `SlovakFraktur = 98` - `Slovenian = 99` - `Sindhi = 100` - `SpanishOld = 101` - `Albanian = 102` - `Serbian = 103` - `SerbianLatin = 104` - `Sundanese = 105` - `Swahili = 106` - `Swedish = 107` - `Tamil = 108` - `Tatar = 109` - `Telugu = 110` - `Tajik = 111` - `Tagalog = 112` - `Thai = 113` - `Tigrinya = 114` - `Tonga = 115` - `Turkish = 116` - `Uyghur = 117` - `Ukrainian = 118` - `Urdu = 119` - `Uzbek = 120` - `UzbekCyrillic = 121` - `Vietnamese = 122` - `Yiddish = 123` - `Yoruba = 124` --- # OCRLanguageSetting Struct Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/OCRLanguageSetting ```cpp struct OCRLanguageSetting ``` **Namespace:** `datalogics_interface` ## Description Specify a language, along with any metadata about that language. A language with optional prohibition flag. **Referenced by:** [`OCRParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCRParams.md) **Uses types:** [`OCRLanguage`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRLanguage.md) ## Constructors ### OCRLanguageSetting ```cpp datalogics_interface::OCRLanguageSetting::OCRLanguageSetting(OCRLanguage lang, bool prohib) ``` *constructor* **Parameters** - `lang` ([`OCRLanguage`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRLanguage.md)) - `prohib` (`bool`) ## Fields ### language ```cpp OCRLanguage datalogics_interface::OCRLanguageSetting::language ``` The language being specified. ### prohibit ```cpp bool datalogics_interface::OCRLanguageSetting::prohibit ``` Instead of loading, prohibit this language from being loaded as an adjunct of another. --- # OCRMissingFontStrategy Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRMissingFontStrategy **Namespace:** `datalogics_interface` ## Description The behavior to use if a suitable Font can't be found to represent recognized text. The behavior to use if a suitable Font can't be found to represent the recognized Text. ## Values - `RaiseAnException = 0`: Raise an exception. - `IgnoreMissingFont = 1`: Ignore the missing Font and continue recognizing the next word. - `ReplacementText = 2`: Replace the characters with the Unicode replacement character. --- # OCRPageSegmentationMode Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRPageSegmentationMode **Namespace:** `datalogics_interface` ## Description How the OCR engine views the page and detects text segments. Specify how the OCR engine will view the page, and how it detects text segments. ## Values - `OSDOnly = 0`: Orientation and script detection (OSD). - `AutomaticOSD = 1`: Automatic page segmentation with OSD. - `Automatic = 2`: Automatic without OSD. - `SingleColumn = 3`: Assume a single column of text. - `SingleBlockVertical = 4`: Assume a single block of vertically aligned text. - `SingleBlock = 5`: Assume a single block of text. - `SingleLine = 6`: Assume a single line of text. - `SingleWord = 7`: Assume a single word. - `CircleWord = 8`: Assume a single word in a circle. - `SingleChar = 9`: Assume a single char. - `SparseText = 10`: Find all text in no particular order. - `SparseTextOSD = 11`: Sparse text with OSD. - `RawLine = 12`: Treat as a raw line with no input processing. --- # OCRParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCRParams ```cpp class OCRParams ``` **Namespace:** `datalogics_interface` ## Description Parameters for configuring the OCR (Optical Character Recognition) engine. Parameters for configuring the OCR engine. OCRParams controls settings such as the engine to use, the resolution of the input images, the language(s) to recognize, performance tuning, page segmentation mode, candidate font names for placing text, and image preprocessing options. **Referenced by:** [`OCREngine`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCREngine.md) **Uses types:** [`OCRLanguageSetting`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/OCRLanguageSetting.md), [`OCRPageSegmentationMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRPageSegmentationMode.md), [`OCRPerformance`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRPerformance.md) ## Constructors ### OCRParams ```cpp datalogics_interface::OCRParams::OCRParams() ``` *constructor* Create OCRParams with defaults. ### OCRParams ```cpp datalogics_interface::OCRParams::OCRParams(const OCRParams &other) ``` *constructor* **Parameters** - `other` ([`const OCRParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCRParams.md)) Copy constructor. ### OCRParams ```cpp datalogics_interface::OCRParams::OCRParams(OCRParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`OCRParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCRParams.md)) ### ~OCRParams ```cpp datalogics_interface::OCRParams::~OCRParams() ``` *destructor* ## Methods ### get_candidate_font_names ```cpp std::vector< std::string > datalogics_interface::OCRParams::get_candidate_font_names() const ``` **Returns:** `std::vector< std::string >` The names of candidate fonts for placing text under an image. The default list should work well in most cases. If you're using text that isn't represented by Latin fonts, or by Chinese, Japanese, or Korean fonts, then retrieve this list, add the font that can represent that text, then set that new list on this object. Enough font names must be supplied to cover the expected languages/scripts in use. The code selects a font to represent each word. If a word code-switches between different scripts, for instance, if it contains non-Latin text and Arabic numerals, then make sure to supply the name of a font family that can handle both the text and the numerals. The quality of the results depends on the font choice. The list is searched in order until a font works for a particular word. To make the text fit better, it's recommended to list proportional fonts before fixed-width fonts. Decorative fonts with flourishes, like Zapf Chancery, deliver poor results. Generally, supply a font that would be used in block text, such as in a newspaper or work of literature, such as Times Roman, or a font already in the list, like MinionPro. If the PlaceTextUnder method in OCREngine can't identify a font that covers the whole text of a word, an exception will be thrown. ### get_enable_image_preprocessing ```cpp bool datalogics_interface::OCRParams::get_enable_image_preprocessing() const ``` **Returns:** `bool` Get the image preprocessing enable state. True if any image preprocessing is on. ### get_engine ```cpp std::string datalogics_interface::OCRParams::get_engine() const ``` **Returns:** `std::string` The name of the OCR engine to use. Use the Tesseract4Engine constant to select the Tesseract v4 engine. ### get_languages ```cpp std::vector< OCRLanguageSetting > datalogics_interface::OCRParams::get_languages() const ``` **Returns:** [`std::vector< OCRLanguageSetting >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/OCRLanguageSetting.md) The list of languages the OCR engine should recognize. ### get_page_segmentation_mode ```cpp OCRPageSegmentationMode datalogics_interface::OCRParams::get_page_segmentation_mode() const ``` **Returns:** [`OCRPageSegmentationMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRPageSegmentationMode.md) The page segmentation mode, which controls how the OCR engine detects text regions on the page. ### get_performance ```cpp OCRPerformance datalogics_interface::OCRParams::get_performance() const ``` **Returns:** [`OCRPerformance`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRPerformance.md) The desired performance mode for the OCR engine, balancing speed versus accuracy. ### get_resolution ```cpp double datalogics_interface::OCRParams::get_resolution() const ``` **Returns:** `double` The resolution, in DPI, at which images are rendered for OCR processing. ### operator= ```cpp OCRParams & datalogics_interface::OCRParams::operator=(const OCRParams &other) ``` **Parameters** - `other` ([`const OCRParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCRParams.md)) **Returns:** [`OCRParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCRParams.md) Copy assignment. ### operator= ```cpp OCRParams & datalogics_interface::OCRParams::operator=(OCRParams &&) noexcept ``` **Parameters** - (unnamed) ([`OCRParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCRParams.md)) **Returns:** [`OCRParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OCRParams.md) ### set_candidate_font_names ```cpp void datalogics_interface::OCRParams::set_candidate_font_names(const std::vector< std::string > &font_names) ``` **Parameters** - `font_names` (`const std::vector< std::string > &`): the names of candidate fonts for placing text under an image **Returns:** `void` The names of candidate fonts for placing text under an image. The default list should work well in most cases. If you're using text that isn't represented by Latin fonts, or by Chinese, Japanese, or Korean fonts, then retrieve this list, add the font that can represent that text, then set that new list on this object. Enough font names must be supplied to cover the expected languages/scripts in use. The code selects a font to represent each word. If a word code-switches between different scripts, for instance, if it contains non-Latin text and Arabic numerals, then make sure to supply the name of a font family that can handle both the text and the numerals. The quality of the results depends on the font choice. The list is searched in order until a font works for a particular word. To make the text fit better, it's recommended to list proportional fonts before fixed-width fonts. Decorative fonts with flourishes, like Zapf Chancery, deliver poor results. Generally, supply a font that would be used in block text, such as in a newspaper or work of literature, such as Times Roman, or a font already in the list, like MinionPro. If the PlaceTextUnder method in OCREngine can't identify a font that covers the whole text of a word, an exception will be thrown. ### set_enable_image_preprocessing ```cpp void datalogics_interface::OCRParams::set_enable_image_preprocessing(bool enable) ``` **Parameters** - `enable` (`bool`): true to enable all image preprocessing, false to disable it. Once the OCREngine is initialized, this setting is permanent. **Returns:** `void` Enable all image preprocessing, default enabled. Note that once the OCREngine is initialized, this setting is permanent. ### set_engine ```cpp void datalogics_interface::OCRParams::set_engine(const std::string &value) ``` **Parameters** - `value` (`const std::string &`): the name of the OCR engine to use **Returns:** `void` The name of the OCR engine to use. Use the Tesseract4Engine constant to select the Tesseract v4 engine. ### set_languages ```cpp void datalogics_interface::OCRParams::set_languages(const std::vector< OCRLanguageSetting > &languages) ``` **Parameters** - `languages` ([`const std::vector< OCRLanguageSetting > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/OCRLanguageSetting.md)): the list of languages the OCR engine should recognize **Returns:** `void` The list of languages the OCR engine should recognize. ### set_page_segmentation_mode ```cpp void datalogics_interface::OCRParams::set_page_segmentation_mode(OCRPageSegmentationMode mode) ``` **Parameters** - `mode` ([`OCRPageSegmentationMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRPageSegmentationMode.md)): the page segmentation mode, which controls how the OCR engine detects text regions on the page **Returns:** `void` The page segmentation mode, which controls how the OCR engine detects text regions on the page. ### set_performance ```cpp void datalogics_interface::OCRParams::set_performance(OCRPerformance perf) ``` **Parameters** - `perf` ([`OCRPerformance`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRPerformance.md)): the desired performance mode for the OCR engine, balancing speed versus accuracy **Returns:** `void` The desired performance mode for the OCR engine, balancing speed versus accuracy. ### set_resolution ```cpp void datalogics_interface::OCRParams::set_resolution(double value) ``` **Parameters** - `value` (`double`): the resolution, in DPI, at which images are rendered for OCR processing **Returns:** `void` The resolution, in DPI, at which images are rendered for OCR processing. --- # OCRPerformance Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCRPerformance **Namespace:** `datalogics_interface` ## Description Performance mode for the OCR engine, balancing speed vs accuracy. Specify the performance of the OCR engine in an abstract way. In Tesseract, for instance, this changes the OCREngineMode. ## Values - `Default = 0`: Use the engine's default performance mode. - `Faster = 1`: Favor speed over accuracy. - `MoreAccuracy = 2`: Favor accuracy over speed. - `BestAccuracy = 3`: Use the most accurate mode available, at the cost of speed. --- # OperationCancelledException Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OperationCancelledException ```cpp class OperationCancelledException : runtime_error ``` **Namespace:** `datalogics_interface` **Inherits from:** `runtime_error` ## Description Thrown when a user-supplied progress callback returns false to cancel a long-running operation. Distinct from WebConvertError so that non-coupling catch handlers can quietly handle cancellation without also being aware of the web-conversion subsystem. ## Constructors ### OperationCancelledException ```cpp datalogics_interface::OperationCancelledException::OperationCancelledException() ``` *constructor* ### OperationCancelledException ```cpp datalogics_interface::OperationCancelledException::OperationCancelledException(const std::string &message) ``` *constructor* **Parameters** - `message` (`const std::string &`) --- # OptimizerCompressionType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerCompressionType **Namespace:** `datalogics_interface` ## Description Enumerator used to select type of compression used when images are recompressed. For color or grayscale images: Flate, JPEG or JPEG2000 may be selected. For black and white images: Flate, JBIG2, CCITTG3, or CCITTG4 may be selected. ## Values - `None = 0`: Do not replace compression type. - `Same = 1`: Recompress with the same compression. - `Flate = 2`: Recompress with Flate compression. - `JPEG = 3`: Recompress with JPEG. - `JPEG2000 = 4`: Recompress using JPEG2000. - `JBIG2 = 5`: Recompress with JBIG2. - `CCITTG4 = 6`: Recompress with CCITT Group 4. - `CCITTG3 = 7`: Recompress with CCITT Group 3. - `FlateJPEG = 8`: Recompress with Flate+JPEG. --- # OptimizerCompressQuality Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerCompressQuality **Namespace:** `datalogics_interface` ## Description Establish the compression quality to be used in compression schemas that allow variable quality. (JPEG, JPEG2000, JBIG2). Unset should be selected for compression schemes that are inherently lossless (Flate, CCITTG3, or CCITTG4). JBIG2 may select any value. JPEG and JPEG2000 can select any value between Minimum and Maximum, but should not select Unset or Lossless. ## Values - `Unset = 0`: No quality selected (appropriate for lossless schemes). - `Minimum = 1`: Minimum quality, smallest file size. - `Low = 2`: Low quality. - `Medium = 3`: Medium quality. - `High = 4`: High quality. - `Maximum = 5`: Maximum quality. - `Lossless = 6`: Lossless (Flate, CCITTG3/G4, JBIG2 only). --- # OptimizerImageType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerImageType **Namespace:** `datalogics_interface` ## Description Enumerator to allow the selection of image type to Set the values for resampling and recompression. ## Values - `Color = 1`: Color images. - `Gray = 2`: Grayscale images. - `BW = 3`: Black and white (monochrome) images. --- # OptimizerObjectCompression Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerObjectCompression **Namespace:** `datalogics_interface` ## Description Enumerator to allow the selection of object compression type to Set the values for object compression type. ## Values - `All = 0`: Compress all objects into object streams. - `None = 1`: No object compression. - `Structure = 2`: Compress only structure objects. - `LeaveUnchanged = 3`: Leave existing compression unchanged. --- # OptimizerOption Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerOption **Namespace:** `datalogics_interface` ## Description Select the optimization option to be set or obtained. ## Values - `DownsampleColor = 1`: Downsample color images above max DPI. Default: ON. - `RecompressColor = 2`: Recompress color images. Default: ON. - `DownsampleGray = 3`: Downsample grayscale images above max DPI. Default: ON. - `RecompressGray = 4`: Recompress grayscale images. Default: ON. - `DownsampleBW = 5`: Downsample B&W images above max DPI. Default: ON. - `RecompressBW = 6`: Recompress B&W images. Default: ON. - `RecompressOnlyIfSmaller = 7`: Only replace if result is smaller. Default: ON. - `DiscardAlternateImages = 8`: Discard alternate images. Default: ON. - `SubsetAllEmbeddedFonts = 9`: Subset all embedded fonts. Default: ON. - `RemoveAllEmbeddedFonts = 10`: Remove all embedded fonts. Default: OFF. - `RemoveAllBase14Fonts = 11`: Remove embedded base-14 fonts. Default: OFF. - `MergeDuplicateFonts = 12`: Merge duplicate fonts. Default: ON. - `DiscardBookmarks = 13`: Discard bookmarks. Default: OFF. - `DiscardAcroforms = 14`: Discard AcroForms. Default: ON. - `DiscardOutputIntent = 15`: Discard output intent. Default: OFF. - `DiscardThumbnails = 16`: Discard thumbnails. Default: ON. - `DiscardPageLabels = 17`: Discard page labels. Default: ON. - `DiscardNameTrees = 18`: Discard name trees. Default: ON. - `DiscardStructureTrees = 19`: Discard structure trees. Default: OFF. - `DiscardFileAttachments = 20`: Discard file attachments. Default: ON. - `DiscardXMPPadding = 21`: Discard XMP padding. Default: ON. - `DiscardUnusedForms = 22`: Discard unused form XObjects. Default: ON. - `DiscardPieceData = 23`: Discard private PieceData. Default: ON. - `CompressStreams = 24`: Compress uncompressed streams. Default: ON. - `ReplaceLZW = 25`: Replace LZW with Flate. Default: ON. - `DiscardMetadata = 26`: Discard non-document metadata. Default: OFF. - `DiscardDocumentInfo = 27`: Discard document info. Default: OFF. - `OptimizeContentStreams = 28`: Optimize content streams. Default: ON. - `Linearize = 29`: Linearize output. Default: OFF. - `DiscardDuplicateForms = 30`: Discard duplicate forms. Default: ON. - `DiscardDuplicateObjects = 31`: Discard duplicate objects. Default: ON. - `DiscardASCIIFilters = 32`: Discard ASCII filters. Default: ON. - `DiscardComments = 33`: Discard markup annotations (comments). Default: OFF. - `DiscardAnnotations = 34`: Discard all annotations. Default: OFF. - `DiscardJavaScriptActions = 35`: Discard JavaScript actions. Default: OFF. - `FlattenOptionalContent = 36`: Flatten optional content. Default: OFF. - `ReSubsetAllSubsetFonts = 37`: Re-subset already subset fonts. Default: ON. - `DownConvert16To8BpcImages = 38`: Down-convert 16 bpc images to 8 bpc. Default: ON. - `DiscardUnusedImages = 39`: Discard unused images. Default: ON. - `DiscardUnusedFonts = 40`: Discard unused fonts. Default: ON. --- # OptionalContentBaseState Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptionalContentBaseState **Namespace:** `datalogics_interface` ## Description Enumerates the base visibility states for optional content groups in an OptionalContentConfig. These values determine the default ON/OFF state applied to optional content groups when an OptionalContentConfig is used to initialize an OptionalContentContext. ## Values - `Off = 0`: OptionalContentGroups affected by this OptionalContentConfig should be off by default - `On = 1`: OptionalContentGroups affected by this OptionalContentConfig should be on by default - `Unchanged = 2`: OptionalContentGroups affected by this OptionalContentConfig should remain in the same state --- # OptionalContentConfig Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentConfig ```cpp class OptionalContentConfig ``` **Namespace:** `datalogics_interface` ## Description A structure used to store data related to layers in a PDF. The Optional Content Configuration Structure is used to maintain a set of visibility states and other optional values related to layers, or Optional Content Groups, within a PDF file. These configuration values are stored for future use. The default configuration for a PDF document is stored in the D entry in the Optional Content Properties dictionary. An Optional Content Group, or layer, is a set of graphic images that can be made visible or invisible within a PDF file, and the Optional Content Configuration Structure is typically used to set the initial value for these images-On or Off, visible or invisible. **Uses types:** [`OptionalContentBaseState`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptionalContentBaseState.md), [`OptionalContentGroup`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md), [`OptionalContentOrderArray`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderArray.md), [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) ## Constructors ### OptionalContentConfig ```cpp datalogics_interface::OptionalContentConfig::OptionalContentConfig() ``` *constructor* Create an OCConfig from an internal source Internal only. ### OptionalContentConfig ```cpp datalogics_interface::OptionalContentConfig::OptionalContentConfig(const Document &doc) ``` *constructor* **Parameters** - `doc` ([`const Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): the Document the OCConfig is in Create an OCConfig from an internal source Internal only. ### OptionalContentConfig ```cpp datalogics_interface::OptionalContentConfig::OptionalContentConfig(OptionalContentConfig &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`OptionalContentConfig &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentConfig.md)) ### ~OptionalContentConfig ```cpp datalogics_interface::OptionalContentConfig::~OptionalContentConfig() ``` *destructor* ## Methods ### get_base_state ```cpp OptionalContentBaseState datalogics_interface::OptionalContentConfig::get_base_state() const ``` **Returns:** [`OptionalContentBaseState`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptionalContentBaseState.md) The base state that will be applied to OptionalContentGroups. Get the base state for this OptionalContentConfig. When this config is applied to an OptionalContentContext, all OptionalContentGroups will be set to according to this base state: If BaseState is set to BaseStateOff, when this OptionalContentConfig is applied to an OptionalContentContext: All OptionalContentGroups in the document are set to OFF, and Any OptionalContentGroups in this OptionalContentConfig's ON array are then set to on. If BaseState is set to BaseStateOn, when this OptionalContentConfig is applied to an OptionalContentContext: All OptionalContentGroups in the document are set to ON, and Any OptionalContentGroups in this OptionalContentConfig's OFF array are then set to off. If BaseState is set to BaseStateUnchanged, when this OptionalContentConfig is applied to an OptionalContentContext: Any OptionalContentGroups in this OptionalContentConfig's ON array are set to on Any OptionalContentGroups in this OptionalContentConfig's OFF array are set to off Any OptionalContentGroups in neither the ON or OFF array are unaffected ### get_intent ```cpp std::vector< std::string > datalogics_interface::OptionalContentConfig::get_intent() const ``` **Returns:** `std::vector< std::string >` An array containing intent strings. Gets the intent list for an OptionalContentConfig. An intent is a string value broadly describing the intended use, either View or Design. A config's intent is used to set the intent of an OptionalContentContext when this config is applied to the context. ### get_name ```cpp std::string datalogics_interface::OptionalContentConfig::get_name() const ``` **Returns:** `std::string` The name of this OptionalContentConfig. Use null to remove the name. Get the name of the OptionalContentConfig ### get_off_array ```cpp std::vector< OptionalContentGroup > datalogics_interface::OptionalContentConfig::get_off_array() const ``` **Returns:** [`std::vector< OptionalContentGroup >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md) A list of all OptionalContentGroups in the OFF array Get the list of OptionalContentGroups in the OFF array. When this config is applied to an OptionalContentContext, the OptionalContentGroups in this array will be set to OFF. This list is ignored if the BaseState is BaseStateOff; please see the description of the BaseState property for details. Note that an OptionalContentGroup should not be in both the ON array and the OFF array. ### get_on_array ```cpp std::vector< OptionalContentGroup > datalogics_interface::OptionalContentConfig::get_on_array() const ``` **Returns:** [`std::vector< OptionalContentGroup >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md) A list of all OptionalContentGroups in the ON array Get the list of OptionalContentGroups in the ON array. When this config is applied to an OptionalContentContext, the OptionalContentGroups in this array will be set to ON. This list is ignored if the BaseState is BaseStateOn; please see the description of the BaseState property for details. Note that an OptionalContentGroup should not be in both the ON array and the OFF array. ### get_order ```cpp std::unique_ptr< OptionalContentOrderArray > datalogics_interface::OptionalContentConfig::get_order() const ``` **Returns:** [`std::unique_ptr< OptionalContentOrderArray >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderArray.md) The OptionalContentOrderArray for optional content in this optional content config. Gets the order list for the optional content in this optional content config. Note that you can set the Title property on this order list, just as on any other OptionalContentOrderArray, and it will save as a legal PDF. However, the Title property on the top level order array simply appears as an extraneous text label in a PDF Viewer Layers panel, so its use at this level is typically not required. ### get_pdf_dict ```cpp PDFDict datalogics_interface::OptionalContentConfig::get_pdf_dict() const ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The underlying PDF dictionary for this OptionalContentConfig. Retrieve the PDFObject representation of this object. ### operator= ```cpp OptionalContentConfig & datalogics_interface::OptionalContentConfig::operator=(OptionalContentConfig &&) noexcept ``` **Parameters** - (unnamed) ([`OptionalContentConfig &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentConfig.md)) **Returns:** [`OptionalContentConfig &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentConfig.md) ### set_base_state ```cpp void datalogics_interface::OptionalContentConfig::set_base_state(OptionalContentBaseState base_state) ``` **Parameters** - `base_state` ([`OptionalContentBaseState`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptionalContentBaseState.md)): The base state that will be applied to OptionalContentGroups. **Returns:** `void` Set the base state for this OptionalContentConfig. When this config is applied to an OptionalContentContext, all OptionalContentGroups will be set to according to this base state: If BaseState is set to BaseStateOff, when this OptionalContentConfig is applied to an OptionalContentContext: All OptionalContentGroups in the document are set to OFF, and Any OptionalContentGroups in this OptionalContentConfig's ON array are then set to on. If BaseState is set to BaseStateOn, when this OptionalContentConfig is applied to an OptionalContentContext: All OptionalContentGroups in the document are set to ON, and Any OptionalContentGroups in this OptionalContentConfig's OFF array are then set to off. If BaseState is set to BaseStateUnchanged, when this OptionalContentConfig is applied to an OptionalContentContext: Any OptionalContentGroups in this OptionalContentConfig's ON array are set to on Any OptionalContentGroups in this OptionalContentConfig's OFF array are set to off Any OptionalContentGroups in neither the ON or OFF array are unaffected ### set_intent ```cpp void datalogics_interface::OptionalContentConfig::set_intent(const std::vector< std::string > &intents) ``` **Parameters** - `intents` (`const std::vector< std::string > &`): An array of intent strings to assign to this config. **Returns:** `void` Sets the intent list for an OptionalContentConfig. An intent is a string value broadly describing the intended use, either View or Design. A config's intent is used to set the intent of an OptionalContentContext when this config is applied to the context. ### set_name ```cpp void datalogics_interface::OptionalContentConfig::set_name(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): The name of this OptionalContentConfig. Use null to remove the name. **Returns:** `void` Set the name of the optional content group ### set_off_array ```cpp void datalogics_interface::OptionalContentConfig::set_off_array(std::vector< OptionalContentGroup > ocgs) ``` **Parameters** - `ocgs` ([`std::vector< OptionalContentGroup >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md)): A list of all OptionalContentGroups to be placed in the OFF array **Returns:** `void` Set the list of OptionalContentGroups in the OFF array. When this config is applied to an OptionalContentContext, the OptionalContentGroups in this array will be set to OFF. This list is ignored if the BaseState is BaseStateOff; please see the description of the BaseState property for details. Note that an OptionalContentGroup should not be in both the ON array and the OFF array. ### set_on_array ```cpp void datalogics_interface::OptionalContentConfig::set_on_array(std::vector< OptionalContentGroup > ocgs) ``` **Parameters** - `ocgs` ([`std::vector< OptionalContentGroup >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md)): A list of all OptionalContentGroups to be placed in the ON array **Returns:** `void` Set the list of OptionalContentGroups in the ON array. When this config is applied to an OptionalContentContext, the OptionalContentGroups in this array will be set to ON. This list is ignored if the BaseState is BaseStateOn; please see the description of the BaseState property for details. Note that an OptionalContentGroup should not be in both the ON array and the OFF array. --- # OptionalContentContext Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentContext ```cpp class OptionalContentContext ``` **Namespace:** `datalogics_interface` ## Description Defines the context for optional content in a PDF. An Optional Content Context is a status object that defines the context for optional content within a document. The context tracks the On/Off status for Optional Content Groups (layers) within a document. It contains flags that control whether to display content that is marked as optional. **Referenced by:** [`DrawParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DrawParams.md), [`OptionalContentContext`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentContext.md) **Uses types:** [`OCDrawingPolicy`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCDrawingPolicy.md), [`OptionalContentContext`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentContext.md), [`OptionalContentGroup`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md) ## Constructors ### OptionalContentContext ```cpp datalogics_interface::OptionalContentContext::OptionalContentContext(const Document &document) ``` *constructor* **Parameters** - `document` ([`const Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The document for which to create a context. Creates a context object that represents an optional-content state of the document, using the current state as the initial state for each group (OCG), as determined by the document's optional-content configuration. ### OptionalContentContext ```cpp datalogics_interface::OptionalContentContext::OptionalContentContext(OptionalContentContext &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`OptionalContentContext &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentContext.md)) ### ~OptionalContentContext ```cpp datalogics_interface::OptionalContentContext::~OptionalContentContext() ``` *destructor* ## Methods ### clone ```cpp std::unique_ptr< OptionalContentContext > datalogics_interface::OptionalContentContext::clone() ``` **Returns:** [`std::unique_ptr< OptionalContentContext >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentContext.md) A copy of the original optional content context. Makes a copy of the optional content context. ### get_draw_optional_content ```cpp OCDrawingPolicy datalogics_interface::OptionalContentContext::get_draw_optional_content() ``` **Returns:** [`OCDrawingPolicy`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCDrawingPolicy.md) The drawing policy for optional content in this optional content context. Gets the drawing policy for the optional content in this optional content context. ### get_ocg_states ```cpp std::vector< bool > datalogics_interface::OptionalContentContext::get_ocg_states(const std::vector< OptionalContentGroup > &ocgs) ``` **Parameters** - `ocgs` ([`const std::vector< OptionalContentGroup > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md)): A list of optional-content groups whose states are obtained. **Returns:** `std::vector< bool >` An array of OCG states corresponding to the array of OCGs, true for ON and false for OFF. Gets the ON-OFF states for the given optional-content groups (OCGs) in the given optional-content context. ### get_state_of_ocg ```cpp bool datalogics_interface::OptionalContentContext::get_state_of_ocg(OptionalContentGroup &ocg) ``` **Parameters** - `ocg` ([`OptionalContentGroup &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md)): The optional content group whose state will be retrieved. **Returns:** `bool` true if the OCG is ON, false if it is OFF. Gets the ON-OFF state for the given optional content group (OCG) in this optional content context. ### operator= ```cpp OptionalContentContext & datalogics_interface::OptionalContentContext::operator=(OptionalContentContext &&) noexcept ``` **Parameters** - (unnamed) ([`OptionalContentContext &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentContext.md)) **Returns:** [`OptionalContentContext &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentContext.md) ### operator== ```cpp bool datalogics_interface::OptionalContentContext::operator==(const OptionalContentContext &other) const ``` **Parameters** - `other` ([`const OptionalContentContext &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentContext.md)): The OptionalContentContext to compare with. **Returns:** `bool` true if the two objects refer to the same context, false otherwise. Determines whether this OptionalContentContext is equal to another. Two OptionalContentContexts are considered equal if they refer to the same underlying optional content context object. ### set_draw_optional_content ```cpp void datalogics_interface::OptionalContentContext::set_draw_optional_content(OCDrawingPolicy policy) ``` **Parameters** - `policy` ([`OCDrawingPolicy`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OCDrawingPolicy.md)): The new drawing policy for optional content in this optional content context. **Returns:** `void` Sets the drawing policy for the optional content in this optional content context. ### set_ocg_states ```cpp void datalogics_interface::OptionalContentContext::set_ocg_states(const std::vector< OptionalContentGroup > &ocgs, const std::vector< bool > &new_states) ``` **Parameters** - `ocgs` ([`const std::vector< OptionalContentGroup > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md)): A list of optional-content groups. - `new_states` (`const std::vector< bool > &`): A list of new OCG states corresponding to the list of OCGs, true for ON and false for OFF. The list must contain as many states as there are non-NULL OCGs in the pdocgs list. **Returns:** `void` Sets the ON-OFF states for the given optional-content groups (OCGs) in the given optional-content context. The newStates vector must be large enough to hold as many Boolean values as there are OCGs. ### set_state_of_ocg ```cpp void datalogics_interface::OptionalContentContext::set_state_of_ocg(OptionalContentGroup &ocg, bool new_value) ``` **Parameters** - `ocg` ([`OptionalContentGroup &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md)): The optional content group whose state will be set. - `new_value` (`bool`): The new ON-OFF state for the optional content group. **Returns:** `void` Sets the ON-OFF state for the given optional content group (OCG) in this optional content context. ### to_string ```cpp std::string datalogics_interface::OptionalContentContext::to_string() ``` **Returns:** `std::string` A string describing the state of all optional content groups in this context. Returns a string representation of this OptionalContentContext. The string lists all optional content groups in the document along with their ON/OFF states in this context. --- # OptionalContentGroup Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup ```cpp class OptionalContentGroup ``` **Namespace:** `datalogics_interface` ## Description A dictionary used to manage graphics images in a PDF. 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." **Referenced by:** [`Document`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md), [`OptionalContentConfig`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentConfig.md), [`OptionalContentContext`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentContext.md), [`OptionalContentMembershipDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentMembershipDict.md), [`OptionalContentOrderLeaf`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderLeaf.md) **Uses types:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) ## Constructors ### OptionalContentGroup ```cpp datalogics_interface::OptionalContentGroup::OptionalContentGroup() ``` *constructor* Create a new OptionalContentGroup. ### OptionalContentGroup ```cpp datalogics_interface::OptionalContentGroup::OptionalContentGroup(const Document &doc, const std::string &name) ``` *constructor* **Parameters** - `doc` ([`const Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): 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 ```cpp datalogics_interface::OptionalContentGroup::OptionalContentGroup(OptionalContentGroup &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`OptionalContentGroup &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md)) ### ~OptionalContentGroup ```cpp datalogics_interface::OptionalContentGroup::~OptionalContentGroup() ``` *destructor* ## Methods ### get_intent ```cpp std::vector< std::string > datalogics_interface::OptionalContentGroup::get_intent() const ``` **Returns:** `std::vector< std::string >` 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 ```cpp std::string datalogics_interface::OptionalContentGroup::get_name() const ``` **Returns:** `std::string` the name Get the name of the optional content group ### get_pdf_dict ```cpp PDFDict datalogics_interface::OptionalContentGroup::get_pdf_dict() ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The underlying PDF dictionary for this OptionalContentGroup. Retrieve the PDFObject representation of this object. ### operator= ```cpp OptionalContentGroup & datalogics_interface::OptionalContentGroup::operator=(OptionalContentGroup &&) noexcept ``` **Parameters** - (unnamed) ([`OptionalContentGroup &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md)) **Returns:** [`OptionalContentGroup &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md) ### operator== ```cpp bool datalogics_interface::OptionalContentGroup::operator==(const OptionalContentGroup &other) const ``` **Parameters** - `other` ([`const OptionalContentGroup &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md)): The OptionalContentGroup to compare with. **Returns:** `bool` true if the two objects refer to the same optional content group, false otherwise. Determines whether this OptionalContentGroup is equal to another. Two OptionalContentGroups are considered equal if they refer to the same underlying optional content group object. ### set_intent ```cpp void datalogics_interface::OptionalContentGroup::set_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 ```cpp void datalogics_interface::OptionalContentGroup::set_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 ```cpp std::string datalogics_interface::OptionalContentGroup::to_string() const ``` **Returns:** `std::string` A string describing this OptionalContentGroup. Returns a string representation of this OptionalContentGroup. The string includes the group's name and its intent list. --- # OptionalContentMembershipDict Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentMembershipDict ```cpp class OptionalContentMembershipDict ``` **Namespace:** `datalogics_interface` ## Description Attaches content to one or more optional content groups. Form, container, and annotation objects can be associated with one or more optional content groups. By associating them with an optional content group, they become part of that 'layer', and the user can control the visibility of the content. Note that by placing other element objects in a container, they can also be associated with an optional content group. An OptionalContentMembershipDict connects content to the OptionalContentGroup; it contains a list of OptionalContentGroups, and rules for determining visibility when the OptionalContentGroups have conflicting on/off states in the active OptionalContentContext. An OptionalContentMembershipDict cannot be changed once created; you must create a new OptionalContentMembershipDict and change the objects to point to it. **Referenced by:** [`Container`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) **Uses types:** [`OptionalContentGroup`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md), [`PDFArray`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFArray.md), [`VisibilityPolicy`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/VisibilityPolicy.md) ## Constructors ### OptionalContentMembershipDict ```cpp datalogics_interface::OptionalContentMembershipDict::OptionalContentMembershipDict(const Document &doc, const std::vector< OptionalContentGroup > &ocgs, VisibilityPolicy vp) ``` *constructor* **Parameters** - `doc` ([`const Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The document that the new OptionalContentMembershipDict will belong to. - `ocgs` ([`const std::vector< OptionalContentGroup > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md)): The list of OptionalContentGroups this MembershipDict refers to. - `vp` ([`VisibilityPolicy`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/VisibilityPolicy.md)): The VisibilityPolicy of this MembershipDict. Create a new OptionalContentMembershipDict. ### OptionalContentMembershipDict ```cpp datalogics_interface::OptionalContentMembershipDict::OptionalContentMembershipDict(const Document &doc, const std::vector< OptionalContentGroup > &ocgs, VisibilityPolicy vp, const PDFArray &visibility_expression) ``` *constructor* **Parameters** - `doc` ([`const Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The document that the new OptionalContentMembershipDict will belong to. - `ocgs` ([`const std::vector< OptionalContentGroup > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md)): The list of OptionalContentGroups this MembershipDict refers to. - `vp` ([`VisibilityPolicy`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/VisibilityPolicy.md)): The VisibilityPolicy of this MembershipDict. - `visibility_expression` ([`const PDFArray &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFArray.md)) Create a new OptionalContentMembershipDict. ### OptionalContentMembershipDict ```cpp datalogics_interface::OptionalContentMembershipDict::OptionalContentMembershipDict(OptionalContentMembershipDict &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`OptionalContentMembershipDict &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentMembershipDict.md)) ### ~OptionalContentMembershipDict ```cpp datalogics_interface::OptionalContentMembershipDict::~OptionalContentMembershipDict() ``` *destructor* ## Methods ### get_optional_content_groups ```cpp std::vector< OptionalContentGroup > datalogics_interface::OptionalContentMembershipDict::get_optional_content_groups() const ``` **Returns:** [`std::vector< OptionalContentGroup >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md) An array containing OptionalContentGroups. Gets the list of OptionalContentGroups for this membership dictionary. This may consist of one OCG or several. ### get_visibility_expression ```cpp std::unique_ptr< PDFArray > datalogics_interface::OptionalContentMembershipDict::get_visibility_expression() const ``` **Returns:** [`std::unique_ptr< PDFArray >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFArray.md) A Visibility Expression array. GetVisibilityExpression Gets the Visibility Expression for this membership dictionary. ### get_visibility_policy ```cpp VisibilityPolicy datalogics_interface::OptionalContentMembershipDict::get_visibility_policy() const ``` **Returns:** [`VisibilityPolicy`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/VisibilityPolicy.md) A Visibility Policy. Gets the Visbility Policy for this membership dictionary. ### operator= ```cpp OptionalContentMembershipDict & datalogics_interface::OptionalContentMembershipDict::operator=(OptionalContentMembershipDict &&) noexcept ``` **Parameters** - (unnamed) ([`OptionalContentMembershipDict &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentMembershipDict.md)) **Returns:** [`OptionalContentMembershipDict &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentMembershipDict.md) ### operator== ```cpp bool datalogics_interface::OptionalContentMembershipDict::operator==(const OptionalContentMembershipDict &other) const ``` **Parameters** - `other` ([`const OptionalContentMembershipDict &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentMembershipDict.md)): The OptionalContentMembershipDict to compare with. **Returns:** `bool` true if both objects refer to the same membership dictionary; false otherwise. Determines whether this OptionalContentMembershipDict is equal to another. Two OptionalContentMembershipDict objects are considered equal if they refer to the same underlying PDOCMD object. ### to_string ```cpp std::string datalogics_interface::OptionalContentMembershipDict::to_string() const ``` **Returns:** `std::string` A string describing this OptionalContentMembershipDict. Returns a string representation of this OptionalContentMembershipDict. The string includes the names of all associated OptionalContentGroups and the current VisibilityPolicy. --- # OptionalContentOrderArray Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderArray ```cpp class OptionalContentOrderArray : OptionalContentOrderNode ``` **Namespace:** `datalogics_interface` **Inherits from:** [`OptionalContentOrderNode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderNode.md) ## Description Array node class for items in the OptionalContentConfig Order array. Items in the Order array can be arranged into a tree structure; subarrays within the parent array form 'branches' of the tree. Each OptionalContentOrderArray may contain OptionalContentOrderLeafs or OptionalContentOrderArrays in a specific order; this order determines how they will appear in the 'Layers' control of the viewer. By placing OptionalContentOrderArrays into a higher-level array, branches can be added to the tree. The 'Title' property is a string that will appear next to the expand/collapse branch control in a PDF Viewer 'Layers' panel. **Referenced by:** [`OptionalContentConfig`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentConfig.md) **Uses types:** [`OptionalContentOrderNode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderNode.md) ## Constructors ### OptionalContentOrderArray ```cpp datalogics_interface::OptionalContentOrderArray::OptionalContentOrderArray(Document &doc) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The Document this OptionalContentOrderArray is being created in Create an OptionalContentOrderArray with no title. ### OptionalContentOrderArray ```cpp datalogics_interface::OptionalContentOrderArray::OptionalContentOrderArray(Document &doc, const std::string &title) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The Document this OptionalContentOrderArray is being created in - `title` (`const std::string &`) Create an OptionalContentOrderArray with no title. ### OptionalContentOrderArray ```cpp datalogics_interface::OptionalContentOrderArray::OptionalContentOrderArray(OptionalContentOrderArray &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`OptionalContentOrderArray &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderArray.md)) ### ~OptionalContentOrderArray ```cpp datalogics_interface::OptionalContentOrderArray::~OptionalContentOrderArray() override ``` *destructor* ## Methods ### add ```cpp void datalogics_interface::OptionalContentOrderArray::add(OptionalContentOrderNode &node) ``` **Parameters** - `node` ([`OptionalContentOrderNode &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderNode.md)): The OptionalContentOrderNode to append to the Array **Returns:** `void` Adds an OptionalContentOrderNode to the end of the Array. ### get ```cpp std::unique_ptr< OptionalContentOrderNode > datalogics_interface::OptionalContentOrderArray::get(int index) ``` **Parameters** - `index` (`int`): The index at which to fetch an OptionalContentOrderNode. **Returns:** [`std::unique_ptr< OptionalContentOrderNode >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderNode.md) An OptionalContentOrderNode, or null if there is nothing at that index. Returns the OptionalContentOrderNode at the given index. ### get_length ```cpp int datalogics_interface::OptionalContentOrderArray::get_length() const ``` **Returns:** `int` The number of nodes in this array. Gets the number of OptionalContentOrderNodes in this array. ### get_title ```cpp std::string datalogics_interface::OptionalContentOrderArray::get_title() const ``` **Returns:** `std::string` The title string of this OptionalContentOrderArray, or NULL if no title is set. Gets the title string of this Array. This title will appear next to the expand/collapse control in the 'Layers' panel of a PDF Viewer. ### insert ```cpp void datalogics_interface::OptionalContentOrderArray::insert(int index, OptionalContentOrderNode &node) ``` **Parameters** - `index` (`int`): The index at which to insert the Node - `node` ([`OptionalContentOrderNode &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderNode.md)): The OptionalContentOrderNode to insert in the Array **Returns:** `void` Inserts an OptionalContentOrderNode at the given index, displacing existing objects. All objects following this will have their index increased by one. ### operator= ```cpp OptionalContentOrderArray & datalogics_interface::OptionalContentOrderArray::operator=(OptionalContentOrderArray &&) noexcept ``` **Parameters** - (unnamed) ([`OptionalContentOrderArray &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderArray.md)) **Returns:** [`OptionalContentOrderArray &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderArray.md) ### put ```cpp void datalogics_interface::OptionalContentOrderArray::put(int index, OptionalContentOrderNode &node) ``` **Parameters** - `index` (`int`): The index at which to replace the existing Node - `node` ([`OptionalContentOrderNode &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderNode.md)): The OptionalContentOrderNode to place in the Array **Returns:** `void` Puts an OptionalContentOrderNode at the given index, replacing the existing item. The index can be greater than the current length of the array; the array will be extended and the empty slots filled with null objects. ### remove_at ```cpp void datalogics_interface::OptionalContentOrderArray::remove_at(int index) ``` **Parameters** - `index` (`int`): The index of the OptionalContentOrderNode to remove **Returns:** `void` Removes the OptionalContentOrderNode at the given index. The length of the array is reduced by 1. ### set_title ```cpp void datalogics_interface::OptionalContentOrderArray::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): The title string of this OptionalContentOrderArray, or NULL to remove the title. **Returns:** `void` Sets the title string of this Array. This title will appear next to the expand/collapse control in the 'Layers' panel of a PDF Viewer. This field may be set to NULL to remove the title. ### try_as ```cpp T * datalogics_interface::OptionalContentOrderNode::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this node to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::OptionalContentOrderNode::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # OptionalContentOrderLeaf Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderLeaf ```cpp class OptionalContentOrderLeaf : OptionalContentOrderNode ``` **Namespace:** `datalogics_interface` **Inherits from:** [`OptionalContentOrderNode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderNode.md) ## Description Leaf node class for items in the OptionalContentConfig Order array. Items in the Order array can be arranged into a tree structure. Each 'leaf' on this tree would be an OptionalContentOrderLeaf that contains a reference to an OptionalContentGroup in this document. **Uses types:** [`OptionalContentGroup`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md) ## Constructors ### OptionalContentOrderLeaf ```cpp datalogics_interface::OptionalContentOrderLeaf::OptionalContentOrderLeaf(OptionalContentGroup &ocg) ``` *constructor* **Parameters** - `ocg` ([`OptionalContentGroup &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md)): The OptionalContentGroup this object will refer to. Create an OptionalContentOrderLeaf that refers to the OptionalContentGroup. ### OptionalContentOrderLeaf ```cpp datalogics_interface::OptionalContentOrderLeaf::OptionalContentOrderLeaf(OptionalContentOrderLeaf &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`OptionalContentOrderLeaf &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderLeaf.md)) ### ~OptionalContentOrderLeaf ```cpp datalogics_interface::OptionalContentOrderLeaf::~OptionalContentOrderLeaf() override ``` *destructor* ## Methods ### get_optional_content_group ```cpp OptionalContentGroup datalogics_interface::OptionalContentOrderLeaf::get_optional_content_group() ``` **Returns:** [`OptionalContentGroup`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md) The OptionalContentGroup this object refers to. Gets the OptionalContentGroup referred to by this OptionalContentOrderLeaf. ### operator= ```cpp OptionalContentOrderLeaf & datalogics_interface::OptionalContentOrderLeaf::operator=(OptionalContentOrderLeaf &&) noexcept ``` **Parameters** - (unnamed) ([`OptionalContentOrderLeaf &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderLeaf.md)) **Returns:** [`OptionalContentOrderLeaf &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderLeaf.md) ### try_as ```cpp T * datalogics_interface::OptionalContentOrderNode::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this node to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::OptionalContentOrderNode::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # OptionalContentOrderNode Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderNode ```cpp class OptionalContentOrderNode ``` **Namespace:** `datalogics_interface` **Derived classes:** [`OptionalContentOrderArray`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderArray.md), [`OptionalContentOrderLeaf`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderLeaf.md) ## Description Base class for items in the OptionalContentConfig Order array. Items in the OptionalContentConfig's Order array are either OptionalContentOrderLeaf or OptionalContentOrderArray. This is the base class for both; you cannot instantiate an OptionalContentOrderNode, only one of its child classes. **Referenced by:** [`OptionalContentOrderArray`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentOrderArray.md) ## Constructors ### ~OptionalContentOrderNode ```cpp virtual datalogics_interface::OptionalContentOrderNode::~OptionalContentOrderNode() ``` *destructor* ## Methods ### try_as ```cpp T * datalogics_interface::OptionalContentOrderNode::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this node to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::OptionalContentOrderNode::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # OverprintMode Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OverprintMode **Namespace:** `datalogics_interface` ## Description A code specifying whether a color component value of 0 in a DeviceCMYK color space should erase that component or leave it unchanged when overprinting. ## Values - `EraseComponent = 0`: A color component value of 0 in a DeviceCMYK color space should erase the component. - `LeaveUnchanged = 1`: A color component value of 0 in a DeviceCMYK color space should leave it unchanged. --- # Page Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page ```cpp class Page ``` **Namespace:** `datalogics_interface` ## Description Represents a page within a PDF file. The page is the basic object used for organizing content in a PDF document. Threading: single-thread use. A `Page` is bound to its owning `Document`'s thread; do not share it across threads. See `datalogics_interface.hpp` for the full threading model. Lifetime: a `Page` must not outlive the `Document` that produced it. **Referenced by:** [`Document`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md), [`StructElement`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md) **Uses types:** [`Annotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md), [`Content`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md), [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md), [`ImageCollection`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageCollection.md), [`Ink`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Ink.md), [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md), [`PageRotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageRotation.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### Page ```cpp datalogics_interface::Page::Page(Page &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Page &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)) ### ~Page ```cpp datalogics_interface::Page::~Page() ``` *destructor* ## Methods ### add_qr_barcode ```cpp void datalogics_interface::Page::add_qr_barcode(const std::string &text, double x, double y, double width, double height) ``` **Parameters** - `text` (`const std::string &`): The Text to be encoded in the barcode - `x` (`double`): The horizontal location on the page in points - `y` (`double`): The vertical location on the page in points - `width` (`double`): The width of the barcode image in points - `height` (`double`): The height of the barcode image in points **Returns:** `void` Add a QR Two-Dimensional Barcode encoded with the specified Text to the page as an image. NOTE: The Error Correction Level is set to Medium. ### add_qr_barcode ```cpp bool datalogics_interface::Page::add_qr_barcode(QREncodeParams ¶ms) ``` **Parameters** - `params` ([`QREncodeParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/QREncodeParams.md)): The Text to be encoded in the barcode **Returns:** `bool` Add a QR Two-Dimensional Barcode encoded with the specified Text to the page as an image. NOTE: The Error Correction Level is set to Medium. ### as_pdf_object ```cpp PDFObject datalogics_interface::Page::as_pdf_object() const ``` **Returns:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) Non-owning handle to this page as a generic PDFObject. Returns a non-owning PDFObject handle to this page's underlying dict. Page dicts are always indirect, so the returned object's get_indirect() will be true; putting it into another PDFDict/PDFArray will therefore store an indirect reference. Suitable for storing in dicts/arrays as an indirect reference. ### create_annotation ```cpp std::unique_ptr< Annotation > datalogics_interface::Page::create_annotation(const std::string &sub_type, const Rect &rect) ``` **Parameters** - `sub_type` (`const std::string &`) - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)) **Returns:** [`std::unique_ptr< Annotation >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md) The newly created annotation. (Deprecated, function may be removed in the future. Instead, use the constructor for Annotation or a subclass of Annotation.) Creates a new annotation, associated with the specified page's Document, but not added to the page. Use AddAnnotation to add the annotation to the page. DeprecatedUse specific annotation subtype constructors instead ### draw_contents ```cpp std::vector< unsigned char > datalogics_interface::Page::draw_contents(const DrawParams ¶ms) ``` **Parameters** - `params` ([`const DrawParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DrawParams.md)): vector of pointers to a memory that we need to fill **Returns:** `std::vector< unsigned char >` Drawing separations to colorants' buffers of an image ### get_annotation ```cpp std::unique_ptr< Annotation > datalogics_interface::Page::get_annotation(int index) const ``` **Parameters** - `index` (`int`): The index of the annotation to get on a page. The first annotation on a page has an index of zero. **Returns:** [`std::unique_ptr< Annotation >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md) The indexed annotation object. Gets the annotIndex annotation on the page. ### get_art_box ```cpp Rect datalogics_interface::Page::get_art_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The ArtBox rectangle in user space coordinates. Get the page's ArtBox. The ArtBox defines the extent of the page's meaningful content (including potential white space) as intended by the page's creator. ### get_bbox ```cpp Rect datalogics_interface::Page::get_bbox() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The bounding box rectangle in user space coordinates. Get the page's Bounding Box. The BBox is the smallest rectangle that encloses all of the page's visible content. Unlike the other page boxes, it is calculated from the page content and cannot be set directly. ### get_bleed_box ```cpp Rect datalogics_interface::Page::get_bleed_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The BleedBox rectangle in user space coordinates. Get the page's BleedBox. The BleedBox defines the region to which the contents of the page shall be clipped when output in a production environment. It includes any extra bleed area needed to account for limitations of cutting, folding, and trimming equipment. ### get_content ```cpp Content datalogics_interface::Page::get_content() ``` **Returns:** [`Content`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md) The content for the page. Retrieve the page's content for inspection or editing. Repeated calls without an intervening `update_content()` return the same cached content. After `update_content()`, the next call returns a fresh content that reflects the committed state. Creates a Content from the Page object's contents and resources. Calls to GetContent without an intervening UpdateContent return the same cached Content object, so edits made through earlier handles are visible. After a call to UpdateContent, a subsequent GetContent returns a fresh Content that reflects the committed state. ### get_crop_box ```cpp Rect datalogics_interface::Page::get_crop_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The CropBox rectangle in user space coordinates. Get the page's CropBox. The CropBox defines the region to which the contents of the page are to be clipped (cropped) when displayed or printed. The default value is the page's MediaBox. ### get_image ```cpp Image datalogics_interface::Page::get_image(const Rect &export_rect) ``` **Parameters** - `export_rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A Rect describing the region of the page to export, specified in user space coordinates. One user unit corresponds to 1/72 inch. To export the entire page, set this parameter to the page's CropBox. User space coordinates correspond to the unrotated page; the rotation specified in Page.Rotation is not taken into account with these coordinates. **Returns:** [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md) An Image containing the rendered page region. Export a region of a PDF page to an Image object. This version of GetImage can be used to specify a particular size in pixels for the exported image by setting ImageParams.PixelWidth and/or ImageParams.PixelHeight. If the exportRect is smaller than the PDF page and ImageParams.PixelWidth and ImageParams.PixelHeight are set, then the resulting image will be of the size ImageParams.PixelWidth x ImageParams.PixelHeight and contain the area of the page inside the exportRect, scaled to fit. It is also possible to use this function by specifying only ImageParams.PixelWidth or only ImageParams.PixelHeight. When only one is specified, the function will calculate the other. ### get_image ```cpp Image datalogics_interface::Page::get_image(const Rect &export_rect, const PageImageParams ¶ms) ``` **Parameters** - `export_rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A Rect describing the region of the page to export, specified in user space coordinates. One user unit corresponds to 1/72 inch. To export the entire page, set this parameter to the page's CropBox. User space coordinates correspond to the unrotated page; the rotation specified in Page.Rotation is not taken into account with these coordinates. - `params` ([`const PageImageParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md)): A PageImageParams containing additional parameters for the exported image, including the exported image's pixel width, pixel height, and resolution. If these parameters are not specified, the pixel width and pixel height of the image are calculated using the exportRect and a resolution of 300.0. **Returns:** [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md) An Image containing the rendered page region. Export a region of a PDF page to an Image object. This version of GetImage can be used to specify a particular size in pixels for the exported image by setting ImageParams.PixelWidth and/or ImageParams.PixelHeight. If the exportRect is smaller than the PDF page and ImageParams.PixelWidth and ImageParams.PixelHeight are set, then the resulting image will be of the size ImageParams.PixelWidth x ImageParams.PixelHeight and contain the area of the page inside the exportRect, scaled to fit. It is also possible to use this function by specifying only ImageParams.PixelWidth or only ImageParams.PixelHeight. When only one is specified, the function will calculate the other. ### get_image ```cpp Image datalogics_interface::Page::get_image(const Rect &export_rect, const PageImageParams ¶ms, const std::vector< std::shared_ptr< SeparationColorSpace > > &separations) ``` **Parameters** - `export_rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A Rect describing the region of the page to export, specified in user space coordinates. One user unit corresponds to 1/72 inch. To export the entire page, set this parameter to the page's CropBox. User space coordinates correspond to the unrotated page; the rotation specified in Page.Rotation is not taken into account with these coordinates. - `params` ([`const PageImageParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md)): A PageImageParams containing additional parameters for the exported image, including the exported image's pixel width, pixel height, and resolution. If these parameters are not specified, the pixel width and pixel height of the image are calculated using the exportRect and a resolution of 300.0. - `separations` ([`const std::vector< std::shared_ptr< SeparationColorSpace > > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationColorSpace.md)) **Returns:** [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md) An Image containing the rendered page region. Export a region of a PDF page to an Image object. This version of GetImage can be used to specify a particular size in pixels for the exported image by setting ImageParams.PixelWidth and/or ImageParams.PixelHeight. If the exportRect is smaller than the PDF page and ImageParams.PixelWidth and ImageParams.PixelHeight are set, then the resulting image will be of the size ImageParams.PixelWidth x ImageParams.PixelHeight and contain the area of the page inside the exportRect, scaled to fit. It is also possible to use this function by specifying only ImageParams.PixelWidth or only ImageParams.PixelHeight. When only one is specified, the function will calculate the other. ### get_image_separations ```cpp ImageCollection datalogics_interface::Page::get_image_separations(const Rect &export_rect, const PageImageParams ¶ms) ``` **Parameters** - `export_rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)) - `params` ([`const PageImageParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md)) **Returns:** [`ImageCollection`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageCollection.md) Get per-ink grayscale separation images for all inks on the page. Discovers inks via list_inks() and builds SeparationColorSpaces internally. ### get_image_separations ```cpp ImageCollection datalogics_interface::Page::get_image_separations(const Rect &export_rect, const PageImageParams ¶ms, const std::vector< std::shared_ptr< SeparationColorSpace > > &separations) ``` **Parameters** - `export_rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A Rect describing the region of the page to export, specified in user space coordinates. One user unit corresponds to 1/72 inch. To export the entire page, set this parameter to the page's CropBox. User space coordinates correspond to the unrotated page; the rotation specified in Page.Rotation is not taken into account with these coordinates. - `params` ([`const PageImageParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md)): A PageImageParams containing additional parameters for the exported image, including the exported image's pixel width, pixel height, and resolution. If these parameters are not specified, the pixel width and pixel height of the image are calculated using the exportRect and a resolution of 300.0. - `separations` ([`const std::vector< std::shared_ptr< SeparationColorSpace > > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationColorSpace.md)): A collection of SeparationColorSpace class additional parameter for specifying colorants for bitmap rendering. Each SeparationColorSpace must be constructed from an ink and a page. Their tint transforms and alternates will be ignored. **Returns:** [`ImageCollection`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ImageCollection.md) An ImageCollection containing one Image per separation colorant. Export a region of a PDF page using the specified Separation ColorSpaces to an Image Collection object. This version of GetImage can be used to specify a particular size in pixels for the exported image by setting ImageParams.PixelWidth and/or ImageParams.PixelHeight. If the exportRect is smaller than the PDF page and ImageParams.PixelWidth and ImageParams.PixelHeight are set, then the resulting image will be of the size ImageParams.PixelWidth x ImageParams.PixelHeight and contain the area of the page inside the exportRect, scaled to fit. It is also possible to use this function by specifying only ImageParams.PixelWidth or only ImageParams.PixelHeight. When only one is specified, the function will calculate the other. NOTE: By default if Separation Colorants are only Process (CMYK), rasterization is done using DeviceCMYK. When PageImageParams.UseDeviceNForImageSeparations is set, rasterization is done using DeviceN regardless. ### get_media_box ```cpp Rect datalogics_interface::Page::get_media_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The MediaBox rectangle in user space coordinates. Get the page's MediaBox. The MediaBox defines the boundaries of the physical medium on which the page is intended to be displayed or printed. It is the largest of the page boxes and serves as the default for the CropBox. ### get_num_annotations ```cpp int datalogics_interface::Page::get_num_annotations() const ``` **Returns:** `int` The number of annotations on this page. Gets the number of annotations on a page. Annotations associated with pop-up windows (such as strikeouts) are counted as two annotations. Widget annotations (form fields) are included in the count. ### get_output_preview_image ```cpp Image datalogics_interface::Page::get_output_preview_image(const Rect &export_rect, const PageImageParams ¶ms) ``` **Parameters** - `export_rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)) - `params` ([`const PageImageParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md)) **Returns:** [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md) Get a soft-proof composite image for all inks on the page. Overprint simulation is off. ### get_output_preview_image ```cpp Image datalogics_interface::Page::get_output_preview_image(const Rect &export_rect, const PageImageParams ¶ms, bool simulate_overprint) ``` **Parameters** - `export_rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)) - `params` ([`const PageImageParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md)) - `simulate_overprint` (`bool`) **Returns:** [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md) Get a soft-proof composite image for all inks with overprint control. ### get_output_preview_image ```cpp Image datalogics_interface::Page::get_output_preview_image(const Rect &export_rect, const PageImageParams ¶ms, const std::vector< std::shared_ptr< SeparationColorSpace > > &separations) ``` **Parameters** - `export_rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A Rect describing the region of the page to export, specified in user space coordinates. One user unit corresponds to 1/72 inch. To export the entire page, set this parameter to the page's CropBox. User space coordinates correspond to the unrotated page; the rotation specified in Page.Rotation is not taken into account with these coordinates. - `params` ([`const PageImageParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md)): A PageImageParams containing additional parameters for the exported image, including the exported image's pixel width, pixel height, and resolution. If these parameters are not specified, the pixel width and pixel height of the image are calculated using the exportRect and a resolution of 300.0. - `separations` ([`const std::vector< std::shared_ptr< SeparationColorSpace > > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationColorSpace.md)): A collection of SeparationColorSpace class additional parameter for specifying colorants for bitmap rendering. Each SeparationColorSpace must be constructed from an ink and a page. **Returns:** [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md) An Image representing the output preview of the page region. Create an Output Preview image used when Soft Proofing a document prior to actual printing. ### get_output_preview_image ```cpp Image datalogics_interface::Page::get_output_preview_image(const Rect &export_rect, const PageImageParams ¶ms, const std::vector< std::shared_ptr< SeparationColorSpace > > &separations, bool simulate_overprint) ``` **Parameters** - `export_rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A Rect describing the region of the page to export, specified in user space coordinates. One user unit corresponds to 1/72 inch. To export the entire page, set this parameter to the page's CropBox. User space coordinates correspond to the unrotated page; the rotation specified in Page.Rotation is not taken into account with these coordinates. - `params` ([`const PageImageParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md)): A PageImageParams containing additional parameters for the exported image, including the exported image's pixel width, pixel height, and resolution. If these parameters are not specified, the pixel width and pixel height of the image are calculated using the exportRect and a resolution of 300.0. - `separations` ([`const std::vector< std::shared_ptr< SeparationColorSpace > > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationColorSpace.md)): A collection of SeparationColorSpace class additional parameter for specifying colorants for bitmap rendering. Each SeparationColorSpace must be constructed from an ink and a page. - `simulate_overprint` (`bool`) **Returns:** [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md) An Image representing the output preview of the page region. Create an Output Preview image used when Soft Proofing a document prior to actual printing. ### get_page_number ```cpp int datalogics_interface::Page::get_page_number() const ``` **Returns:** `int` the number of this page in the Document. Retrieve the page number for this PDF page. Page numbers always start at zero. ### get_pdf_dict ```cpp PDFDict datalogics_interface::Page::get_pdf_dict() const ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) Retrieve the underlying PDF dictionary for this page. Needed to set StructParents, Tabs, or other page-level entries that do not yet have dedicated accessors. Retrieve the PDFObject representation of this object. ### get_render_warnings ```cpp int datalogics_interface::Page::get_render_warnings() const ``` **Returns:** `int` A bitfield to be compared against PageRenderWarning Enum values. Reports possible page rendering problems. ### get_rotation ```cpp PageRotation datalogics_interface::Page::get_rotation() const ``` **Returns:** [`PageRotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageRotation.md) The number of degrees by which the page is rotated clockwise when displayed or printed. ### get_trim_box ```cpp Rect datalogics_interface::Page::get_trim_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The TrimBox rectangle in user space coordinates. Get the page's TrimBox. The TrimBox defines the intended dimensions of the finished page after trimming. It may be smaller than the MediaBox to account for production- related content such as printing instructions or cut marks. ### get_user_unit ```cpp float datalogics_interface::Page::get_user_unit() const ``` **Returns:** `float` the size of default user space units. Gets the size of default user space units for the page. ### has_transparency ```cpp bool datalogics_interface::Page::has_transparency(bool include_annot_appearances) const ``` **Parameters** - `include_annot_appearances` (`bool`): If true, annotation appearances are included in the check; if false, annotation appearances will be ignored. **Returns:** `bool` true if the page uses transparency features, false otherwise. Checks whether a page uses any transparency features. Note: To determine whether a page uses transparency, the resources of the page must be enumerated (though the page contents do not need to be parsed). The page resources may not be optimized for slow (browser- based) connections, so calling Page.HasTransparency() before the page has been downloaded may cause unpleasant read behavior and performance problems. ### list_inks ```cpp std::vector< Ink > datalogics_interface::Page::list_inks() const ``` **Returns:** [`std::vector< Ink >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Ink.md) A list of Ink objects representing the inks used on this page. Retrieve a list of all inks present on a page. ### list_inks ```cpp std::vector< Ink > datalogics_interface::Page::list_inks(bool include_opi) const ``` **Parameters** - `include_opi` (`bool`) **Returns:** [`std::vector< Ink >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Ink.md) A list of Ink objects representing the inks used on this page. Retrieve a list of all inks present on a page. ### make_separations ```cpp void datalogics_interface::Page::make_separations(const SeparationParams ¶ms) ``` **Parameters** - `params` ([`const SeparationParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationParams.md)): Parameters for the separation generation, including a list of plates. **Returns:** `void` Generate print color separations for a page. ### operator= ```cpp Page & datalogics_interface::Page::operator=(Page &&) noexcept ``` **Parameters** - (unnamed) ([`Page &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)) **Returns:** [`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md) ### remove_annotation ```cpp void datalogics_interface::Page::remove_annotation(int index) ``` **Parameters** - `index` (`int`): The index (into the page's annotation array) of the annotation to remove. **Returns:** `void` Removes an annotation from the specified page. Annotations are stored in arrays, which are automatically compressed when an annotation is removed. For this reason, if you use a loop in which you remove annotations, structure the code so the loop processes from the highest to the lowest index. If you loop the other direction, you will skip over annotations immediately following ones you remove. ### set_art_box ```cpp void datalogics_interface::Page::set_art_box(const Rect &r) ``` **Parameters** - `r` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The rectangle specifying the ArtBox in user space coordinates, or null to remove the ArtBox. **Returns:** `void` Set the page's ArtBox. The ArtBox defines the extent of the page's meaningful content (including potential white space) as intended by the page's creator. ### set_bleed_box ```cpp void datalogics_interface::Page::set_bleed_box(const Rect &r) ``` **Parameters** - `r` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The rectangle specifying the BleedBox in user space coordinates, or null to remove the BleedBox. **Returns:** `void` Set the page's BleedBox. The BleedBox defines the region to which the contents of the page shall be clipped when output in a production environment. It includes any extra bleed area needed to account for limitations of cutting, folding, and trimming equipment. ### set_crop_box ```cpp void datalogics_interface::Page::set_crop_box(const Rect &r) ``` **Parameters** - `r` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The rectangle specifying the CropBox in user space coordinates, or null to remove the CropBox. **Returns:** `void` Set the page's CropBox. The CropBox defines the region to which the contents of the page are to be clipped (cropped) when displayed or printed. The default value is the page's MediaBox. ### set_media_box ```cpp void datalogics_interface::Page::set_media_box(const Rect &r) ``` **Parameters** - `r` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The rectangle specifying the MediaBox in user space coordinates. **Returns:** `void` Set the page's MediaBox. The MediaBox defines the boundaries of the physical medium on which the page is intended to be displayed or printed. It is the largest of the page boxes and serves as the default for the CropBox. ### set_rotation ```cpp void datalogics_interface::Page::set_rotation(PageRotation rotation) ``` **Parameters** - `rotation` ([`PageRotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageRotation.md)): the number of degrees by which the page is rotated clockwise when displayed or printed **Returns:** `void` The number of degrees by which the page is rotated clockwise when displayed or printed. ### set_trim_box ```cpp void datalogics_interface::Page::set_trim_box(const Rect &r) ``` **Parameters** - `r` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The rectangle specifying the TrimBox in user space coordinates, or null to remove the TrimBox. **Returns:** `void` Set the page's TrimBox. The TrimBox defines the intended dimensions of the finished page after trimming. It may be smaller than the MediaBox to account for production- related content such as printing instructions or cut marks. ### set_user_unit ```cpp void datalogics_interface::Page::set_user_unit(float unit) ``` **Parameters** - `unit` (`float`): the size of default user space units. **Returns:** `void` Sets the size of default user space units for the page. ### update_content ```cpp void datalogics_interface::Page::update_content() ``` **Returns:** `void` Commit in-memory content edits back to the page dictionary. Edits made through the `Content` returned by `get_content()` are held in memory until this method is called. `Document::save()` does not implicitly commit content edits. Commits in-memory edits to the Page's Content back into the Page, using the same compression filters the content was previously encoded with. Edits made through the Content object returned by GetContent are held in memory until UpdateContent is called. Document::Save does not implicitly commit content edits; a Page that has been edited but not committed will be saved in its pre-edit state. --- # PageImageParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams ```cpp class PageImageParams ``` **Namespace:** `datalogics_interface` ## Description Used to manage converting a PDF page to an image. The Page Image Parameters are a set of parameters used to control converting a PDF page to an image, such as a PNG, JPG, or BMP. The parameters include pixel height & width, color space, resolution, so on. **Uses types:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md), [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md), [`DrawFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DrawFlags.md), [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md), [`SmoothFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SmoothFlags.md) ## Constructors ### PageImageParams ```cpp datalogics_interface::PageImageParams::PageImageParams() ``` *constructor* Construct default PageImageParams. Initializes with DeviceRGB color space, no smoothing, zero pixel dimensions, 300 dpi resolution, relative colorimetric render intent, and black point compensation enabled. ### PageImageParams ```cpp datalogics_interface::PageImageParams::PageImageParams(const PageImageParams &other) ``` *constructor* **Parameters** - `other` ([`const PageImageParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md)) Copy constructor. ### PageImageParams ```cpp datalogics_interface::PageImageParams::PageImageParams(PageImageParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`PageImageParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md)) ### ~PageImageParams ```cpp datalogics_interface::PageImageParams::~PageImageParams() ``` *destructor* ## Methods ### get_black_point_compensation ```cpp bool datalogics_interface::PageImageParams::get_black_point_compensation() const ``` **Returns:** `bool` The BlackPointCompensation setting. Default is true if not explicitly set. ### get_bypass_copy_perm ```cpp bool datalogics_interface::PageImageParams::get_bypass_copy_perm() const ``` **Returns:** `bool` true if this option is turned on. The BypassCopyPerm allows to bypass copy permitions. ### get_calibrate_device_spaces_when_printing ```cpp bool datalogics_interface::PageImageParams::get_calibrate_device_spaces_when_printing() const ``` **Returns:** `bool` true if this option is turned on. Sets if Device spaces should be treated as calibrated to the associated working profile (when true), otherwise it treats them as uncalibrated (when false) when printing. ### get_horizontal_resolution ```cpp double datalogics_interface::PageImageParams::get_horizontal_resolution() const ``` **Returns:** `double` The desired horizontal resolution in pixels/inch of the output image. Defaults to 300 dpi. Must not be negative. Horizontal and vertical resolution must be either both zero or both non-zero. ### get_icc_profile ```cpp ColorProfile datalogics_interface::PageImageParams::get_icc_profile() const ``` **Returns:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md) Gets the ICC Profile of the colorspace to be used for rendering from a known value. NOTE: The ICCProfileCustomPath must not be set for this property to be used. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either. ### get_icc_profile_custom_path ```cpp std::string datalogics_interface::PageImageParams::get_icc_profile_custom_path() const ``` **Returns:** `std::string` Gets the ICC Profile of the colorspace to be used for rendering from a custom file path. NOTE: The ICCProfile is ignored when this property is a non-empty string. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either. ### get_image_color_space ```cpp std::unique_ptr< ColorSpace > datalogics_interface::PageImageParams::get_image_color_space() const ``` **Returns:** [`std::unique_ptr< ColorSpace >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) The ColorSpace used in exporting a PDF page to an image. Must be one of DeviceGray, DeviceRGB, DeviceRGBA, DeviceCMYK, DeviceN, or ICCBased. ### get_page_draw_flags ```cpp DrawFlags datalogics_interface::PageImageParams::get_page_draw_flags() const ``` **Returns:** [`DrawFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DrawFlags.md) The DrawFlags used for rendering a PDF page to an image. An OR of the flags from DrawFlags which control how the PDF page is drawn. ### get_pixel_height ```cpp int datalogics_interface::PageImageParams::get_pixel_height() const ``` **Returns:** `int` The height in pixels of the image to be created from a PDF page. If not specified (zero), the rendered PDF page size will be used. PixelWidth and PixelHeight must be either both zero or both non-zero. ### get_pixel_width ```cpp int datalogics_interface::PageImageParams::get_pixel_width() const ``` **Returns:** `int` The width in pixels of the image to be created from a PDF page. If not specified (zero), the rendered PDF page size will be used. PixelWidth and PixelHeight must be either both zero or both non-zero. ### get_render_intent ```cpp RenderIntent datalogics_interface::PageImageParams::get_render_intent() const ``` **Returns:** [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md) The RenderIntent used to specify color translation for colors outside gamut of the color profile used. The default is relative colorimetric. ### get_smoothing ```cpp SmoothFlags datalogics_interface::PageImageParams::get_smoothing() const ``` **Returns:** [`SmoothFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SmoothFlags.md) The SmoothFlags used in exporting a PDF page to an image. Indicates what parts of the PDF page (text, image, art, none) are to be smoothed when rendering to an image. These flags can be OR'd together. ### get_thin_line_heuristics ```cpp bool datalogics_interface::PageImageParams::get_thin_line_heuristics() const ``` **Returns:** `bool` true if thin line heuristics are applied, false otherwise. The ThinLineHeuristics setting. Determines whether thin lines will be fattened non-linearly or the stroke adjust will be applied to thin rectangles. ### get_use_device_n_for_image_separations ```cpp bool datalogics_interface::PageImageParams::get_use_device_n_for_image_separations() const ``` **Returns:** `bool` true if this option is turned on. NOTE: This member is only applicable when calling the GetImageSeparations() method, only when Colorants used are only Process. Gets the UseDeviceNForImageSeparations setting, which indicates when the GetImageSeparations() method is called if a DeviceN colorspace will be used for rasterization. When false, if only Process colorants are provided to GetImageSeparations() then it's rendered using DeviceCMYK. When true, then it's rendered using DeviceN. ### get_vertical_resolution ```cpp double datalogics_interface::PageImageParams::get_vertical_resolution() const ``` **Returns:** `double` The desired vertical resolution in pixels/inch of the output image. Defaults to 300 dpi. Must not be negative. Horizontal and vertical resolution must be either both zero or both non-zero. ### operator= ```cpp PageImageParams & datalogics_interface::PageImageParams::operator=(const PageImageParams &other) ``` **Parameters** - `other` ([`const PageImageParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md)) **Returns:** [`PageImageParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md) Copy assignment. ### operator= ```cpp PageImageParams & datalogics_interface::PageImageParams::operator=(PageImageParams &&) noexcept ``` **Parameters** - (unnamed) ([`PageImageParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md)) **Returns:** [`PageImageParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageImageParams.md) ### set_black_point_compensation ```cpp void datalogics_interface::PageImageParams::set_black_point_compensation(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` The BlackPointCompensation setting. Default is true if not explicitly set. ### set_bypass_copy_perm ```cpp void datalogics_interface::PageImageParams::set_bypass_copy_perm(bool value) ``` **Parameters** - `value` (`bool`): the bypass copy perm **Returns:** `void` ### set_calibrate_device_spaces_when_printing ```cpp void datalogics_interface::PageImageParams::set_calibrate_device_spaces_when_printing(bool value) ``` **Parameters** - `value` (`bool`): the calibrate device spaces when printing **Returns:** `void` ### set_horizontal_resolution ```cpp void datalogics_interface::PageImageParams::set_horizontal_resolution(double dpi) ``` **Parameters** - `dpi` (`double`) **Returns:** `void` The desired horizontal resolution in pixels/inch of the output image. Defaults to 300 dpi. Must not be negative. Horizontal and vertical resolution must be either both zero or both non-zero. ### set_icc_profile ```cpp void datalogics_interface::PageImageParams::set_icc_profile(ColorProfile profile) ``` **Parameters** - `profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): the ICC Profile of the colorspace to be used for rendering to a known value **Returns:** `void` Sets the ICC Profile of the colorspace to be used for rendering to a known value. NOTE: The ICCProfileCustomPath must not be set for this property to be used. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either. ### set_icc_profile_custom_path ```cpp void datalogics_interface::PageImageParams::set_icc_profile_custom_path(const std::string &path) ``` **Parameters** - `path` (`const std::string &`): the ICC Profile of the colorspace to be used for rendering from a custom file path **Returns:** `void` Sets the ICC Profile of the colorspace to be used for rendering from a custom file path. NOTE: The ICCProfile is ignored when this property is a non-empty string. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either. ### set_image_color_space ```cpp void datalogics_interface::PageImageParams::set_image_color_space(ColorSpace &cs) ``` **Parameters** - `cs` ([`ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)) **Returns:** `void` The ColorSpace used in exporting a PDF page to an image. Must be one of DeviceGray, DeviceRGB, DeviceRGBA, DeviceCMYK, DeviceN, or ICCBased. ### set_page_draw_flags ```cpp void datalogics_interface::PageImageParams::set_page_draw_flags(DrawFlags flags) ``` **Parameters** - `flags` ([`DrawFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DrawFlags.md)) **Returns:** `void` The DrawFlags used for rendering a PDF page to an image. An OR of the flags from DrawFlags which control how the PDF page is drawn. ### set_pixel_height ```cpp void datalogics_interface::PageImageParams::set_pixel_height(int height) ``` **Parameters** - `height` (`int`) **Returns:** `void` The height in pixels of the image to be created from a PDF page. If not specified (zero), the rendered PDF page size will be used. PixelWidth and PixelHeight must be either both zero or both non-zero. ### set_pixel_width ```cpp void datalogics_interface::PageImageParams::set_pixel_width(int width) ``` **Parameters** - `width` (`int`) **Returns:** `void` The width in pixels of the image to be created from a PDF page. If not specified (zero), the rendered PDF page size will be used. PixelWidth and PixelHeight must be either both zero or both non-zero. ### set_render_intent ```cpp void datalogics_interface::PageImageParams::set_render_intent(RenderIntent intent) ``` **Parameters** - `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)) **Returns:** `void` The RenderIntent used to specify color translation for colors outside gamut of the color profile used. The default is relative colorimetric. ### set_smoothing ```cpp void datalogics_interface::PageImageParams::set_smoothing(SmoothFlags flags) ``` **Parameters** - `flags` ([`SmoothFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SmoothFlags.md)) **Returns:** `void` The SmoothFlags used in exporting a PDF page to an image. Indicates what parts of the PDF page (text, image, art, none) are to be smoothed when rendering to an image. These flags can be OR'd together. ### set_thin_line_heuristics ```cpp void datalogics_interface::PageImageParams::set_thin_line_heuristics(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` Set the ThinLineHeuristics setting. Determines whether thin lines will be fattened non-linearly or the stroke adjust will be applied to thin rectangles. ### set_use_device_n_for_image_separations ```cpp void datalogics_interface::PageImageParams::set_use_device_n_for_image_separations(bool value) ``` **Parameters** - `value` (`bool`): true to render with DeviceN when only Process colorants are provided to GetImageSeparations(); false to render with DeviceCMYK in that case. **Returns:** `void` Sets the UseDeviceNForImageSeparations setting, which indicates when GetImageSeparations() is called if a DeviceN colorspace will be used for rasterization. When false, if only Process colorants are provided to GetImageSeparations() then it's rendered using DeviceCMYK. When true, then it's rendered using DeviceN. NOTE: This member is only applicable when calling the GetImageSeparations() method, only when Colorants used are only Process. ### set_vertical_resolution ```cpp void datalogics_interface::PageImageParams::set_vertical_resolution(double dpi) ``` **Parameters** - `dpi` (`double`) **Returns:** `void` The desired vertical resolution in pixels/inch of the output image. Defaults to 300 dpi. Must not be negative. Horizontal and vertical resolution must be either both zero or both non-zero. --- # PageInsertFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageInsertFlags **Namespace:** `datalogics_interface` ## Description Insertion flags used by InsertPages(). ## Values - `None = 0`: No insertion flags set; default behavior. - `Bookmarks = 0x0001`: Insert bookmarks as well as pages. - `Threads = 0x0002`: Insert articles as well. - `DoNotMergeFonts = 0x0008`: Do not merge duplicate fonts on merge: may result in larger files when saved, but can show performance benefits when inserting a page that uses a large number of fonts - `DoNotResolveInvalidStructureParentReferences = 0x0010`: Do not resolve invalid Parent References in the Structure Tree. This is not necessary in most cases and can show performance benefits for a document with a complicated Structure Tree. - `DoNotRemovePageInheritance = 0x0020`: Do not remove page inheritance. This can slow down the performance when document has very large page tree. - `All = 0x1000`: Insert all Catalog and Info dictionary values as well as pages. The bookmark tree of the inserted document is merged into the bookmark tree of the target document by copying it as a new first-level subtree of that document's bookmark tree root, of which it becomes the last child. If the target document has no bookmark tree, it acquires one identical to the bookmark tree from the source document. --- # PageLabel Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageLabel ```cpp class PageLabel ``` **Namespace:** `datalogics_interface` ## Description Describes numbering labels for a range of pages. PageLabel describes how to construct a label string for a range of pages. It contains information on number style, any prefixes, and a starting position within the document. Note that a single PageLabel describes the label string for several pages all pages up until the first page covered by the next PageLabel, or the end of the document. Also note that if a Document has any PageLabels, there must be one that starts at page index 0. This will be automatically created if the user does not supply one. **Referenced by:** [`Document`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md) **Uses types:** [`NumberStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/NumberStyle.md) ## Constructors ### PageLabel ```cpp datalogics_interface::PageLabel::PageLabel(const PageLabel &other) ``` *constructor* **Parameters** - `other` ([`const PageLabel &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageLabel.md)) Copy constructor. ### PageLabel ```cpp datalogics_interface::PageLabel::PageLabel(int start_page_index, NumberStyle style) ``` *constructor* **Parameters** - `start_page_index` (`int`): Starting page index in the Document for this range - `style` ([`NumberStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/NumberStyle.md)): Numbering style for this range Public constructor ### PageLabel ```cpp datalogics_interface::PageLabel::PageLabel(int start_page_index, NumberStyle style, const std::string &prefix, int first_number) ``` *constructor* **Parameters** - `start_page_index` (`int`): Starting page index in the Document for this range - `style` ([`NumberStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/NumberStyle.md)): Numbering style for this range - `prefix` (`const std::string &`): Prefix string for this range - `first_number` (`int`): First number appearing on a page in this range Public constructor ### PageLabel ```cpp datalogics_interface::PageLabel::PageLabel(PageLabel &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`PageLabel &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageLabel.md)) ### ~PageLabel ```cpp datalogics_interface::PageLabel::~PageLabel() ``` *destructor* ## Methods ### get_end_page_index ```cpp int datalogics_interface::PageLabel::get_end_page_index() const ``` **Returns:** `int` The zero-based ending page index for this page label range. You cannot set the end index for a range; you must change the start index for the following range. A value of -1 means the end index for this PageLabel is unknown (e.g. when the label has not yet been added to a Document). ### get_first_number_in_range ```cpp int datalogics_interface::PageLabel::get_first_number_in_range() const ``` **Returns:** `int` The first numeric value used for page labels in this range. Must be greater than or equal to 1. ### get_number_style ```cpp NumberStyle datalogics_interface::PageLabel::get_number_style() const ``` **Returns:** [`NumberStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/NumberStyle.md) The NumberStyle used for generating page labels in this range. ### get_prefix ```cpp std::string datalogics_interface::PageLabel::get_prefix() const ``` **Returns:** `std::string` The prefix string prepended to page labels in this range. For example, a prefix of "A-" with decimal numbering starting at 1 would produce labels "A-1", "A-2", "A-3", etc. ### get_start_page_index ```cpp int datalogics_interface::PageLabel::get_start_page_index() const ``` **Returns:** `int` The zero-based starting page index for this page label range in the Document. ### operator= ```cpp PageLabel & datalogics_interface::PageLabel::operator=(const PageLabel &other) ``` **Parameters** - `other` ([`const PageLabel &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageLabel.md)) **Returns:** [`PageLabel &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageLabel.md) Copy assignment. ### operator= ```cpp PageLabel & datalogics_interface::PageLabel::operator=(PageLabel &&) noexcept ``` **Parameters** - (unnamed) ([`PageLabel &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageLabel.md)) **Returns:** [`PageLabel &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PageLabel.md) ### set_first_number_in_range ```cpp void datalogics_interface::PageLabel::set_first_number_in_range(int number) ``` **Parameters** - `number` (`int`) **Returns:** `void` The first numeric value used for page labels in this range. ### set_number_style ```cpp void datalogics_interface::PageLabel::set_number_style(NumberStyle style) ``` **Parameters** - `style` ([`NumberStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/NumberStyle.md)) **Returns:** `void` The NumberStyle used for generating page labels in this range. ### set_prefix ```cpp void datalogics_interface::PageLabel::set_prefix(const std::string &prefix) ``` **Parameters** - `prefix` (`const std::string &`) **Returns:** `void` The prefix string prepended to page labels in this range. ### set_start_page_index ```cpp void datalogics_interface::PageLabel::set_start_page_index(int index) ``` **Parameters** - `index` (`int`): the zero-based starting page index for this page label range in the Document **Returns:** `void` The zero-based starting page index for this page label range in the Document. ### to_string ```cpp std::string datalogics_interface::PageLabel::to_string() const ``` **Returns:** `std::string` A string describing this PageLabel. Returns a string representation of this PageLabel. The string includes the start page, end page, number style, prefix, and first page number of this label range. --- # PageMarkFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageMarkFlags **Namespace:** `datalogics_interface` ## Description Bit flags indicating which page marks are emitted for color separations. ## Values - `ColorBars = 0x0001`: Emit color bar marks for verifying color reproduction. - `RegistrationMarks = 0x0002`: Emit registration marks for aligning color separations. - `CropMarks = 0x0004`: Emit crop marks indicating where the page should be trimmed. - `BleedMarks = 0x0008`: Emit bleed marks indicating the bleed area boundary. - `PageInfo = 0x0010`: Emit page information such as the file name and date. - `TrimMarks = 0x0020`: Emit trim marks indicating the finished page dimensions. - `SlurMarks = 0x0040`: Emit slur marks for detecting imaging distortion. --- # PageMode Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageMode **Namespace:** `datalogics_interface` ## Description An enumerated data type used to describe the page view mode of a Document. ## Values - `NoPreference = 0`: Leave the PageMode as is (default for a new Document). - `DocumentOnly = 1`: Display the Document without bookmarks or thumbnails (encoded as `/UseNone`). - `Thumbnails = 2`: Display the Document with the Thumbnails panel open. - `Bookmarks = 3`: Display the Document with the Bookmarks panel open (encoded as `/UseOutlines`). - `Fullscreen = 4`: Display the Document in full-screen mode. - `OptionalContent = 6`: Display the Document with the Layers panel open. - `Attachments = 7`: Display the Document with its attachments. --- # PageRotation Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageRotation **Namespace:** `datalogics_interface` ## Description Specifies the rotation angle for a page, in degrees clockwise. Used by Page.Rotation to get or set the display and print rotation of a page. ## Values - `Rotate0 = 0`: Rotate 0 degrees. - `Rotate90 = 90`: Rotate 90 degrees. - `Rotate180 = 180`: Rotate 180 degrees. - `Rotate270 = 270`: Rotate 270 degrees. --- # PageSpec Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageSpec **Namespace:** `datalogics_interface` ## Description Specifies which pages a watermark targets. ## Values - `AllPages = -3`: Apply to all pages. - `OddPagesOnly = -4`: Apply to odd pages only (user-facing 1, 3, 5, ...). - `EvenPagesOnly = -5`: Apply to even pages only (user-facing 2, 4, 6, ...). --- # Path Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Path ```cpp class Path : Element ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) ## Description A path in a PDF file defines shapes. Paths in PDF files are used to draw lines, define filled areas, and define boundaries for clipping graphics. A path is composed of straight and curved line segments. **Referenced by:** [`Path`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Path.md) **Uses types:** [`Clip`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md), [`ElementCloneFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags.md), [`ElementType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType.md), [`GraphicState`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md), [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md), [`Path`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Path.md), [`PathPaintOp`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PathPaintOp.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### Path ```cpp datalogics_interface::Path::Path() ``` *constructor* Create a path. ### Path ```cpp datalogics_interface::Path::Path(GraphicState gs) ``` *constructor* **Parameters** - `gs` ([`GraphicState`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md)) Create a path. ### Path ```cpp datalogics_interface::Path::Path(Path &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Path &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Path.md)) ### ~Path ```cpp datalogics_interface::Path::~Path() override ``` *destructor* ## Methods ### add_curve ```cpp void datalogics_interface::Path::add_curve(const Point &p1, const Point &p2, const Point &p3) ``` **Parameters** - `p1` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): - first Bezier control point - `p2` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): - second Bezier control point - `p3` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): - the ending Point of the Bezier curve which will also be the current point of the current path. **Returns:** `void` Adds a Bezier curve from the current path using the first two points specified as Bezier control points ending at the third point. The new current point is then set to the third point. ### add_curve_v ```cpp void datalogics_interface::Path::add_curve_v(const Point &p1, const Point &p2) ``` **Parameters** - `p1` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): - first Bezier control point - `p2` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): - the ending Point of the Bezier curve which will also be the new current point of the path. **Returns:** `void` Adds a Bezier curve from the current path. This extends from the current path to the point Point2 using the current point and the first point specified as Bezier control points ending at the second point. The new current point is then set to the second point. ### add_curve_y ```cpp void datalogics_interface::Path::add_curve_y(const Point &p1, const Point &p2) ``` **Parameters** - `p1` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): - first Bezier control point - `p2` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): - second Bezier control point and the ending Point of the Bezier curve which will also be the new current point of the path. **Returns:** `void` Adds a Bezier curve from the current path. This extends from the current path to the point Point2 using the two points specified as Bezier control points ending at the second point. The new current point is then set to the second point. ### add_line ```cpp void datalogics_interface::Path::add_line(const Point &pt) ``` **Parameters** - `pt` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): - the coordinates of the endpoint of the new line. **Returns:** `void` Adds a line to the current path from the current path position. The given point becomes the new current position. ### add_rect ```cpp void datalogics_interface::Path::add_rect(const Point &pt, double width, double height) ``` **Parameters** - `pt` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): - the coordinates of the lower left corner of the new rectangle. - `width` (`double`): - the width of the new rectangle. - `height` (`double`): - the height of the new rectangle. **Returns:** `void` Adds a rectangle to the current path with the lower left corner at the give point, and with the width and height specified. ### clear_graphic_state ```cpp void datalogics_interface::Path::clear_graphic_state() ``` **Returns:** `void` Removes the graphic state from this path. ### clone ```cpp std::unique_ptr< Path > datalogics_interface::Path::clone() const ``` **Returns:** [`std::unique_ptr< Path >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Path.md) The copied path. Makes a copy of the path. Make a copy of an path to obtain a new path that has a distinct set of attributes. ### clone ```cpp std::unique_ptr< Path > datalogics_interface::Path::clone(ElementCloneFlags flags) const ``` **Parameters** - `flags` ([`ElementCloneFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags.md)) **Returns:** [`std::unique_ptr< Path >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Path.md) The copied path. Makes a copy of the path. Make a copy of an path to obtain a new path that has a distinct set of attributes. ### close_path ```cpp void datalogics_interface::Path::close_path() ``` **Returns:** `void` Closes the current subpath. ### get_bounding_box ```cpp Rect datalogics_interface::Element::get_bounding_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The bounding box for this element. The coordinates of the bounding box are specified in user space coordinates, relative to the element's Content. Note that user space coordinates correspond to unrotated pages; any rotation specified in the page dictionary is not taken into account. The bounding box for this element. The bounding box is a rectangle that is guaranteed to encompass the element, but it is not guaranteed to be the smallest box that could contain the element. For example, if the element is a Path that contains an arc, the bounding box encompasses the bezier control points, and not just the curve itself. ### get_clip ```cpp std::unique_ptr< Clip > datalogics_interface::Element::get_clip() ``` **Returns:** [`std::unique_ptr< Clip >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md) The current Clip for this Element, or NULL if no clip is set. Gets the current Clip for an Element. ### get_element_type ```cpp ElementType datalogics_interface::Element::get_element_type() const ``` **Returns:** [`ElementType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType.md) Returns the runtime type of this element. ### get_graphic_state ```cpp std::unique_ptr< GraphicState > datalogics_interface::Path::get_graphic_state() ``` **Returns:** [`std::unique_ptr< GraphicState >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md) The graphic state, or nullptr if none is set. Get the graphic state of the current path. May return null if this element does not have a GraphicState. ### get_matrix ```cpp Matrix datalogics_interface::Element::get_matrix() const ``` **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) The current transformation matrix applied to this element. The transformation matrix for the element. ### get_paint_op ```cpp PathPaintOp datalogics_interface::Path::get_paint_op() const ``` **Returns:** [`PathPaintOp`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PathPaintOp.md) the PathPaintOpFlags flags describing the fill and stroke attributes. Gets the fill and stroke attributes of a path. ### get_segments ```cpp std::vector< std::shared_ptr< Segment > > datalogics_interface::Path::get_segments() const ``` **Returns:** [`std::vector< std::shared_ptr< Segment > >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Segment.md) Get the segments of the path. Returns a list of Segment objects, one for each segment in the path. ### move_to ```cpp void datalogics_interface::Path::move_to(const Point &pt) ``` **Parameters** - `pt` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): - the coordinates of the new current point. **Returns:** `void` Moves the current point of the path to the given point. ### operator= ```cpp Path & datalogics_interface::Path::operator=(Path &&) noexcept ``` **Parameters** - (unnamed) ([`Path &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Path.md)) **Returns:** [`Path &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Path.md) ### rotate ```cpp void datalogics_interface::Element::rotate(double theta) ``` **Parameters** - `theta` (`double`): The rotation angle in degrees. **Returns:** `void` Rotate an element by theta degrees counterclockwise using the matrix [ cos T sin T -sin T cos T 0 0 ]. ### scale ```cpp void datalogics_interface::Element::scale(double sx, double sy) ``` **Parameters** - `sx` (`double`): The horizontal scale factor. - `sy` (`double`): The vertical scale factor. **Returns:** `void` Scale an element by (sx,sy) units using the matrix [ sx 0 0 sy 0 0 ]. ### set_clip ```cpp void datalogics_interface::Element::set_clip(Clip &clip) ``` **Parameters** - `clip` ([`Clip &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md)): The clip to set as the current clip for this element, or NULL to remove clipping. **Returns:** `void` Sets the current Clip for an Element. ### set_graphic_state ```cpp void datalogics_interface::Path::set_graphic_state(const GraphicState &gs) ``` **Parameters** - `gs` ([`const GraphicState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md)): - the new/updated Graphic State for the path. **Returns:** `void` Set the Graphic State of the current path. **Note:** The Path copies the graphic state internally. ### set_matrix ```cpp void datalogics_interface::Element::set_matrix(const Matrix &matrix) ``` **Parameters** - `matrix` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)): The transformation matrix for the element. **Returns:** `void` Set the transformation matrix for the element. ### set_paint_op ```cpp void datalogics_interface::Path::set_paint_op(PathPaintOp op) ``` **Parameters** - `op` ([`PathPaintOp`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PathPaintOp.md)): - the flags describing the fill and stroke attributes. **Returns:** `void` Sets the fill and stroke attributes of a path. ### translate ```cpp void datalogics_interface::Element::translate(double tx, double ty) ``` **Parameters** - `tx` (`double`): The horizontal translation distance in user space units. - `ty` (`double`): The vertical translation distance in user space units. **Returns:** `void` Translate an element by (tx,ty) units using the matrix [ 1 0 0 1 tx ty ]. ### try_as ```cpp T * datalogics_interface::Element::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this element to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Element::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # PathPaintOp Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PathPaintOp **Namespace:** `datalogics_interface` ## Description Flags indicating the different paint operations for a Path. These flags control whether a path is stroked, filled, or both, and which fill rule is used. ## Values - `Neither = 0x00`: Do not paint the path; useful for clipping-only paths. - `Stroke = 0x01`: Stroke the path with the current stroke color. - `Fill = 0x02`: Fill the path using the non-zero winding number rule. - `EoFill = 0x04`: Fill the path using the even-odd rule. --- # Pattern Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Pattern ```cpp class Pattern ``` **Namespace:** `datalogics_interface` **Derived classes:** [`ShadingPattern`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ShadingPattern.md) ## Description A pattern is used to fill an area to be painted. A tiling pattern consists of a repeating graphical figure that is replicated across an area to be filled in, or painted. A shading pattern provides smoothly varying gradients of color, to produce a transition between colors across an area. **Uses types:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Constructors ### Pattern ```cpp datalogics_interface::Pattern::Pattern(Pattern &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Pattern &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Pattern.md)) ### ~Pattern ```cpp virtual datalogics_interface::Pattern::~Pattern() ``` *destructor* ## Methods ### get_pdf_object ```cpp std::unique_ptr< PDFObject > datalogics_interface::Pattern::get_pdf_object() const ``` **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The PDFObject representing this pattern in the PDF document. Gets the underlying PDF object for this pattern. ### operator= ```cpp Pattern & datalogics_interface::Pattern::operator=(Pattern &&) noexcept ``` **Parameters** - (unnamed) ([`Pattern &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Pattern.md)) **Returns:** [`Pattern &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Pattern.md) ### to_string ```cpp virtual std::string datalogics_interface::Pattern::to_string() const ``` **Returns:** `std::string` A string describing this Pattern. Convert a pattern to a string representation. --- # PDFAConvertParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams ```cpp class PDFAConvertParams ``` **Namespace:** `datalogics_interface` ## Description Parameters for converting a document to PDF/A compliance. These parameters control how a Document is converted to the PDF/A standard. RemoveAllAnnotations if true, will remove all Annotations and Actions from the output IgnoreFontErrors if true, will try to rasterize the page when fonts cannot be embedded AbortIfXFAIsPresent if true, will abort conversion process if XFA form entry is detected NoValidationErrors if true, will ignore validation errors RasterizationResolution rasterization resolution; if 0, use 72 DPI ValidateImplementationLimitsOfDocument Validate PDF Implementation Limits of the Document. PDF/A is an ISO-standard version the PDF format. It is designed to be used with PDF files that need to be archived and stored for long periods. For example, the fonts in a PDF/A file are embedded in the file itself, rather than accessed through a link to a font directory on a local server. ## Constructors ### PDFAConvertParams ```cpp datalogics_interface::PDFAConvertParams::PDFAConvertParams() ``` *constructor* Default constructor for PDFAConvertParams. Initializes with RemoveAllAnnotations = false, IgnoreFontErrors = true, AbortIfXFAIsPresent = false, NoValidationErrors = false, RasterizationResolution = 72, and ValidateImplementationLimitsOfDocument = true. ### PDFAConvertParams ```cpp datalogics_interface::PDFAConvertParams::PDFAConvertParams(const PDFAConvertParams &other) ``` *constructor* **Parameters** - `other` ([`const PDFAConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams.md)) Copy constructor. ### PDFAConvertParams ```cpp datalogics_interface::PDFAConvertParams::PDFAConvertParams(PDFAConvertParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`PDFAConvertParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams.md)) ### ~PDFAConvertParams ```cpp datalogics_interface::PDFAConvertParams::~PDFAConvertParams() ``` *destructor* ## Methods ### get_abort_if_xfa_is_present ```cpp bool datalogics_interface::PDFAConvertParams::get_abort_if_xfa_is_present() const ``` **Returns:** `bool` The presence of XFA can result in some loss of data in output PDF/A-1 file as the PDFProcessor does not support XFA. However you can choose to abort the conversion if XFA is present by setting this parameter to true. By default we will not abort if XFA is present for PDF/A-1. By default we will not abort if XFA is present for PDF/A-1. If false we will convert even if XFA is found. If true we will abort the process if XFA is found. ### get_ignore_font_errors ```cpp bool datalogics_interface::PDFAConvertParams::get_ignore_font_errors() const ``` **Returns:** `bool` If we encounter any errors like unembeddable fonts etc. while conversion then we try to rasterize the current page on which the error occured. However the client can modify this behavior by setting the value of this parameter to false in which case we will throw an error if we encounter any problems while conversion. By default we will rasterize the page on error. If true we will try to rasterize the current page if any error occured. If false we will abort and throw an exception if any error occured. ### get_no_validation_errors ```cpp bool datalogics_interface::PDFAConvertParams::get_no_validation_errors() const ``` **Returns:** `bool` Permit validation errors to be ignored When true, PDF Implementation Limits (as defined in the PDF Specification of the PDF/A target) of the page are ignored. When false, PDF Implementation Limits of the Page are checked and if violated will cause the Page to be rasterized as a fallback mechanism when IgnoreFontErrors is true or simply raise an error if IgnoreFontErrors is false. ### get_profile_description ```cpp std::string datalogics_interface::PDFAConvertParams::get_profile_description() const ``` **Returns:** `std::string` The Output Intent of a PDF/A document may be any valid CMYK Profile for CMYK Conversion, and any valid RGB profile for RGB conversion. This parameter allows the user to specify a particular profile for this conversion by description. When this parameter is not present, the profile "U.S. Web Coated (SWOP) v2" will be used for CMYK Conversions, and "sRGB IEC61966-2.1" for RGB conversions. If this description is present, and specifies a profile of the wrong color family, or specifies a profile which cannot be located in resources, an exception will be raised. ### get_rasterization_resolution ```cpp int datalogics_interface::PDFAConvertParams::get_rasterization_resolution() const ``` **Returns:** `int` Permit user to select rasterization resolution When this value is zero, we will rasterize at 72 DPI (Legacy Behaviour). Otherwise, we will interpret the value as the desired resolution. ### get_remove_all_annotations ```cpp bool datalogics_interface::PDFAConvertParams::get_remove_all_annotations() const ``` **Returns:** `bool` Some of the standards like PDF/A prohibit the presence of some types of Annotations and Actions in order to comply with those standards. By default we will filter all illegal Annotations and Actions. If false we will filter out all illegal Annotations and Actions (according to the standard being used) while retaining the legal ones. If true this will remove all the Annotations and Actions from the output PDF/A compliant file. ### get_validate_implementation_limits ```cpp bool datalogics_interface::PDFAConvertParams::get_validate_implementation_limits() const ``` **Returns:** `bool` Validate PDF Implementation Limits (as defined in the PDF Specification of the PDF/A target) of the Document. When true. PDF Implementation Limits are checked and if violated raise an error. When false, PDF Implementation Limits are not checked. Note this option applies to the Whole document versus only Pages in the NoValidationErrors option. NOTE: It's recommended NoValidationErrors be set to false, IgnoreFontErrors be set to false, and ValidateImplementationLimitsOfDocument be set to true for getting the best quality output that adheres to the specification. ### operator= ```cpp PDFAConvertParams & datalogics_interface::PDFAConvertParams::operator=(const PDFAConvertParams &other) ``` **Parameters** - `other` ([`const PDFAConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams.md)) **Returns:** [`PDFAConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams.md) Copy assignment. ### operator= ```cpp PDFAConvertParams & datalogics_interface::PDFAConvertParams::operator=(PDFAConvertParams &&) noexcept ``` **Parameters** - (unnamed) ([`PDFAConvertParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams.md)) **Returns:** [`PDFAConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams.md) ### set_abort_if_xfa_is_present ```cpp void datalogics_interface::PDFAConvertParams::set_abort_if_xfa_is_present(bool value) ``` **Parameters** - `value` (`bool`): true to abort PDF/A-1 conversion if XFA is present; false to continue with possible loss of XFA data. **Returns:** `void` The presence of XFA can result in some loss of data in output PDF/A-1 file as the PDFProcessor does not support XFA. However you can choose to abort the conversion if XFA is present by setting this parameter to true. By default we will not abort if XFA is present for PDF/A-1. By default we will not abort if XFA is present for PDF/A-1. If false we will convert even if XFA is found. If true we will abort the process if XFA is found. ### set_ignore_font_errors ```cpp void datalogics_interface::PDFAConvertParams::set_ignore_font_errors(bool value) ``` **Parameters** - `value` (`bool`): true to rasterize the current page when an error (such as an unembeddable font) is encountered during conversion; false to abort and throw an exception instead. **Returns:** `void` If we encounter any errors like unembeddable fonts etc. while conversion then we try to rasterize the current page on which the error occured. However the client can modify this behavior by setting the value of this parameter to false in which case we will throw an error if we encounter any problems while conversion. By default we will rasterize the page on error. If true we will try to rasterize the current page if any error occured. If false we will abort and throw an exception if any error occured. ### set_no_validation_errors ```cpp void datalogics_interface::PDFAConvertParams::set_no_validation_errors(bool value) ``` **Parameters** - `value` (`bool`): true to ignore PDF Implementation Limit violations on a page; false to enforce them, falling back to rasterization (when IgnoreFontErrors is true) or raising an error (when it is false). **Returns:** `void` Permit validation errors to be ignored When true, PDF Implementation Limits (as defined in the PDF Specification of the PDF/A target) of the page are ignored. When false, PDF Implementation Limits of the Page are checked and if violated will cause the Page to be rasterized as a fallback mechanism when IgnoreFontErrors is true or simply raise an error if IgnoreFontErrors is false. ### set_profile_description ```cpp void datalogics_interface::PDFAConvertParams::set_profile_description(const std::string &profile) ``` **Parameters** - `profile` (`const std::string &`): the description of the Output Intent profile to use; must be a valid CMYK profile for CMYK conversions or a valid RGB profile for RGB conversions. **Returns:** `void` The Output Intent of a PDF/A document may be any valid CMYK Profile for CMYK Conversion, and any valid RGB profile for RGB conversion. This parameter allows the user to specify a particular profile for this conversion by description. When this parameter is not present, the profile "U.S. Web Coated (SWOP) v2" will be used for CMYK Conversions, and "sRGB IEC61966-2.1" for RGB conversions. If this description is present, and specifies a profile of the wrong color family, or specifies a profile which cannot be located in resources, an exception will be raised. ### set_rasterization_resolution ```cpp void datalogics_interface::PDFAConvertParams::set_rasterization_resolution(int dpi) ``` **Parameters** - `dpi` (`int`): the desired rasterization resolution in DPI; zero rasterizes at 72 DPI (legacy behaviour). **Returns:** `void` Permit user to select rasterization resolution When this value is zero, we will rasterize at 72 DPI (Legacy Behaviour). Otherwise, we will interpret the value as the desired resolution. ### set_remove_all_annotations ```cpp void datalogics_interface::PDFAConvertParams::set_remove_all_annotations(bool value) ``` **Parameters** - `value` (`bool`): true to remove all Annotations and Actions from the output PDF/A; false to filter only those illegal under the standard while keeping the legal ones. **Returns:** `void` Some of the standards like PDF/A prohibit the presence of some types of Annotations and Actions in order to comply with those standards. By default we will filter all illegal Annotations and Actions. If false we will filter out all illegal Annotations and Actions (according to the standard being used) while retaining the legal ones. If true this will remove all the Annotations and Actions from the output PDF/A compliant file. ### set_validate_implementation_limits ```cpp void datalogics_interface::PDFAConvertParams::set_validate_implementation_limits(bool value) ``` **Parameters** - `value` (`bool`): true to check PDF Implementation Limits across the whole document and raise an error if violated; false to skip the check. **Returns:** `void` Validate PDF Implementation Limits (as defined in the PDF Specification of the PDF/A target) of the Document. When true. PDF Implementation Limits are checked and if violated raise an error. When false, PDF Implementation Limits are not checked. Note this option applies to the Whole document versus only Pages in the NoValidationErrors option. NOTE: It's recommended NoValidationErrors be set to false, IgnoreFontErrors be set to false, and ValidateImplementationLimitsOfDocument be set to true for getting the best quality output that adheres to the specification. --- # PDFAConvertType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFAConvertType **Namespace:** `datalogics_interface` ## Description Specifies the PDF/A conformance level and color space for conversion. Each value corresponds to a specific PDF/A standard (1a, 1b, 2a, 2b, 2u, 3a, 3b, 3u, 4, 4e, 4f) combined with a target color space (RGB or CMYK). ## Values - `RGB1a = 0`: PDF/A-1a RGB. - `CMYK1a = 1`: PDF/A-1a CMYK. - `RGB1b = 2`: PDF/A-1b RGB. - `CMYK1b = 3`: PDF/A-1b CMYK. - `RGB2a = 4`: PDF/A-2a RGB. - `CMYK2a = 5`: PDF/A-2a CMYK. - `RGB2b = 6`: PDF/A-2b RGB. - `CMYK2b = 7`: PDF/A-2b CMYK. - `RGB2u = 8`: PDF/A-2u RGB. - `CMYK2u = 9`: PDF/A-2u CMYK. - `RGB3a = 10`: PDF/A-3a RGB. - `CMYK3a = 11`: PDF/A-3a CMYK. - `RGB3b = 12`: PDF/A-3b RGB. - `CMYK3b = 13`: PDF/A-3b CMYK. - `RGB3u = 14`: PDF/A-3u RGB. - `CMYK3u = 15`: PDF/A-3u CMYK. - `RGB4 = 16`: PDF/A-4 RGB. - `CMYK4 = 17`: PDF/A-4 CMYK. - `RGB4e = 18`: PDF/A-4e RGB. - `CMYK4e = 19`: PDF/A-4e CMYK. - `RGB4f = 20`: PDF/A-4f RGB. - `CMYK4f = 21`: PDF/A-4f CMYK. --- # PDFArray Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFArray ```cpp class PDFArray : PDFObject ``` **Namespace:** `datalogics_interface` **Inherits from:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Description Represents an array of data elements within a PDF document. All objects in a PDF document are built from a collection of simpler objects that represent fundamental datatypes like numbers, strings and arrays. PDFObject and its subclasses allow direct access and manipulation of these simple objects. Some subclasses represent single data elements. For example, PDFInteger represents a single integer value. Others represent a collection of PDFObjects, like PDFArray, an indexed array of data elements. A PDFArray is a heterogenous collection object that gathers other PDFObjects (including other PDFArrays) into an indexed list. **Referenced by:** [`OptionalContentMembershipDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentMembershipDict.md), [`ViewDestination`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md) **Uses types:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md), [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) ## Constructors ### PDFArray ```cpp datalogics_interface::PDFArray::PDFArray(Document &doc, bool indirect) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): Document object containing this PDFArray - `indirect` (`bool`): flag marking this as an indirect PDFObject General constructor ## Methods ### add ```cpp void datalogics_interface::PDFArray::add(PDFObject &value) ``` **Parameters** - `value` ([`PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): the object to append. **Returns:** `void` Adds an object to the end of the array ### get ```cpp std::unique_ptr< PDFObject > datalogics_interface::PDFArray::get(int index) ``` **Parameters** - `index` (`int`): the position of the object to retrieve. **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) Returns the object at the given index. ### get_generation ```cpp int datalogics_interface::PDFObject::get_generation() const ``` **Returns:** `int` The generation number of this indirect object. The generation number for this object. Only indirect objects have a generation number. ### get_id ```cpp int datalogics_interface::PDFObject::get_id() const ``` **Returns:** `int` The ID number of this indirect object. The ID number for this object. Only indirect objects have an ID number. ### get_indirect ```cpp bool datalogics_interface::PDFObject::get_indirect() const ``` **Returns:** `bool` true if this object is indirect, false if it is direct. Indicates if this object is indirect or direct. ### get_length ```cpp int datalogics_interface::PDFArray::get_length() const ``` **Returns:** `int` The number of elements in this array. ### get_type ```cpp PDFObjectType datalogics_interface::PDFObject::get_type() const ``` **Returns:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) The underlying Cos type of this object. Prefer this over dynamic_cast/try_as chains in hot paths. ### insert ```cpp void datalogics_interface::PDFArray::insert(int index, PDFObject &value) ``` **Parameters** - `index` (`int`): the position at which to insert. - `value` ([`PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): the object to insert. **Returns:** `void` Inserts an object at the given index, displacing existing objects. All objects following this will have their index increased by one. ### operator!= ```cpp bool datalogics_interface::PDFObject::operator!=(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)) **Returns:** `bool` true if `other` is not equal to this. Inequality. ### operator== ```cpp bool datalogics_interface::PDFObject::operator==(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): The other PDFObject to compare against. **Returns:** `bool` true if the two objects are equal, false otherwise. Compare if two objects are equal. ### put ```cpp void datalogics_interface::PDFArray::put(int index, PDFObject &value) ``` **Parameters** - `index` (`int`): the position at which to place the object. - `value` ([`PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): the object to place at the given index. **Returns:** `void` Puts an object at the given index, replacing the existing item. The index can be greater than the current length of the array; the array will be extended and the empty slots filled with null objects. ### remove_at ```cpp void datalogics_interface::PDFArray::remove_at(int index) ``` **Parameters** - `index` (`int`): the position of the object to remove. **Returns:** `void` Removes the object at the given index. The length of the array is reduced by 1. ### to_string ```cpp std::string datalogics_interface::PDFObject::to_string() const ``` **Returns:** `std::string` A string describing this PDFObject. Returns a string representation of this PDFObject. The string includes the object's indirect status, and if indirect, its ID and generation number. ### try_as ```cpp T * datalogics_interface::PDFObject::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this object to a derived Cos type such as `PDFString`, `PDFDict`, `PDFArray`, `PDFStream`, `PDFName`, `PDFInteger`, `PDFReal`, or `PDFBoolean`. Returns nullptr if the object's actual type doesn't match `T`. ### try_as ```cpp const T * datalogics_interface::PDFObject::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # PDFBoolean Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFBoolean ```cpp class PDFBoolean : PDFObject ``` **Namespace:** `datalogics_interface` **Inherits from:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Description Represents a boolean data element within a PDF document. All objects in a PDF document are built from a collection of simpler objects that represent fundamental datatypes like numbers, strings and arrays. PDFObject and its subclasses allow direct access and manipulation of these simple objects. Some subclasses represent single data elements. For example, PDFBoolean represents a single boolean value. Others represent a collection of PDFObjects, such as PDFArray, an indexed array of data elements. A PDFBoolean represents a single boolean value, and may be inserted into any collection object. **Uses types:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) ## Constructors ### PDFBoolean ```cpp datalogics_interface::PDFBoolean::PDFBoolean(bool value, Document &doc, bool indirect) ``` *constructor* **Parameters** - `value` (`bool`): Boolean value of this PDFBoolean - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): Document object containing this PDFBoolean - `indirect` (`bool`): flag marking this as an indirect PDFObject General constructor ## Methods ### get_generation ```cpp int datalogics_interface::PDFObject::get_generation() const ``` **Returns:** `int` The generation number of this indirect object. The generation number for this object. Only indirect objects have a generation number. ### get_id ```cpp int datalogics_interface::PDFObject::get_id() const ``` **Returns:** `int` The ID number of this indirect object. The ID number for this object. Only indirect objects have an ID number. ### get_indirect ```cpp bool datalogics_interface::PDFObject::get_indirect() const ``` **Returns:** `bool` true if this object is indirect, false if it is direct. Indicates if this object is indirect or direct. ### get_type ```cpp PDFObjectType datalogics_interface::PDFObject::get_type() const ``` **Returns:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) The underlying Cos type of this object. Prefer this over dynamic_cast/try_as chains in hot paths. ### get_value ```cpp bool datalogics_interface::PDFBoolean::get_value() const ``` **Returns:** `bool` Boolean value of this object. ### operator!= ```cpp bool datalogics_interface::PDFObject::operator!=(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)) **Returns:** `bool` true if `other` is not equal to this. Inequality. ### operator== ```cpp bool datalogics_interface::PDFObject::operator==(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): The other PDFObject to compare against. **Returns:** `bool` true if the two objects are equal, false otherwise. Compare if two objects are equal. ### to_string ```cpp std::string datalogics_interface::PDFObject::to_string() const ``` **Returns:** `std::string` A string describing this PDFObject. Returns a string representation of this PDFObject. The string includes the object's indirect status, and if indirect, its ID and generation number. ### try_as ```cpp T * datalogics_interface::PDFObject::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this object to a derived Cos type such as `PDFString`, `PDFDict`, `PDFArray`, `PDFStream`, `PDFName`, `PDFInteger`, `PDFReal`, or `PDFBoolean`. Returns nullptr if the object's actual type doesn't match `T`. ### try_as ```cpp const T * datalogics_interface::PDFObject::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # PDFDict Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict ```cpp class PDFDict : PDFObject ``` **Namespace:** `datalogics_interface` **Inherits from:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Description Represents an associative collection of data elements within a PDF document. All objects in a PDF document are built from a collection of simpler objects that represent fundamental datatypes like numbers, strings and arrays. PDFObject and its subclasses allow direct access and manipulation of these simple objects. Some subclasses represent single data elements, such as PDFInteger, which represents a single integer value. Other subclasses represent a collection of PDFObjects, like PDFArray, an indexed array of data elements. A PDFDict is a heterogenous collection object that maps other PDFObjects (including other PDFDicts) to PDFName objects. **Referenced by:** [`Action`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md), [`Bookmark`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md), [`Container`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md), [`DeviceNColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DeviceNColorSpace.md), [`Document`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md), [`Font`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md), [`GoToAction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GoToAction.md), [`LaunchAction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LaunchAction.md), [`NameTree`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NameTree.md), [`NumberTree`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NumberTree.md), [`OptionalContentConfig`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentConfig.md), [`OptionalContentGroup`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/OptionalContentGroup.md), [`PDFStream`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFStream.md), [`Page`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md), [`RemoteGoToAction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteGoToAction.md), [`StructElement`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md), [`StructTreeRoot`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructTreeRoot.md), [`URIAction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/URIAction.md) **Uses types:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md), [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) ## Constructors ### PDFDict ```cpp datalogics_interface::PDFDict::PDFDict(Document &doc, bool indirect) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): Document object containing this PDFDict - `indirect` (`bool`): flag marking this as an indirect PDFObject General constructor ## Methods ### contains ```cpp bool datalogics_interface::PDFDict::contains(const std::string &key) ``` **Parameters** - `key` (`const std::string &`): A PDFName for the key **Returns:** `bool` true if the given key exists Tests whether the given key exists in the dictionary ### get ```cpp std::unique_ptr< PDFObject > datalogics_interface::PDFDict::get(const std::string &key) ``` **Parameters** - `key` (`const std::string &`): A PDFName for the key **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) A PDFObject matching the key Returns the object matching the given key. ### get_generation ```cpp int datalogics_interface::PDFObject::get_generation() const ``` **Returns:** `int` The generation number of this indirect object. The generation number for this object. Only indirect objects have a generation number. ### get_id ```cpp int datalogics_interface::PDFObject::get_id() const ``` **Returns:** `int` The ID number of this indirect object. The ID number for this object. Only indirect objects have an ID number. ### get_indirect ```cpp bool datalogics_interface::PDFObject::get_indirect() const ``` **Returns:** `bool` true if this object is indirect, false if it is direct. Indicates if this object is indirect or direct. ### get_keys ```cpp std::vector< std::string > datalogics_interface::PDFDict::get_keys() const ``` **Returns:** `std::vector< std::string >` a list of all the keys Enumerate all keys in this dictionary. Order is undefined; successive calls on the same dictionary are not guaranteed to return keys in the same order. Get a list of all keys in the dictionary ### get_type ```cpp PDFObjectType datalogics_interface::PDFObject::get_type() const ``` **Returns:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) The underlying Cos type of this object. Prefer this over dynamic_cast/try_as chains in hot paths. ### operator!= ```cpp bool datalogics_interface::PDFObject::operator!=(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)) **Returns:** `bool` true if `other` is not equal to this. Inequality. ### operator== ```cpp bool datalogics_interface::PDFObject::operator==(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): The other PDFObject to compare against. **Returns:** `bool` true if the two objects are equal, false otherwise. Compare if two objects are equal. ### put ```cpp void datalogics_interface::PDFDict::put(const std::string &key, PDFObject &value) ``` **Parameters** - `key` (`const std::string &`): A PDFName for the key - `value` ([`PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): A PDFObject to add to the dictionary **Returns:** `void` Puts an object with the matching key into the dictionary, adding the entry if the key is not already present. ### remove ```cpp void datalogics_interface::PDFDict::remove(const std::string &key) ``` **Parameters** - `key` (`const std::string &`): A PDFName for the key **Returns:** `void` Removes a key/object pair from the dictionary. ### to_string ```cpp std::string datalogics_interface::PDFObject::to_string() const ``` **Returns:** `std::string` A string describing this PDFObject. Returns a string representation of this PDFObject. The string includes the object's indirect status, and if indirect, its ID and generation number. ### try_as ```cpp T * datalogics_interface::PDFObject::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this object to a derived Cos type such as `PDFString`, `PDFDict`, `PDFArray`, `PDFStream`, `PDFName`, `PDFInteger`, `PDFReal`, or `PDFBoolean`. Returns nullptr if the object's actual type doesn't match `T`. ### try_as ```cpp const T * datalogics_interface::PDFObject::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # PDFInteger Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFInteger ```cpp class PDFInteger : PDFObject ``` **Namespace:** `datalogics_interface` **Inherits from:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Description Represents an integer data element within a PDF document. All objects in a PDF document are built from a collection of simpler objects that represent fundamental datatypes like numbers, strings and arrays. PDFObject and its subclasses allow direct access and manipulation of these simple objects. Some subclasses represent single data elements. For example, PDFInteger represents a single integer value. Others represent a collection of PDFObjects, such as PDFArray, an indexed array of data elements. A PDFInteger represents a single integer value, and may be inserted into any collection object. **Uses types:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) ## Constructors ### PDFInteger ```cpp datalogics_interface::PDFInteger::PDFInteger(int value, Document &doc, bool indirect) ``` *constructor* **Parameters** - `value` (`int`): Integer value of this PDFInteger - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): Document object containing this PDFInteger - `indirect` (`bool`): flag marking this as an indirect PDFObject General constructor ## Methods ### get_generation ```cpp int datalogics_interface::PDFObject::get_generation() const ``` **Returns:** `int` The generation number of this indirect object. The generation number for this object. Only indirect objects have a generation number. ### get_id ```cpp int datalogics_interface::PDFObject::get_id() const ``` **Returns:** `int` The ID number of this indirect object. The ID number for this object. Only indirect objects have an ID number. ### get_indirect ```cpp bool datalogics_interface::PDFObject::get_indirect() const ``` **Returns:** `bool` true if this object is indirect, false if it is direct. Indicates if this object is indirect or direct. ### get_type ```cpp PDFObjectType datalogics_interface::PDFObject::get_type() const ``` **Returns:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) The underlying Cos type of this object. Prefer this over dynamic_cast/try_as chains in hot paths. ### get_value ```cpp int datalogics_interface::PDFInteger::get_value() const ``` **Returns:** `int` Integer value of this object. ### operator!= ```cpp bool datalogics_interface::PDFObject::operator!=(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)) **Returns:** `bool` true if `other` is not equal to this. Inequality. ### operator== ```cpp bool datalogics_interface::PDFObject::operator==(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): The other PDFObject to compare against. **Returns:** `bool` true if the two objects are equal, false otherwise. Compare if two objects are equal. ### to_string ```cpp std::string datalogics_interface::PDFObject::to_string() const ``` **Returns:** `std::string` A string describing this PDFObject. Returns a string representation of this PDFObject. The string includes the object's indirect status, and if indirect, its ID and generation number. ### try_as ```cpp T * datalogics_interface::PDFObject::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this object to a derived Cos type such as `PDFString`, `PDFDict`, `PDFArray`, `PDFStream`, `PDFName`, `PDFInteger`, `PDFReal`, or `PDFBoolean`. Returns nullptr if the object's actual type doesn't match `T`. ### try_as ```cpp const T * datalogics_interface::PDFObject::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # PDFName Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFName ```cpp class PDFName : PDFObject ``` **Namespace:** `datalogics_interface` **Inherits from:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Description Represents a name data element within a PDF document. All objects in a PDF document are built from a collection of simpler objects that represent fundamental datatypes like numbers, strings and arrays. PDFObject and its subclasses allow direct access and manipulation of these simple objects. Some subclasses represent single data elements. For example, PDFName represents a single name value. Others represent a collection of PDFObjects, such as PDFArray, an indexed array of data elements. A PDFName represents a single indivisible name token, and may be inserted into any collection object. It may also be used as a key in a PDFDictionary. **Uses types:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) ## Constructors ### PDFName ```cpp datalogics_interface::PDFName::PDFName(const std::string &value, Document &doc, bool indirect) ``` *constructor* **Parameters** - `value` (`const std::string &`): String value representing this PDFName - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): Document object containing this PDFName - `indirect` (`bool`): flag marking this as an indirect PDFObject General constructor ## Methods ### get_generation ```cpp int datalogics_interface::PDFObject::get_generation() const ``` **Returns:** `int` The generation number of this indirect object. The generation number for this object. Only indirect objects have a generation number. ### get_id ```cpp int datalogics_interface::PDFObject::get_id() const ``` **Returns:** `int` The ID number of this indirect object. The ID number for this object. Only indirect objects have an ID number. ### get_indirect ```cpp bool datalogics_interface::PDFObject::get_indirect() const ``` **Returns:** `bool` true if this object is indirect, false if it is direct. Indicates if this object is indirect or direct. ### get_type ```cpp PDFObjectType datalogics_interface::PDFObject::get_type() const ``` **Returns:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) The underlying Cos type of this object. Prefer this over dynamic_cast/try_as chains in hot paths. ### get_value ```cpp std::string datalogics_interface::PDFName::get_value() const ``` **Returns:** `std::string` String value of this object. ### operator!= ```cpp bool datalogics_interface::PDFObject::operator!=(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)) **Returns:** `bool` true if `other` is not equal to this. Inequality. ### operator== ```cpp bool datalogics_interface::PDFObject::operator==(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): The other PDFObject to compare against. **Returns:** `bool` true if the two objects are equal, false otherwise. Compare if two objects are equal. ### to_string ```cpp std::string datalogics_interface::PDFObject::to_string() const ``` **Returns:** `std::string` A string describing this PDFObject. Returns a string representation of this PDFObject. The string includes the object's indirect status, and if indirect, its ID and generation number. ### try_as ```cpp T * datalogics_interface::PDFObject::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this object to a derived Cos type such as `PDFString`, `PDFDict`, `PDFArray`, `PDFStream`, `PDFName`, `PDFInteger`, `PDFReal`, or `PDFBoolean`. Returns nullptr if the object's actual type doesn't match `T`. ### try_as ```cpp const T * datalogics_interface::PDFObject::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # PDFObject Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject ```cpp class PDFObject ``` **Namespace:** `datalogics_interface` **Derived classes:** [`PDFArray`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFArray.md), [`PDFBoolean`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFBoolean.md), [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`PDFInteger`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFInteger.md), [`PDFName`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFName.md), [`PDFReal`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFReal.md), [`PDFStream`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFStream.md), [`PDFString`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFString.md) ## Description Represents the underlying simple data element of an object in a PDF document. All objects in a PDF document are built from a collection of simpler objects that represent fundamental datatypes like numbers, strings and arrays. PDFObject and its subclasses allow direct access and manipulation of these simple objects. Some subclasses represent single data elements. For example, PDFInteger represents a single integer value. Others represent a collection of PDFObjects, such as PDFArray, an indexed array of data elements. PDFObject is the superclass of these simple objects. A PDFObject cannot be directly instantiated, but any of its subclasses may. Any PDFObject may be either direct or indirect. A direct object exists within its collection object (such as a PDFArray) and can be referenced only within that collection object. An indirect object exists outside of any collection object and can be referenced by many collection objects. Threading: single-thread use. A `PDFObject` (and every subclass: `PDFDict`, `PDFArray`, `PDFStream`, `PDFString`, `PDFName`, `PDFInteger`, `PDFReal`, `PDFBoolean`) is bound to its owning `Document`'s thread. Do not share instances across threads. See `datalogics_interface.hpp` for the full threading model. **Referenced by:** [`AxialShadingPattern`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/AxialShadingPattern.md), [`CalGrayColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CalGrayColorSpace.md), [`CalRGBColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CalRGBColorSpace.md), [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md), [`DeviceNColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DeviceNColorSpace.md), [`Document`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md), [`FileSpecification`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md), [`ICCBasedColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ICCBasedColorSpace.md), [`IndexedColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/IndexedColorSpace.md), [`LabColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LabColorSpace.md), [`NameTree`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NameTree.md), [`NamedColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NamedColorSpace.md), [`NumberTree`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/NumberTree.md), [`PDFArray`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFArray.md), [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`Page`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md), [`Pattern`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Pattern.md), [`RemoteDestination`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination.md), [`SeparationColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationColorSpace.md), [`ShadingPattern`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ShadingPattern.md), [`StructElement`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md), [`StructTreeRoot`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructTreeRoot.md) **Uses types:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) ## Constructors ### PDFObject ```cpp datalogics_interface::PDFObject::PDFObject(PDFObject &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`PDFObject &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)) ### ~PDFObject ```cpp virtual datalogics_interface::PDFObject::~PDFObject() ``` *destructor* ## Methods ### get_generation ```cpp int datalogics_interface::PDFObject::get_generation() const ``` **Returns:** `int` The generation number of this indirect object. The generation number for this object. Only indirect objects have a generation number. ### get_id ```cpp int datalogics_interface::PDFObject::get_id() const ``` **Returns:** `int` The ID number of this indirect object. The ID number for this object. Only indirect objects have an ID number. ### get_indirect ```cpp bool datalogics_interface::PDFObject::get_indirect() const ``` **Returns:** `bool` true if this object is indirect, false if it is direct. Indicates if this object is indirect or direct. ### get_type ```cpp PDFObjectType datalogics_interface::PDFObject::get_type() const ``` **Returns:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) The underlying Cos type of this object. Prefer this over dynamic_cast/try_as chains in hot paths. ### operator!= ```cpp bool datalogics_interface::PDFObject::operator!=(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)) **Returns:** `bool` true if `other` is not equal to this. Inequality. ### operator= ```cpp PDFObject & datalogics_interface::PDFObject::operator=(PDFObject &&) noexcept ``` **Parameters** - (unnamed) ([`PDFObject &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)) **Returns:** [`PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ### operator== ```cpp bool datalogics_interface::PDFObject::operator==(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): The other PDFObject to compare against. **Returns:** `bool` true if the two objects are equal, false otherwise. Compare if two objects are equal. ### to_string ```cpp std::string datalogics_interface::PDFObject::to_string() const ``` **Returns:** `std::string` A string describing this PDFObject. Returns a string representation of this PDFObject. The string includes the object's indirect status, and if indirect, its ID and generation number. ### try_as ```cpp T * datalogics_interface::PDFObject::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this object to a derived Cos type such as `PDFString`, `PDFDict`, `PDFArray`, `PDFStream`, `PDFName`, `PDFInteger`, `PDFReal`, or `PDFBoolean`. Returns nullptr if the object's actual type doesn't match `T`. ### try_as ```cpp const T * datalogics_interface::PDFObject::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # PDFObjectType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType **Namespace:** `datalogics_interface` ## Description The underlying PDF data type of a PDFObject. Use with PDFObject::get_type() for switch-style dispatch instead of chained dynamic_cast. ## Values - `Null = 0`: The PDF null object, or an invalid object. - `Dict = 1`: A PDF dictionary (`PDFDict`). - `Array = 2`: A PDF array (`PDFArray`). - `Stream = 3`: A PDF stream (`PDFStream`). - `String = 4`: A PDF string (`PDFString`). - `Name = 5`: A PDF name (`PDFName`). - `Integer = 6`: A PDF integer (`PDFInteger`). - `Real = 7`: A PDF real number (`PDFReal`). - `Boolean = 8`: A PDF boolean (`PDFBoolean`). - `Unknown = 9`: Type was not recognized; should not happen in well-formed input. --- # PDFOptimizer Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFOptimizer ```cpp class PDFOptimizer ``` **Namespace:** `datalogics_interface` ## Description Implementation of the PDF Optimizer function. Use the PDFOptimizer object to accumulate options for the Optimization, and to Optimize documents. **Uses types:** [`OptimizerCompressQuality`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerCompressQuality.md), [`OptimizerCompressionType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerCompressionType.md), [`OptimizerImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerImageType.md), [`OptimizerObjectCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerObjectCompression.md), [`OptimizerOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerOption.md) ## Constructors ### PDFOptimizer ```cpp datalogics_interface::PDFOptimizer::PDFOptimizer() ``` *constructor* Construct a CPDFOptimizer, with default Options. ### PDFOptimizer ```cpp datalogics_interface::PDFOptimizer::PDFOptimizer(PDFOptimizer &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`PDFOptimizer &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFOptimizer.md)) ### ~PDFOptimizer ```cpp datalogics_interface::PDFOptimizer::~PDFOptimizer() ``` *destructor* ## Methods ### get_compression_quality ```cpp OptimizerCompressQuality datalogics_interface::PDFOptimizer::get_compression_quality(OptimizerImageType type) const ``` **Parameters** - `type` ([`OptimizerImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerImageType.md)): The image color type (Color, Gray, or BW) to query. **Returns:** [`OptimizerCompressQuality`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerCompressQuality.md) The compression quality level for the specified color model. Get the value of the Compression Quality for a given color model. ### get_major_version ```cpp int datalogics_interface::PDFOptimizer::get_major_version() const ``` **Returns:** `int` The major PDF version number, or 0 if the Optimizer will decide. Get the value of the Major Version of the optimized document. NOTE: A value of 0 indicates the Optimizer will decide what version it should be. ### get_max_resolution ```cpp int datalogics_interface::PDFOptimizer::get_max_resolution(OptimizerImageType type) const ``` **Parameters** - `type` ([`OptimizerImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerImageType.md)): The image color type (Color, Gray, or BW) to query. **Returns:** `int` The maximum resolution in DPI above which images will be downsampled. Get the value of the Max DPI for a given color model. ### get_minor_version ```cpp int datalogics_interface::PDFOptimizer::get_minor_version() const ``` **Returns:** `int` The minor PDF version number. Get the value of the Minor Version of the optimized document. ### get_object_compression ```cpp OptimizerObjectCompression datalogics_interface::PDFOptimizer::get_object_compression() const ``` **Returns:** [`OptimizerObjectCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerObjectCompression.md) The current object compression type setting. Get the value of the Object Compression of the optimized document. ### get_option ```cpp bool datalogics_interface::PDFOptimizer::get_option(OptimizerOption option) const ``` **Parameters** - `option` ([`OptimizerOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerOption.md)): The optimization option to query. **Returns:** `bool` true if the option is enabled, false if it is disabled. Get the value of a single Optimizer Option. ### get_recompression_type ```cpp OptimizerCompressionType datalogics_interface::PDFOptimizer::get_recompression_type(OptimizerImageType type) const ``` **Parameters** - `type` ([`OptimizerImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerImageType.md)): The image color type (Color, Gray, or BW) to query. **Returns:** [`OptimizerCompressionType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerCompressionType.md) The compression type that will be applied to images of the specified color model. Get the value of the Recompression Type for a given color model. ### get_resample_to_resolution ```cpp int datalogics_interface::PDFOptimizer::get_resample_to_resolution(OptimizerImageType type) const ``` **Parameters** - `type` ([`OptimizerImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerImageType.md)): The image color type (Color, Gray, or BW) to query. **Returns:** `int` The target resolution in DPI to which images will be downsampled. Get the value of the Resample To DPI for a given color model. ### operator= ```cpp PDFOptimizer & datalogics_interface::PDFOptimizer::operator=(PDFOptimizer &&) noexcept ``` **Parameters** - (unnamed) ([`PDFOptimizer &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFOptimizer.md)) **Returns:** [`PDFOptimizer &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFOptimizer.md) ### optimize ```cpp void datalogics_interface::PDFOptimizer::optimize(Document &document, const std::string &output_path) ``` **Parameters** - `document` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The document to optimize. - `output_path` (`const std::string &`): The file system path where the optimized document will be saved. **Returns:** `void` Optimize a document and save to a new file path. Perform the Optimization of a single document, saving the result in a new file. ### set_compression_quality ```cpp void datalogics_interface::PDFOptimizer::set_compression_quality(OptimizerImageType type, OptimizerCompressQuality value) ``` **Parameters** - `type` ([`OptimizerImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerImageType.md)): The image color type (Color, Gray, or BW) to set. - `value` ([`OptimizerCompressQuality`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerCompressQuality.md)): The compression quality level to apply. **Returns:** `void` Set the value for the Compression Quality for a given color model. Any image that recompressed, regardless of the reason, will use this Quality for the Quality value of the specific compression type. ### set_major_version ```cpp void datalogics_interface::PDFOptimizer::set_major_version(int major) ``` **Parameters** - `major` (`int`): The major PDF version number. **Returns:** `void` Set the value for the Major Version for the optimized document. ### set_max_resolution ```cpp void datalogics_interface::PDFOptimizer::set_max_resolution(OptimizerImageType type, int value) ``` **Parameters** - `type` ([`OptimizerImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerImageType.md)): The image color type (Color, Gray, or BW) to set. - `value` (`int`): The maximum resolution in DPI. **Returns:** `void` Set the value for the Max DPI for a given color model. Any image above this resolution will be down sampled, if the Downsampling option is true for this color model. ### set_minor_version ```cpp void datalogics_interface::PDFOptimizer::set_minor_version(int minor) ``` **Parameters** - `minor` (`int`): The minor PDF version number. **Returns:** `void` Set the value for the Minor Version for the optimized document. ### set_object_compression ```cpp void datalogics_interface::PDFOptimizer::set_object_compression(OptimizerObjectCompression type) ``` **Parameters** - `type` ([`OptimizerObjectCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerObjectCompression.md)): The desired object compression type. **Returns:** `void` Set the value for the Object Compression for the optimized document. ### set_option ```cpp void datalogics_interface::PDFOptimizer::set_option(OptimizerOption option, bool value) ``` **Parameters** - `option` ([`OptimizerOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerOption.md)): The optimization option to set. - `value` (`bool`): true to enable the option, false to disable it. **Returns:** `void` Set the value of a single Optimizer option. ### set_recompression_type ```cpp void datalogics_interface::PDFOptimizer::set_recompression_type(OptimizerImageType type, OptimizerCompressionType value) ``` **Parameters** - `type` ([`OptimizerImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerImageType.md)): The image color type (Color, Gray, or BW) to set. - `value` ([`OptimizerCompressionType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerCompressionType.md)): The compression type to apply. **Returns:** `void` Set the value for the recompression Type for a given color model. Any image that is downsampled will be compressed using this method, if the Downsampling option is true for this color model. Any image that is not downsampled, will be converted to this compression type, if it is not already compressed in this type, and the Recompression option for this color model is true. ### set_resample_to_resolution ```cpp void datalogics_interface::PDFOptimizer::set_resample_to_resolution(OptimizerImageType type, int value) ``` **Parameters** - `type` ([`OptimizerImageType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/OptimizerImageType.md)): The image color type (Color, Gray, or BW) to set. - `value` (`int`): The target resolution in DPI. **Returns:** `void` Set the value for the Resample To DPI for a given color model. Any image will be downsampled to this resolution, if the Downsampling option is true for this color model. --- # PDFReal Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFReal ```cpp class PDFReal : PDFObject ``` **Namespace:** `datalogics_interface` **Inherits from:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Description Represents a floating point data element within a PDF document. All objects in a PDF document are built from a collection of simpler objects that represent fundamental datatypes like numbers, strings and arrays. PDFObject and its subclasses allow direct access and manipulation of these simple objects. Some subclasses represent single data elements. For example, PDFReal represents a single floating point value. Others represent a collection of PDFObjects, such as PDFArray, an indexed array of data elements. A PDFReal represents a single floating point value, and may be inserted into any collection object. **Uses types:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) ## Constructors ### PDFReal ```cpp datalogics_interface::PDFReal::PDFReal(double value, Document &doc, bool indirect) ``` *constructor* **Parameters** - `value` (`double`): Double value of this PDFReal - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): Document object containing this PDFReal - `indirect` (`bool`): flag marking this as an indirect PDFObject General constructor ## Methods ### get_generation ```cpp int datalogics_interface::PDFObject::get_generation() const ``` **Returns:** `int` The generation number of this indirect object. The generation number for this object. Only indirect objects have a generation number. ### get_id ```cpp int datalogics_interface::PDFObject::get_id() const ``` **Returns:** `int` The ID number of this indirect object. The ID number for this object. Only indirect objects have an ID number. ### get_indirect ```cpp bool datalogics_interface::PDFObject::get_indirect() const ``` **Returns:** `bool` true if this object is indirect, false if it is direct. Indicates if this object is indirect or direct. ### get_type ```cpp PDFObjectType datalogics_interface::PDFObject::get_type() const ``` **Returns:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) The underlying Cos type of this object. Prefer this over dynamic_cast/try_as chains in hot paths. ### get_value ```cpp double datalogics_interface::PDFReal::get_value() const ``` **Returns:** `double` Floating-point value of this object. ### operator!= ```cpp bool datalogics_interface::PDFObject::operator!=(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)) **Returns:** `bool` true if `other` is not equal to this. Inequality. ### operator== ```cpp bool datalogics_interface::PDFObject::operator==(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): The other PDFObject to compare against. **Returns:** `bool` true if the two objects are equal, false otherwise. Compare if two objects are equal. ### to_string ```cpp std::string datalogics_interface::PDFObject::to_string() const ``` **Returns:** `std::string` A string describing this PDFObject. Returns a string representation of this PDFObject. The string includes the object's indirect status, and if indirect, its ID and generation number. ### try_as ```cpp T * datalogics_interface::PDFObject::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this object to a derived Cos type such as `PDFString`, `PDFDict`, `PDFArray`, `PDFStream`, `PDFName`, `PDFInteger`, `PDFReal`, or `PDFBoolean`. Returns nullptr if the object's actual type doesn't match `T`. ### try_as ```cpp const T * datalogics_interface::PDFObject::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # PDFStream Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFStream ```cpp class PDFStream : PDFObject ``` **Namespace:** `datalogics_interface` **Inherits from:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Description Represents a stream of data within a PDF document. All objects in a PDF document are built from a collection of simpler objects that represent fundamental datatypes like numbers, strings and arrays. PDFObject and its subclasses allow direct access and manipulation of these simple objects. Some subclasses represent single data elements (e.g. PDFInteger represents a single integer value); other subclasses represent a collection of PDFObjects (e.g. PDFArray is an indexed array of data elements). A PDFStream represents a stream of unsigned bytes, and may be inserted into any collection object. It includes a dictionary that describes how the data in the stream is encoded and other useful information about the stream. A PDFStream is always an indirect object. PDFStreams can be encoded using built-in filters. These filters include compression schemes for most popular image formats, and text encoding translators to permit safe transmission of the document over the Internet. The data in a PDFStream will be automatically encoded when it is created; the user can read either the encoded (raw) or decoded (filtered) data. PDFStreams can be used for any large collection of data that need not be read into memory all at once, including image data, multimedia data or XML markup. **Referenced by:** [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`ICCBasedColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ICCBasedColorSpace.md), [`PostScript`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PostScript.md) **Uses types:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) ## Constructors ### PDFStream ```cpp datalogics_interface::PDFStream::PDFStream(std::istream &input, Document &doc) ``` *constructor* **Parameters** - `input` (`std::istream &`) - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)) Create a PDFStream from an input stream in the given document. The stream data is read during construction. ### PDFStream ```cpp datalogics_interface::PDFStream::PDFStream(std::istream &input, Document &doc, PDFDict &encoding_dict, PDFArray &encoding_params) ``` *constructor* **Parameters** - `input` (`std::istream &`) - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)) - `encoding_dict` ([`PDFDict &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md)) - `encoding_params` ([`PDFArray &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFArray.md)) Create a PDFStream from an input stream with encoding parameters. encoding_dict and encoding_params control compression/filters. ## Methods ### get_dict ```cpp std::unique_ptr< PDFDict > datalogics_interface::PDFStream::get_dict() const ``` **Returns:** [`std::unique_ptr< PDFDict >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The stream's encoding dictionary. Retrieve the encoding dictionary for this stream (contains /Filter, /DecodeParms, and any other stream metadata). The encoding dictionary for the stream. This includes all required information for decoding the stream, such as filter names and decode parameters. ### get_filtered_bytes ```cpp std::vector< unsigned char > datalogics_interface::PDFStream::get_filtered_bytes() const ``` **Returns:** `std::vector< unsigned char >` Read the stream's filtered (decoded) bytes after applying the stream's /Filter and /DecodeParms. Use this for content streams, XMP, images. ### get_generation ```cpp int datalogics_interface::PDFObject::get_generation() const ``` **Returns:** `int` The generation number of this indirect object. The generation number for this object. Only indirect objects have a generation number. ### get_id ```cpp int datalogics_interface::PDFObject::get_id() const ``` **Returns:** `int` The ID number of this indirect object. The ID number for this object. Only indirect objects have an ID number. ### get_indirect ```cpp bool datalogics_interface::PDFObject::get_indirect() const ``` **Returns:** `bool` true if this object is indirect, false if it is direct. Indicates if this object is indirect or direct. ### get_length ```cpp long datalogics_interface::PDFStream::get_length() const ``` **Returns:** `long` The length of the encoded (raw) stream data. The encoded length of the stream in bytes. ### get_raw_bytes ```cpp std::vector< unsigned char > datalogics_interface::PDFStream::get_raw_bytes() const ``` **Returns:** `std::vector< unsigned char >` Read the stream's raw (encoded, still compressed) bytes — what is actually stored in the PDF file. Use this for signature/XRef work where you need the on-disk bytes. ### get_type ```cpp PDFObjectType datalogics_interface::PDFObject::get_type() const ``` **Returns:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) The underlying Cos type of this object. Prefer this over dynamic_cast/try_as chains in hot paths. ### operator!= ```cpp bool datalogics_interface::PDFObject::operator!=(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)) **Returns:** `bool` true if `other` is not equal to this. Inequality. ### operator== ```cpp bool datalogics_interface::PDFObject::operator==(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): The other PDFObject to compare against. **Returns:** `bool` true if the two objects are equal, false otherwise. Compare if two objects are equal. ### to_string ```cpp std::string datalogics_interface::PDFObject::to_string() const ``` **Returns:** `std::string` A string describing this PDFObject. Returns a string representation of this PDFObject. The string includes the object's indirect status, and if indirect, its ID and generation number. ### try_as ```cpp T * datalogics_interface::PDFObject::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this object to a derived Cos type such as `PDFString`, `PDFDict`, `PDFArray`, `PDFStream`, `PDFName`, `PDFInteger`, `PDFReal`, or `PDFBoolean`. Returns nullptr if the object's actual type doesn't match `T`. ### try_as ```cpp const T * datalogics_interface::PDFObject::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # PDFString Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFString ```cpp class PDFString : PDFObject ``` **Namespace:** `datalogics_interface` **Inherits from:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Description Represents an array of unsigned bytes within a PDF document. A PDFString is a single data element that represents an array of unsigned bytes. It may be inserted into any collection object. PDFString may be a string of human readable text, but this is not required, and it may be stored either as characters or as hex values. **Uses types:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) ## Constructors ### PDFString ```cpp datalogics_interface::PDFString::PDFString(const std::string &value, Document &doc, bool indirect, bool stored_as_hex=false) ``` *constructor* **Parameters** - `value` (`const std::string &`): Array of bytes stored in this PDFString - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): Document object containing this PDFString - `indirect` (`bool`): flag marking this as an indirect PDFObject - `stored_as_hex` (`bool`): flag indicating this PDFString should be stored as hex values General constructor ## Methods ### get_bytes ```cpp std::vector< unsigned char > datalogics_interface::PDFString::get_bytes() const ``` **Returns:** `std::vector< unsigned char >` A byte array containing the raw data of this PDFString. The raw byte array of this PDFString. This method returns the raw data of the PDFString, without respect to any encoding. It should be used when the contents of the object represent data instead of human readable text, or when direct access to the underlying data is required. ### get_generation ```cpp int datalogics_interface::PDFObject::get_generation() const ``` **Returns:** `int` The generation number of this indirect object. The generation number for this object. Only indirect objects have a generation number. ### get_id ```cpp int datalogics_interface::PDFObject::get_id() const ``` **Returns:** `int` The ID number of this indirect object. The ID number for this object. Only indirect objects have an ID number. ### get_indirect ```cpp bool datalogics_interface::PDFObject::get_indirect() const ``` **Returns:** `bool` true if this object is indirect, false if it is direct. Indicates if this object is indirect or direct. ### get_stored_as_hex ```cpp bool datalogics_interface::PDFString::get_stored_as_hex() const ``` **Returns:** `bool` true if this PDFString is stored as hex values, false otherwise. Indicates that the data is stored as hexadecimal values. ### get_type ```cpp PDFObjectType datalogics_interface::PDFObject::get_type() const ``` **Returns:** [`PDFObjectType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFObjectType.md) The underlying Cos type of this object. Prefer this over dynamic_cast/try_as chains in hot paths. ### get_value ```cpp std::string datalogics_interface::PDFString::get_value() const ``` **Returns:** `std::string` The string value of this PDFString, converted to a Unicode string. The byte array as a native string object. This is a convenience for typical uses where a PDFString holds a human readable string instead of a byte array. The text may be encoded within the PDF as either UTF-16BE or PDFDocEncoding; in either case, it will be converted to a Unicode string object appropriate to the platform. If you need to access the contents of the PDFString object without respect to an encoding, use the Bytes property. ### operator!= ```cpp bool datalogics_interface::PDFObject::operator!=(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)) **Returns:** `bool` true if `other` is not equal to this. Inequality. ### operator== ```cpp bool datalogics_interface::PDFObject::operator==(const PDFObject &other) const ``` **Parameters** - `other` ([`const PDFObject &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md)): The other PDFObject to compare against. **Returns:** `bool` true if the two objects are equal, false otherwise. Compare if two objects are equal. ### to_string ```cpp std::string datalogics_interface::PDFObject::to_string() const ``` **Returns:** `std::string` A string describing this PDFObject. Returns a string representation of this PDFObject. The string includes the object's indirect status, and if indirect, its ID and generation number. ### try_as ```cpp T * datalogics_interface::PDFObject::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this object to a derived Cos type such as `PDFString`, `PDFDict`, `PDFArray`, `PDFStream`, `PDFName`, `PDFInteger`, `PDFReal`, or `PDFBoolean`. Returns nullptr if the object's actual type doesn't match `T`. ### try_as ```cpp const T * datalogics_interface::PDFObject::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # PDFXConvertParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFXConvertParams ```cpp class PDFXConvertParams ``` **Namespace:** `datalogics_interface` ## Description Parameters for converting a document to PDF/X compliance. These parameters control how a Document is converted to the PDF/X standard. PDF/X is a subset of the PDF ISO standard. The purpose of PDF/X is to facilitate graphics exchange, and it therefore has a series of printing related requirements. For example, in PDF/X-1a all fonts need to be embedded and all images need to be CMYK or spot colors. PDF/X-3 accepts calibrated RGB and CIELAB colors, while retaining most of the other restrictions of PDF/X-1a. ## Constructors ### PDFXConvertParams ```cpp datalogics_interface::PDFXConvertParams::PDFXConvertParams() ``` *constructor* Construct PDF/X conversion parameters with defaults. Defaults: RemoveAllAnnotations = false, AbortIfXFAIsPresent = false. ### PDFXConvertParams ```cpp datalogics_interface::PDFXConvertParams::PDFXConvertParams(const PDFXConvertParams &other) ``` *constructor* **Parameters** - `other` ([`const PDFXConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFXConvertParams.md)) Copy constructor. ### PDFXConvertParams ```cpp datalogics_interface::PDFXConvertParams::PDFXConvertParams(PDFXConvertParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`PDFXConvertParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFXConvertParams.md)) ### ~PDFXConvertParams ```cpp datalogics_interface::PDFXConvertParams::~PDFXConvertParams() ``` *destructor* ## Methods ### get_abort_if_xfa_is_present ```cpp bool datalogics_interface::PDFXConvertParams::get_abort_if_xfa_is_present() const ``` **Returns:** `bool` Gets whether conversion is aborted when XFA forms are present. Presence of XFA can result in some loss of data in output PDF/X file as the Library does not support XFA. However client can choose to abort the conversion in case XFA is present by setting this parameter to true. By default we will not abort if XFA is present. If false we will convert even if we detect the XFA form entry in PDDoc. If true we will abort the process. ### get_profile_description ```cpp std::string datalogics_interface::PDFXConvertParams::get_profile_description() const ``` **Returns:** `std::string` Gets the Output Intent profile description for the PDF/X conversion. The Output Intent of a PDF/X document may be any valid CMYK Profile For PDF/X-1a or any valid CMYK or RGB Profile for PDF/X-3. This parameter allows the user to specify a particular profile for this conversion by description. When this parameter is not present, the profile "U.S. Web Coated (SWOP) v2" will be used for both. If this description is present, and specifies a profile of the wrong color family, or specifies a profile which cannot be located in resources, an exception will be raised. ### get_remove_all_annotations ```cpp bool datalogics_interface::PDFXConvertParams::get_remove_all_annotations() const ``` **Returns:** `bool` Gets whether all annotations and actions are removed during conversion. Some of the standards like PDF/X prohibit the presence of some types of Annotations and Actions in order to comply with those standards. By default we will filter all illegal Annotations and Actions. If false we will filter out all illegal Annotations and Actions (according to the standard being used) while retaining the legal ones. If true this will remove all the Annotations and Actions from the output PDF/X compliant file. ### operator= ```cpp PDFXConvertParams & datalogics_interface::PDFXConvertParams::operator=(const PDFXConvertParams &other) ``` **Parameters** - `other` ([`const PDFXConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFXConvertParams.md)) **Returns:** [`PDFXConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFXConvertParams.md) Copy assignment. ### operator= ```cpp PDFXConvertParams & datalogics_interface::PDFXConvertParams::operator=(PDFXConvertParams &&) noexcept ``` **Parameters** - (unnamed) ([`PDFXConvertParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFXConvertParams.md)) **Returns:** [`PDFXConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFXConvertParams.md) ### set_abort_if_xfa_is_present ```cpp void datalogics_interface::PDFXConvertParams::set_abort_if_xfa_is_present(bool value) ``` **Parameters** - `value` (`bool`): whether conversion is aborted when XFA forms are present **Returns:** `void` Sets whether conversion is aborted when XFA forms are present. Presence of XFA can result in some loss of data in output PDF/X file as the Library does not support XFA. However client can choose to abort the conversion in case XFA is present by setting this parameter to true. By default we will not abort if XFA is present. If false we will convert even if we detect the XFA form entry in PDDoc. If true we will abort the process. ### set_profile_description ```cpp void datalogics_interface::PDFXConvertParams::set_profile_description(const std::string &profile) ``` **Parameters** - `profile` (`const std::string &`): the Output Intent profile description for the PDF/X conversion **Returns:** `void` Sets the Output Intent profile description for the PDF/X conversion. The Output Intent of a PDF/X document may be any valid CMYK Profile For PDF/X-1a or any valid CMYK or RGB Profile for PDF/X-3. This parameter allows the user to specify a particular profile for this conversion by description. When this parameter is not present, the profile "U.S. Web Coated (SWOP) v2" will be used for both. If this description is present, and specifies a profile of the wrong color family, or specifies a profile which cannot be located in resources, an exception will be raised. ### set_remove_all_annotations ```cpp void datalogics_interface::PDFXConvertParams::set_remove_all_annotations(bool value) ``` **Parameters** - `value` (`bool`): whether all annotations and actions are removed during conversion **Returns:** `void` Sets whether all annotations and actions are removed during conversion. Some of the standards like PDF/X prohibit the presence of some types of Annotations and Actions in order to comply with those standards. By default we will filter all illegal Annotations and Actions. If false we will filter out all illegal Annotations and Actions (according to the standard being used) while retaining the legal ones. If true this will remove all the Annotations and Actions from the output PDF/X compliant file. --- # PDFXConvertType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PDFXConvertType **Namespace:** `datalogics_interface` ## Description Specifies the PDF/X standard version to convert a document to. ## Values - `X1a = 0`: PDF/X-1a:2001. - `X3 = 1`: PDF/X-3:2003. - `X4 = 2`: PDF/X-4:2010. - `X6 = 3`: PDF/X-6:2020. --- # PermissionFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PermissionFlags **Namespace:** `datalogics_interface` ## Description Permissions mask, for Save. ## Values - `None = 0`: No permission flags set. - `Open = 0x01`: The user can open and decrypt the document. - `Secure = 0x02`: The user can change the document's security settings. - `Print = 0x04`: The user can print the document. Page Setup access is unaffected by this permission, since that affects PDF Viewer's preferences - not the document's. In the Document Security dialog, this corresponds to the Printing entry. - `Edit = 0x08`: The user can edit the document more than adding or modifying text notes (see also EditNotes). In the Document Security dialog, this corresponds to the Changing the Document entry. - `Copy = 0x10`: The user can copy information from the document to the clipboard. In the document restrictions, this corresponds to the Content Copying or Extraction entry. - `EditNotes = 0x20`: The user can add, modify, and delete text notes (see also Edit). In the document restrictions, this corresponds to the Authoring Comments and Form Fields entry. - `SaveAs = 0x40`: The user can perform a Save As.... If both Edit and EditNotes are disallowed, Save will be disabled but Save As... will be enabled. The Save As... menu item is not necessarily disabled even if the user is not permitted to perform a Save As.... **Note:** This cannot be set by clients. - `Ext = 0x80`: Extended permission for document operations beyond the base set. - `FillandSign = 0x100`: Overrides other Permissions bits. It allows the user to fill in or sign existing form or signature fields. - `Accessible = 0x200`: Overrides Copy to enable the Accessibility API. If a document is saved in Rev2 format (Acrobat 4.0 compatible), only the Copy bit is checked to determine the Accessibility API state. - `DocAssembly = 0x400`: Overrides various Edit bits and allows the following operations: page insert/delete/rotate and create bookmark and thumbnail. - `HighPrint = 0x800`: This bit is a supplement to Print. If it is clear (disabled) only low quality printing (Print As Image) is allowed. On UNIX platforms where Print As Image doesn't exist, printing is disabled. - `Owner = 0x8000`: The user is permitted to perform all operations, regardless of the permissions specified by the document. Unless this permission is set, the document's permissions will be reset to those in the document after a full save. - `FormSubmit = 0x10000`: This should be set if the user can submit forms outside of the browser. This bit is a supplement to FillandSign. - `FormSpawnTempl = 0x20000`: This should be set if the user can spawn template pages. This bit will allow page template spawning even if Edit and EditNotes are clear. - `All = -1`: All permissions granted, combining all individual permission flags. - `Settable = 0x04 | 0x08 | 0x10 | 0x20`: The OR of all operations that can be set by the user in the security restrictions (Print + Edit + Copy + EditNotes). - `User = ~(0x01 | 0x02)`: All permissions. --- # PermissionRequestOperation Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PermissionRequestOperation **Namespace:** `datalogics_interface` ## Description An enumerated data type used to describe the target operation of a permissions request. ## Values - `AllOperations = 1`: Check all operations. - `Create = 2`: An enumerated data type used to describe the target operation of a permissions request. - `Delete = 3`: An enumerated data type used to describe the target operation of a permissions request. - `Modify = 4`: An enumerated data type used to describe the target operation of a permissions request. - `Copy = 5`: An enumerated data type used to describe the target operation of a permissions request. - `Accessible = 6`: For accessibility use. - `Select = 7`: For document or page, selecting (not copying) text or graphics. - `Open = 8`: For document open. - `Secure = 9`: For the document: changing security settings. - `PrintHigh = 10`: For the document: regular printing. - `PrintLow = 11`: For the document: low quality printing. - `FillIn = 12`: Form fill-in, or sign the existing field. - `Rotate = 13`: An enumerated data type used to describe the target operation of a permissions request. - `Crop = 14`: An enumerated data type used to describe the target operation of a permissions request. - `Summarize = 15`: For summarizing notes. - `Insert = 16`: An enumerated data type used to describe the target operation of a permissions request. - `Replace = 17`: For the page. - `Reorder = 18`: For the page. - `FullSave = 19`: For the document. - `Import = 20`: For the notes and image. - `Export = 21`: For the notes. ExportPS should check print. - `AnyOperation = 22`: Used for checking to see if any operation is allowed. - `UnknownOperation = 23`: Used for error checking. - `SubmitStandalone = 24`: Submit forms outside of the browser. - `SpawnTemplate = 25`: Allow the form to spawn template pages. - `Online = 26`: This should be always the last item For annotations and forms: enabling online functionality. - `SummaryView = 27`: For annotations: enabling a summary view of annotations in a PDF Viewer. - `BarcodePlaintext = 28`: For forms: enables form appearance to be rendered as a plain text barcode. --- # Point Struct Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point ```cpp struct Point ``` **Namespace:** `datalogics_interface` ## Description Represents a discrete point or space in a PDF. A Point in a PDF document is in the right plane, relative to the origin being the lower left corner of the document. **Referenced by:** [`AxialShadingPattern`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/AxialShadingPattern.md), [`CurveTo`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CurveTo.md), [`CurveToV`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CurveToV.md), [`CurveToY`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CurveToY.md), [`InkAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/InkAnnotation.md), [`LineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LineAnnotation.md), [`LineTo`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LineTo.md), [`MoveTo`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/MoveTo.md), [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md), [`PolyLineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PolyLineAnnotation.md), [`PolygonAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PolygonAnnotation.md), [`Quad`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md), [`RectSegment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RectSegment.md), [`Text`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Text.md) **Uses types:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) ## Constructors ### Point ```cpp datalogics_interface::Point::Point()=default ``` *constructor* ### Point ```cpp datalogics_interface::Point::Point(double h, double v) ``` *constructor* **Parameters** - `h` (`double`) - `v` (`double`) ## Fields ### h ```cpp double datalogics_interface::Point::h ``` ### v ```cpp double datalogics_interface::Point::v ``` ## Methods ### distance_transform ```cpp Point datalogics_interface::Point::distance_transform(const struct Matrix &m) const ``` **Parameters** - `m` ([`const struct Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)) **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) ### operator!= ```cpp bool datalogics_interface::Point::operator!=(const Point &rhs) const ``` **Parameters** - `rhs` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)) **Returns:** `bool` ### operator== ```cpp bool datalogics_interface::Point::operator==(const Point &rhs) const ``` **Parameters** - `rhs` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)) **Returns:** `bool` ### to_string ```cpp std::string datalogics_interface::Point::to_string() const ``` **Returns:** `std::string` ### transform ```cpp Point datalogics_interface::Point::transform(const struct Matrix &m) const ``` **Parameters** - `m` ([`const struct Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)) **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) --- # PolygonAnnotation Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PolygonAnnotation ```cpp class PolygonAnnotation : Annotation ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Annotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md) ## Description A polygon is a closed plane figure bounded by a finite number of line segments. In this case the polygon is created as an annotation added to a PDF file. **Uses types:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### PolygonAnnotation ```cpp datalogics_interface::PolygonAnnotation::PolygonAnnotation(Page &page, const Rect &rect, const std::vector< Point > &vertices) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the PolygonAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. - `vertices` ([`const std::vector< Point > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): A list of points representing the coordinates of the vertices, specified in user space. Create a new PolygonAnnotation at the end of a page's annotation array. To create a PolygonAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### PolygonAnnotation ```cpp datalogics_interface::PolygonAnnotation::PolygonAnnotation(Page &page, const Rect &rect, const std::vector< Point > &vertices, int add_after) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the PolygonAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. - `vertices` ([`const std::vector< Point > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): A list of points representing the coordinates of the vertices, specified in user space. - `add_after` (`int`) Create a new PolygonAnnotation at the end of a page's annotation array. To create a PolygonAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### ~PolygonAnnotation ```cpp datalogics_interface::PolygonAnnotation::~PolygonAnnotation() override ``` *destructor* ## Methods ### clear_interior_color ```cpp void datalogics_interface::Annotation::clear_interior_color() ``` **Returns:** `void` Clear the interior color. ### generate_appearance ```cpp virtual std::unique_ptr< Form > datalogics_interface::Annotation::generate_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the visual appearance, or null if the appearance could not be generated. Generate a new appearance stream with the current annotation properties. The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance. ### get_annotation_feature_level ```cpp virtual double datalogics_interface::Annotation::get_annotation_feature_level() const ``` **Returns:** `double` The minimum PDF version level (e.g. 1.3, 1.4, or 1.5). The minimum PDF version necessary to support the features used in this annotation. ### get_border_dash_pattern ```cpp std::vector< double > datalogics_interface::PolygonAnnotation::get_border_dash_pattern() const ``` **Returns:** `std::vector< double >` An array defining a pattern of dashes and gaps to be used in drawing a dashed border (border style D). The dash array is a series of numbers that specify the lengths of alternating dashes and gaps. Lengths must be nonnegative, and are expressed in user space units. Default value is [3] ### get_border_style ```cpp std::string datalogics_interface::PolygonAnnotation::get_border_style() const ``` **Returns:** `std::string` The border style. Can be one of: S - Solid D - Dashed. The dash pattern is specified as an array (see DashPattern) B - Beveled I - Inset U - Underline Other border styles may be defined in the future. Default is "S" ### get_border_style_width ```cpp double datalogics_interface::PolygonAnnotation::get_border_style_width() const ``` **Returns:** `double` The border width in points. If this value is 0, no border is drawn. The default is 1.0. ### get_color ```cpp Color datalogics_interface::Annotation::get_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The annotation's color. The color of the annotation. ### get_contents ```cpp std::string datalogics_interface::Annotation::get_contents() const ``` **Returns:** `std::string` The annotation's text contents. The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### get_flags ```cpp AnnotationFlags datalogics_interface::Annotation::get_flags() const ``` **Returns:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md) The annotation's flags. The flags for the annotation. ### get_interior_color ```cpp std::unique_ptr< Color > datalogics_interface::Annotation::get_interior_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The interior fill color, or null if no interior color is set. The interior color with which to fill the annotation's rectangle or circle. The color of the border itself can be retrieved from Annotation.Color. ### get_normal_appearance ```cpp std::unique_ptr< Form > datalogics_interface::Annotation::get_normal_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the annotation's normal appearance, or null if no normal appearance has been set. The normal appearance of the annotation, represented as a Form XObject. ### get_opacity ```cpp double datalogics_interface::Annotation::get_opacity() const ``` **Returns:** `double` The opacity value for this annotation. The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### get_rect ```cpp Rect datalogics_interface::Annotation::get_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The annotation's bounding rectangle in user space coordinates. The size and location of the annotation on its page. ### get_subtype ```cpp std::string datalogics_interface::Annotation::get_subtype() const ``` **Returns:** `std::string` The subtype string (e.g. "Circle", "Square", "Line"). The annotation's subtype. ### get_title ```cpp std::string datalogics_interface::Annotation::get_title() const ``` **Returns:** `std::string` The title string. The title of the annotation. ### get_vertices ```cpp std::vector< Point > datalogics_interface::PolygonAnnotation::get_vertices() const ``` **Returns:** [`std::vector< Point >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) The array of points, in order, that define the vertices of the polygon in user space coordinates. The vertices that define the polygon annotation, in user space. ### has_rich_text_data ```cpp bool datalogics_interface::Annotation::has_rich_text_data() const ``` **Returns:** `bool` true if the annotation contains Rich Text String content. Checks the annotation for Rich Text String content (PDFReference 1.7 Section 8.6.2). Annotations that contain Rich Text String content and do not have a normal appearance set will not be visible when rendering the page. ### operator== ```cpp bool datalogics_interface::Annotation::operator==(const Annotation &other) const ``` **Parameters** - `other` ([`const Annotation &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)): The annotation to compare with this annotation. **Returns:** `bool` true if the two annotations are equal. Test annotations for equality (if they are the same annotation). ### set_annotation_feature_level ```cpp virtual void datalogics_interface::Annotation::set_annotation_feature_level(double level) ``` **Parameters** - `level` (`double`): The target PDF version level. Features requiring a higher version will be removed. **Returns:** `void` Removes features not supported in the supplied version number. ### set_border_dash_pattern ```cpp void datalogics_interface::PolygonAnnotation::set_border_dash_pattern(const std::vector< double > &pattern) ``` **Parameters** - `pattern` (`const std::vector< double > &`): the border style dash pattern **Returns:** `void` ### set_border_style ```cpp void datalogics_interface::PolygonAnnotation::set_border_style(const std::string &style) ``` **Parameters** - `style` (`const std::string &`): the border style **Returns:** `void` ### set_border_style_width ```cpp void datalogics_interface::PolygonAnnotation::set_border_style_width(double width) ``` **Parameters** - `width` (`double`): the border style width **Returns:** `void` ### set_color ```cpp void datalogics_interface::Annotation::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new color to set. **Returns:** `void` The color of the annotation. ### set_contents ```cpp void datalogics_interface::Annotation::set_contents(const std::string &contents) ``` **Parameters** - `contents` (`const std::string &`): The new text contents. **Returns:** `void` The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### set_flags ```cpp void datalogics_interface::Annotation::set_flags(AnnotationFlags flags) ``` **Parameters** - `flags` ([`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md)): The new annotation flags to set. **Returns:** `void` The flags for the annotation. ### set_interior_color ```cpp void datalogics_interface::Annotation::set_interior_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new interior fill color. Pass null to remove the interior color. **Returns:** `void` The interior color with which to fill the annotation's rectangle or circle. Only RGB colors are allowed. The color of the border itself can be retrieved from Annotation.Color. ### set_normal_appearance ```cpp void datalogics_interface::Annotation::set_normal_appearance(Form &form) ``` **Parameters** - `form` ([`Form &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)): The Form to use as the annotation's normal appearance. **Returns:** `void` The normal appearance of the annotation, represented as a Form XObject. ### set_opacity ```cpp void datalogics_interface::Annotation::set_opacity(double opacity) ``` **Parameters** - `opacity` (`double`): The new opacity value to set. **Returns:** `void` The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### set_rect ```cpp void datalogics_interface::Annotation::set_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The new bounding rectangle in user space coordinates. **Returns:** `void` The size and location of the annotation on its page. ### set_title ```cpp void datalogics_interface::Annotation::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): The new title string. **Returns:** `void` The title of the annotation. ### set_vertices ```cpp void datalogics_interface::PolygonAnnotation::set_vertices(const std::vector< Point > &vertices) ``` **Parameters** - `vertices` ([`const std::vector< Point > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): The array of points, in order, that define the vertices of the polygon in user space coordinates. **Returns:** `void` The vertices that define the polygon annotation, in user space. ### to_string ```cpp std::string datalogics_interface::Annotation::to_string() const ``` **Returns:** `std::string` A string describing this annotation, including its type and rectangle. Returns a string representation of this annotation. ### try_as ```cpp T * datalogics_interface::Annotation::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this annotation to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Annotation::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # PolyLineAnnotation Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PolyLineAnnotation ```cpp class PolyLineAnnotation : Annotation ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Annotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md) ## Description A finite number of line segments in a PDF added as an annotation. A polyline is also called a polygonal chain or piecewise linear curve. It represents a finite number of line segments where the first and last vertex are not connected. In this case, the polyline is added as an annotation to a PDF file. **Uses types:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`LineEndingStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineEndingStyle.md), [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### PolyLineAnnotation ```cpp datalogics_interface::PolyLineAnnotation::PolyLineAnnotation(Page &page, const Rect &rect, const std::vector< Point > &vertices) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the PolyLineAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. - `vertices` ([`const std::vector< Point > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): A list of points representing the coordinates of the vertices, specified in user space. Create a new PolyLineAnnotation at the end of a page's annotation array. To create a PolyLineAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### PolyLineAnnotation ```cpp datalogics_interface::PolyLineAnnotation::PolyLineAnnotation(Page &page, const Rect &rect, const std::vector< Point > &vertices, int add_after) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the PolyLineAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. - `vertices` ([`const std::vector< Point > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): A list of points representing the coordinates of the vertices, specified in user space. - `add_after` (`int`) Create a new PolyLineAnnotation at the end of a page's annotation array. To create a PolyLineAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### ~PolyLineAnnotation ```cpp datalogics_interface::PolyLineAnnotation::~PolyLineAnnotation() override ``` *destructor* ## Methods ### clear_interior_color ```cpp void datalogics_interface::Annotation::clear_interior_color() ``` **Returns:** `void` Clear the interior color. ### generate_appearance ```cpp virtual std::unique_ptr< Form > datalogics_interface::Annotation::generate_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the visual appearance, or null if the appearance could not be generated. Generate a new appearance stream with the current annotation properties. The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance. ### get_annotation_feature_level ```cpp virtual double datalogics_interface::Annotation::get_annotation_feature_level() const ``` **Returns:** `double` The minimum PDF version level (e.g. 1.3, 1.4, or 1.5). The minimum PDF version necessary to support the features used in this annotation. ### get_border_dash_pattern ```cpp std::vector< double > datalogics_interface::PolyLineAnnotation::get_border_dash_pattern() const ``` **Returns:** `std::vector< double >` An array defining a pattern of dashes and gaps to be used in drawing a dashed border (border style D). The dash array is a series of numbers that specify the lengths of alternating dashes and gaps. Lengths must be nonnegative, and are expressed in user space units. Default value is [3] ### get_border_style ```cpp std::string datalogics_interface::PolyLineAnnotation::get_border_style() const ``` **Returns:** `std::string` The border style. Can be one of: S - Solid D - Dashed. The dash pattern is specified as an array (see DashPattern) B - Beveled I - Inset U - Underline Other border styles may be defined in the future. Default is "S" ### get_border_style_width ```cpp double datalogics_interface::PolyLineAnnotation::get_border_style_width() const ``` **Returns:** `double` The border width in points. If this value is 0, no border is drawn. The default is 1.0. ### get_color ```cpp Color datalogics_interface::Annotation::get_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The annotation's color. The color of the annotation. ### get_contents ```cpp std::string datalogics_interface::Annotation::get_contents() const ``` **Returns:** `std::string` The annotation's text contents. The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### get_end_ending_style ```cpp LineEndingStyle datalogics_interface::PolyLineAnnotation::get_end_ending_style() const ``` **Returns:** [`LineEndingStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineEndingStyle.md) The line ending style applied to the last vertex of the polyline. ### get_flags ```cpp AnnotationFlags datalogics_interface::Annotation::get_flags() const ``` **Returns:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md) The annotation's flags. The flags for the annotation. ### get_interior_color ```cpp std::unique_ptr< Color > datalogics_interface::Annotation::get_interior_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The interior fill color, or null if no interior color is set. The interior color with which to fill the annotation's rectangle or circle. The color of the border itself can be retrieved from Annotation.Color. ### get_normal_appearance ```cpp std::unique_ptr< Form > datalogics_interface::Annotation::get_normal_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the annotation's normal appearance, or null if no normal appearance has been set. The normal appearance of the annotation, represented as a Form XObject. ### get_opacity ```cpp double datalogics_interface::Annotation::get_opacity() const ``` **Returns:** `double` The opacity value for this annotation. The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### get_rect ```cpp Rect datalogics_interface::Annotation::get_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The annotation's bounding rectangle in user space coordinates. The size and location of the annotation on its page. ### get_start_ending_style ```cpp LineEndingStyle datalogics_interface::PolyLineAnnotation::get_start_ending_style() const ``` **Returns:** [`LineEndingStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineEndingStyle.md) The line ending style applied to the first vertex of the polyline. ### get_subtype ```cpp std::string datalogics_interface::Annotation::get_subtype() const ``` **Returns:** `std::string` The subtype string (e.g. "Circle", "Square", "Line"). The annotation's subtype. ### get_title ```cpp std::string datalogics_interface::Annotation::get_title() const ``` **Returns:** `std::string` The title string. The title of the annotation. ### get_vertices ```cpp std::vector< Point > datalogics_interface::PolyLineAnnotation::get_vertices() const ``` **Returns:** [`std::vector< Point >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) The array of points, in order, that define the vertices of the polyline in user space coordinates. ### has_rich_text_data ```cpp bool datalogics_interface::Annotation::has_rich_text_data() const ``` **Returns:** `bool` true if the annotation contains Rich Text String content. Checks the annotation for Rich Text String content (PDFReference 1.7 Section 8.6.2). Annotations that contain Rich Text String content and do not have a normal appearance set will not be visible when rendering the page. ### operator== ```cpp bool datalogics_interface::Annotation::operator==(const Annotation &other) const ``` **Parameters** - `other` ([`const Annotation &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)): The annotation to compare with this annotation. **Returns:** `bool` true if the two annotations are equal. Test annotations for equality (if they are the same annotation). ### set_annotation_feature_level ```cpp virtual void datalogics_interface::Annotation::set_annotation_feature_level(double level) ``` **Parameters** - `level` (`double`): The target PDF version level. Features requiring a higher version will be removed. **Returns:** `void` Removes features not supported in the supplied version number. ### set_border_dash_pattern ```cpp void datalogics_interface::PolyLineAnnotation::set_border_dash_pattern(const std::vector< double > &pattern) ``` **Parameters** - `pattern` (`const std::vector< double > &`): the border style dash pattern **Returns:** `void` ### set_border_style ```cpp void datalogics_interface::PolyLineAnnotation::set_border_style(const std::string &style) ``` **Parameters** - `style` (`const std::string &`): the border style **Returns:** `void` ### set_border_style_width ```cpp void datalogics_interface::PolyLineAnnotation::set_border_style_width(double width) ``` **Parameters** - `width` (`double`): the border style width **Returns:** `void` ### set_color ```cpp void datalogics_interface::Annotation::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new color to set. **Returns:** `void` The color of the annotation. ### set_contents ```cpp void datalogics_interface::Annotation::set_contents(const std::string &contents) ``` **Parameters** - `contents` (`const std::string &`): The new text contents. **Returns:** `void` The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### set_end_ending_style ```cpp void datalogics_interface::PolyLineAnnotation::set_end_ending_style(LineEndingStyle style) ``` **Parameters** - `style` ([`LineEndingStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineEndingStyle.md)): The line ending style to apply at the end point. **Returns:** `void` The line ending style applied to the last vertex of the polyline. ### set_flags ```cpp void datalogics_interface::Annotation::set_flags(AnnotationFlags flags) ``` **Parameters** - `flags` ([`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md)): The new annotation flags to set. **Returns:** `void` The flags for the annotation. ### set_interior_color ```cpp void datalogics_interface::Annotation::set_interior_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new interior fill color. Pass null to remove the interior color. **Returns:** `void` The interior color with which to fill the annotation's rectangle or circle. Only RGB colors are allowed. The color of the border itself can be retrieved from Annotation.Color. ### set_normal_appearance ```cpp void datalogics_interface::Annotation::set_normal_appearance(Form &form) ``` **Parameters** - `form` ([`Form &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)): The Form to use as the annotation's normal appearance. **Returns:** `void` The normal appearance of the annotation, represented as a Form XObject. ### set_opacity ```cpp void datalogics_interface::Annotation::set_opacity(double opacity) ``` **Parameters** - `opacity` (`double`): The new opacity value to set. **Returns:** `void` The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### set_rect ```cpp void datalogics_interface::Annotation::set_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The new bounding rectangle in user space coordinates. **Returns:** `void` The size and location of the annotation on its page. ### set_start_ending_style ```cpp void datalogics_interface::PolyLineAnnotation::set_start_ending_style(LineEndingStyle style) ``` **Parameters** - `style` ([`LineEndingStyle`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/LineEndingStyle.md)): The line ending style to apply at the start point. **Returns:** `void` The line ending style applied to the first vertex of the polyline. ### set_title ```cpp void datalogics_interface::Annotation::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): The new title string. **Returns:** `void` The title of the annotation. ### set_vertices ```cpp void datalogics_interface::PolyLineAnnotation::set_vertices(const std::vector< Point > &vertices) ``` **Parameters** - `vertices` ([`const std::vector< Point > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): The array of points, in order, that define the vertices of the polyline in user space coordinates. **Returns:** `void` The vertices that define the polyline annotation, in user space. ### to_string ```cpp std::string datalogics_interface::Annotation::to_string() const ``` **Returns:** `std::string` A string describing this annotation, including its type and rectangle. Returns a string representation of this annotation. ### try_as ```cpp T * datalogics_interface::Annotation::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this annotation to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Annotation::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # PostScript Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PostScript ```cpp class PostScript ``` **Namespace:** `datalogics_interface` ## Description An XObject stream with the subtype PostScript. A PostScript XObject is an XObject stream with the subtype entry of PostScript. The XObject contains a fragment of code expressed in the PostScript language. PostScript External Objects are not recommended. **Uses types:** [`PDFStream`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFStream.md) ## Constructors ### PostScript ```cpp datalogics_interface::PostScript::PostScript(PostScript &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`PostScript &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PostScript.md)) ### ~PostScript ```cpp datalogics_interface::PostScript::~PostScript() ``` *destructor* ## Methods ### get_stream ```cpp std::unique_ptr< PDFStream > datalogics_interface::PostScript::get_stream() const ``` **Returns:** [`std::unique_ptr< PDFStream >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFStream.md) The PDFStream associated with this PostScript XObject. The PDFStream containing the PostScript code for this XObject. ### operator= ```cpp PostScript & datalogics_interface::PostScript::operator=(PostScript &&) noexcept ``` **Parameters** - (unnamed) ([`PostScript &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PostScript.md)) **Returns:** [`PostScript &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PostScript.md) --- # PostScriptCalculatorFunction Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PostScriptCalculatorFunction ```cpp class PostScriptCalculatorFunction : Function ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Function`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md) ## Description A function represented as a stream containing code written in a small subset of the PostScript language. ## Constructors ### PostScriptCalculatorFunction ```cpp datalogics_interface::PostScriptCalculatorFunction::PostScriptCalculatorFunction(const std::vector< double > &domain, const std::vector< double > &range, const std::string &code) ``` *constructor* **Parameters** - `domain` (`const std::vector< double > &`): an array of 2 * m numbers, where m is the number of input values - `range` (`const std::vector< double > &`): an array of 2 * n numbers, where n is the number of output values - `code` (`const std::string &`): the code of the function, written in a subset of the PostScript language Create PostScript calculator function, represented as a stream containing code written in a small subset of the PostScript language. ### PostScriptCalculatorFunction ```cpp datalogics_interface::PostScriptCalculatorFunction::PostScriptCalculatorFunction(PostScriptCalculatorFunction &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`PostScriptCalculatorFunction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PostScriptCalculatorFunction.md)) ### ~PostScriptCalculatorFunction ```cpp datalogics_interface::PostScriptCalculatorFunction::~PostScriptCalculatorFunction() override ``` *destructor* ## Methods ### apply ```cpp std::vector< double > datalogics_interface::Function::apply(const std::vector< double > &args) const ``` **Parameters** - `args` (`const std::vector< double > &`): input values for the function. The number of input values must agree with the number of inputs the function takes. **Returns:** `std::vector< double >` a list of the result values from the function Apply the function to supplied input values ### get_code ```cpp std::string datalogics_interface::PostScriptCalculatorFunction::get_code() const ``` **Returns:** `std::string` The code of the function, written in a subset of the PostScript language. The code defines how input values are transformed into output values. ### get_domain ```cpp std::vector< double > datalogics_interface::Function::get_domain() const ``` **Returns:** `std::vector< double >` The domain of the function. Contains 2 * m elements, where m is the number of inputs to the function. Each successive pair of elements gives the minimum and maximum values for one of the inputs. Input values to the function are clamped to these minimum and maximum values. ### get_n_inputs ```cpp int datalogics_interface::Function::get_n_inputs() const ``` **Returns:** `int` The number of inputs to the function. ### get_n_outputs ```cpp int datalogics_interface::Function::get_n_outputs() const ``` **Returns:** `int` The number of outputs from the function. ### operator= ```cpp PostScriptCalculatorFunction & datalogics_interface::PostScriptCalculatorFunction::operator=(PostScriptCalculatorFunction &&) noexcept ``` **Parameters** - (unnamed) ([`PostScriptCalculatorFunction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PostScriptCalculatorFunction.md)) **Returns:** [`PostScriptCalculatorFunction &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PostScriptCalculatorFunction.md) ### set_domain ```cpp void datalogics_interface::Function::set_domain(const std::vector< double > &domain) ``` **Parameters** - `domain` (`const std::vector< double > &`) **Returns:** `void` The domain of the function. Contains 2 * m elements, where m is the number of inputs to the function. Each successive pair of elements gives the minimum and maximum values for one of the inputs. Input values to the function are clamped to these minimum and maximum values. ### to_string ```cpp std::string datalogics_interface::PostScriptCalculatorFunction::to_string() const override ``` **Returns:** `std::string` A string representation of the PostScriptCalculatorFunction, including the number of inputs and outputs, domain, range, and the PostScript code. A string value describing the function. --- # PrintUserParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PrintUserParams ```cpp class PrintUserParams ``` **Namespace:** `datalogics_interface` ## Description A structure used to set parameters for print jobs. Two structures provide settings for setting parameters for print jobs, PrintUserParams and PrintParams. PrintUserParams was created first, and then PrintParams was created as an extension of PrintUserParams, to provide more settings to account for changing technology. When the system seeks to print a document it will pass the content and the print parameters, such as the page size, paper tray, and landscape v. portrait, to the print API in APDFL. If the setting is in PrintParams it will pass the document and parameters to PrintParams and then to PrintUserParams and from there to the print API to complete the printing process. The print logic may take different code paths depending on whether or not the print content is being sent to a printer or to a file, or if the printing uses PostScript or not. When you see a print setting that appears in both PrintUserParams and PrintParams, such as "ShrinktoFit," set the appropriate value in both of these classes. Also, PrintParams offers a variety of settings related to PostScript, but the use of PrintParams is not limited to PostScript. ## Constructors ### PrintUserParams ```cpp datalogics_interface::PrintUserParams::PrintUserParams() ``` *constructor* Constructs a PrintUserParams with default settings. Initializes the print parameters to default values: paper size set to use the media box, emit to printer enabled, emit to file disabled, and zero copies. On macOS, also initializes the system print session, print settings, and page format. ### PrintUserParams ```cpp datalogics_interface::PrintUserParams::PrintUserParams(PrintUserParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`PrintUserParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PrintUserParams.md)) ### ~PrintUserParams ```cpp datalogics_interface::PrintUserParams::~PrintUserParams() ``` *destructor* ## Methods ### get_binary_ok ```cpp int datalogics_interface::PrintUserParams::get_binary_ok() const ``` **Returns:** `int` Binary ok setting. Gets whether to enable Binary data, 1 turns it on and 0 turns it off. It applies to a Postscript printer. This API is available on Windows and macOS only. ### get_collate ```cpp bool datalogics_interface::PrintUserParams::get_collate() const ``` **Returns:** `bool` True if copies should be collated. Collate property. ### get_device_name ```cpp std::string datalogics_interface::PrintUserParams::get_device_name() const ``` **Returns:** `std::string` The unicode name of the device to print to (for example, "Distiller Assistant v3.01"). Available devices can be found in the Windows Registry at HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices. It applies to a printer. ### get_driver_name ```cpp std::string datalogics_interface::PrintUserParams::get_driver_name() const ``` **Returns:** `std::string` The unicode name of the driver (for example, "winspool"). See the registry key for deviceName. It applies to the printer. ### get_emit_to_file ```cpp bool datalogics_interface::PrintUserParams::get_emit_to_file() const ``` **Returns:** `bool` true if a PostScript file is created. Gets whether a Postscript file is created. ### get_emit_to_printer ```cpp bool datalogics_interface::PrintUserParams::get_emit_to_printer() const ``` **Returns:** `bool` true if output to a printer. Gets whether to Output the PDF document to a Postscript Printer. ### get_end_page ```cpp int datalogics_interface::PrintUserParams::get_end_page() const ``` **Returns:** `int` the page to end upon Gets the page on which to finish printing, using zero-based nubmering. It applies to a printer. This API is only available on Windows and macOS only. ### get_in_file_name ```cpp std::string datalogics_interface::PrintUserParams::get_in_file_name() const ``` **Returns:** `std::string` Unicode name used for the Windows DOCINFO structure (lpszDocName) that points to a NULL-terminated string that specifying the name of the document. In case of printing/exporting to Postscript, this field sets the Title DSC comment in the generated Postscript file. If inFileName was not provided, the Title DSC comment is filled with the name of pdf document. ### get_n_copies ```cpp int datalogics_interface::PrintUserParams::get_n_copies() const ``` **Returns:** `int` the number of copies that will be printed Gets the number of copies to print. It applies to a Postscript file. ### get_out_file_name ```cpp std::string datalogics_interface::PrintUserParams::get_out_file_name() const ``` **Returns:** `std::string` Unicode name used for the Windows DOCINFO structure (lpszOutput). It points to a NULL-terminated string that specifies the name of an output file. If this pointer is NULL, the output will be sent to the device identified by deviceName, driverName, and portName. It applies to a printer. ### get_paper_height ```cpp unsigned short datalogics_interface::PrintUserParams::get_paper_height() const ``` **Returns:** `unsigned short` the height of the paper in points Gets the Height of paper in points. The default value is 792. It applies to a Postscript printer. ### get_paper_width ```cpp unsigned short datalogics_interface::PrintUserParams::get_paper_width() const ``` **Returns:** `unsigned short` the width of the paper in points Gets the Width of paper in points. The default value is 612. It applies to a Postscript printer. ### get_port_name ```cpp std::string datalogics_interface::PrintUserParams::get_port_name() const ``` **Returns:** `std::string` The unicode name of the port (for example, "Ne00"). See the registry key for deviceName. It applies to the printer. ### get_print_annots ```cpp int datalogics_interface::PrintUserParams::get_print_annots() const ``` **Returns:** `int` 1 if annotations will be printed, 0 if not Gets the printing annotations setting, 1 turns it on, 0 turns it off. It applies to a printer. This API is available on Windows and macOS only. ### get_ps_level ```cpp int datalogics_interface::PrintUserParams::get_ps_level() const ``` **Returns:** `int` Postscript level setting Gets the Postscript level. It applies to a Postscript printer. This API is available on Windows and macOS only. ### get_reverse ```cpp int datalogics_interface::PrintUserParams::get_reverse() const ``` **Returns:** `int` 1 to reverse page order or 0 for regular order Gets whether to reverses print order, 1 reverses it and 0 does regular order. It applies to a printer. This API is available on Windows and macOS only. ### get_shrink_to_fit ```cpp bool datalogics_interface::PrintUserParams::get_shrink_to_fit() const ``` **Returns:** `bool` true if the page will be shrunk to fit Gets the Shrink to fit setting, true turns it on, false turns it off. It applies to a Postscript printer. This API is available on Windows and macOS only. ### get_start_page ```cpp int datalogics_interface::PrintUserParams::get_start_page() const ``` **Returns:** `int` the start page Gets the page to start printing with, using zero-based numbering. It applies to a printer. This API is only available on Windows and macOS only. ### get_trans_quality ```cpp int datalogics_interface::PrintUserParams::get_trans_quality() const ``` **Returns:** `int` the transparency flatting quality, 1 is fastest; 5 is best Gets the Transparency flattening quality control. 1 is fastest; 5 is best. The default is 3. It applies to a printer. This API is available on Windows only. ### operator= ```cpp PrintUserParams & datalogics_interface::PrintUserParams::operator=(PrintUserParams &&) noexcept ``` **Parameters** - (unnamed) ([`PrintUserParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PrintUserParams.md)) **Returns:** [`PrintUserParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PrintUserParams.md) ### set_binary_ok ```cpp void datalogics_interface::PrintUserParams::set_binary_ok(int value) ``` **Parameters** - `value` (`int`): Binary Ok setting. **Returns:** `void` Sets whether to enable Binary datam, 1 turns it on and 0 turns it off. It applies to a Postscript printer. This API is available on Windows and macOS only. ### set_collate ```cpp void datalogics_interface::PrintUserParams::set_collate(bool value) ``` **Parameters** - `value` (`bool`): True if need to collate copies. **Returns:** `void` Collate property. These private functions are used to keep the DevMode (or Mac PMSession/Settings/Etc) in 'sync': all relevant fields in both structures should agree on common settings at the moment PDFLPrintDoc() (in CDocument) is called. This synchronization is necessary because DevMode settings can change outside of DLE's direct control (e.g. print dialog box). UpdateDevModeAndNamesFromPrintDlgInternal(): Updates the DevMode and DevNames with handles pulled from a PRINTDLG UpdateDevModeFromPrintUserParamsInternal(): Updates the DevMode with values from the current PrintUserParams UpdatePrintUserParamsFromDevModeInternal(): Updates the PrintUserParams with values from the current DevMode ### set_device_name ```cpp void datalogics_interface::PrintUserParams::set_device_name(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): the device name **Returns:** `void` ### set_driver_name ```cpp void datalogics_interface::PrintUserParams::set_driver_name(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): the driver name **Returns:** `void` ### set_emit_to_file ```cpp void datalogics_interface::PrintUserParams::set_emit_to_file(bool value) ``` **Parameters** - `value` (`bool`): pass true to emit output to a PostScript file **Returns:** `void` Sets whether a Postscript file is created. You set either this parameter or emitToPrinter, but not both. ### set_emit_to_printer ```cpp void datalogics_interface::PrintUserParams::set_emit_to_printer(bool value) ``` **Parameters** - `value` (`bool`): pass true to emit to the printer **Returns:** `void` Sets whether to Output the PDF document to a Postscript Printer. Set either this parameter or emitToFile, but not both. ### set_end_page ```cpp void datalogics_interface::PrintUserParams::set_end_page(int page) ``` **Parameters** - `page` (`int`): the page to end upon **Returns:** `void` Sets the page on which to finish printing, using zero-based nubmering. It applies to a printer. This API is only available on Windows and macOS only. ### set_in_file_name ```cpp void datalogics_interface::PrintUserParams::set_in_file_name(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): the input file name used as the Title DSC comment in the generated Postscript file. **Returns:** `void` ### set_n_copies ```cpp void datalogics_interface::PrintUserParams::set_n_copies(int copies) ``` **Parameters** - `copies` (`int`): the number of copies to print. **Returns:** `void` Sets the number of copies to print. It applies to a Postscript file. ### set_out_file_name ```cpp void datalogics_interface::PrintUserParams::set_out_file_name(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): the out file name **Returns:** `void` ### set_paper_height ```cpp void datalogics_interface::PrintUserParams::set_paper_height(unsigned short height) ``` **Parameters** - `height` (`unsigned short`): the height of the paper in points **Returns:** `void` Sets the Height of paper in points. The default value is 792. It applies to a Postscript printer. ### set_paper_width ```cpp void datalogics_interface::PrintUserParams::set_paper_width(unsigned short width) ``` **Parameters** - `width` (`unsigned short`): the width of the paper in points **Returns:** `void` Sets the Width of paper in points. The default value is 612. It applies to a Postscript printer. ### set_port_name ```cpp void datalogics_interface::PrintUserParams::set_port_name(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): the port name **Returns:** `void` ### set_print_annots ```cpp void datalogics_interface::PrintUserParams::set_print_annots(int value) ``` **Parameters** - `value` (`int`): 1 to print annotations, 0 to not print them. **Returns:** `void` Sets the printing annotations setting, 1 turns it on, 0 turns it off. It applies to a printer. This API is available on Windows and macOS only. ### set_ps_level ```cpp void datalogics_interface::PrintUserParams::set_ps_level(int level) ``` **Parameters** - `level` (`int`): Postscript Level setting. **Returns:** `void` Sets the Postscript level. It applies to a Postscript printer. This API is available on Windows and macOS only. ### set_reverse ```cpp void datalogics_interface::PrintUserParams::set_reverse(int value) ``` **Parameters** - `value` (`int`): 1 to reverse page order or 0 for regular order **Returns:** `void` Sets whether to reverses print order, 1 reverses it and 0 does regular order. It applies to a printer. This API is available on Windows and macOS only. ### set_shrink_to_fit ```cpp void datalogics_interface::PrintUserParams::set_shrink_to_fit(bool value) ``` **Parameters** - `value` (`bool`): pass true to shrink the page to fit **Returns:** `void` Sets the Shrink to fit setting, true turns it on, false turns it off. It applies to a PostScript printer. This API is available on Windows and macOS only. ### set_start_page ```cpp void datalogics_interface::PrintUserParams::set_start_page(int page) ``` **Parameters** - `page` (`int`): the page to start on **Returns:** `void` Sets the page to start printing with, using zero-based numbering. It applies to a printer. This API is only available on Windows and macOS only. ### set_trans_quality ```cpp void datalogics_interface::PrintUserParams::set_trans_quality(int quality) ``` **Parameters** - `quality` (`int`): the transparency flatting quality, 1 is fastest; 5 is best **Returns:** `void` Sets the Transparency flattening quality control. 1 is fastest; 5 is best. The default is 3. It applies to a printer. This API is available on Windows only. --- # QRColor Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/QRColor ```cpp class QRColor ``` **Namespace:** `datalogics_interface` ## Description Used to control how the QR color is created. **Note:** This class intentionally uses inline storage rather than the pimpl pattern because it is a trivial 3-member value type with no internal APDFL object to wrap. **Referenced by:** [`QREncodeParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/QREncodeParams.md) ## Constructors ### QRColor ```cpp datalogics_interface::QRColor::QRColor() ``` *constructor* Create a new QRColor object. ### QRColor ```cpp datalogics_interface::QRColor::QRColor(int red, int green, int blue) ``` *constructor* **Parameters** - `red` (`int`) - `green` (`int`) - `blue` (`int`) Construct with RGB values. ## Methods ### get_blue ```cpp int datalogics_interface::QRColor::get_blue() const ``` **Returns:** `int` The blue component value. Gets the blue component of the QR color. ### get_green ```cpp int datalogics_interface::QRColor::get_green() const ``` **Returns:** `int` The green component value. Gets the green component of the QR color. ### get_red ```cpp int datalogics_interface::QRColor::get_red() const ``` **Returns:** `int` The red component value. Gets the red component of the QR color. ### set_blue ```cpp void datalogics_interface::QRColor::set_blue(int blue) ``` **Parameters** - `blue` (`int`): The blue component value to set. **Returns:** `void` Sets the blue component of the QR color. ### set_green ```cpp void datalogics_interface::QRColor::set_green(int green) ``` **Parameters** - `green` (`int`): The green component value to set. **Returns:** `void` Sets the green component of the QR color. ### set_red ```cpp void datalogics_interface::QRColor::set_red(int red) ``` **Parameters** - `red` (`int`): The red component value to set. **Returns:** `void` Sets the red component of the QR color. --- # QREncodeParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/QREncodeParams ```cpp class QREncodeParams ``` **Namespace:** `datalogics_interface` ## Description Used to control how the QR code is created. **Uses types:** [`QRColor`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/QRColor.md), [`QRErrorCorrectionLevel`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/QRErrorCorrectionLevel.md) ## Constructors ### QREncodeParams ```cpp datalogics_interface::QREncodeParams::QREncodeParams(const std::string &text, double x, double y, double width, double height, QRErrorCorrectionLevel error_level, unsigned int quiet_zone_size, const QRColor &code_color, const QRColor &background_color) ``` *constructor* **Parameters** - `text` (`const std::string &`): The text string to encode in the QR code. - `x` (`double`): The X coordinate of the lower-left corner of the QR code on the page, in user space units. - `y` (`double`): The Y coordinate of the lower-left corner of the QR code on the page, in user space units. - `width` (`double`): The width of the QR code, in user space units. - `height` (`double`): The height of the QR code, in user space units. - `error_level` ([`QRErrorCorrectionLevel`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/QRErrorCorrectionLevel.md)): The error correction level for the QR code. - `quiet_zone_size` (`unsigned int`): The size of the quiet zone (margin) around the QR code, in modules. - `code_color` ([`const QRColor &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/QRColor.md)): The color of the QR code modules (the dark elements). - `background_color` ([`const QRColor &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/QRColor.md)): The color of the background behind the QR code modules. Create a new QREncodeParams object using the specified values. ### QREncodeParams ```cpp datalogics_interface::QREncodeParams::QREncodeParams(QREncodeParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`QREncodeParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/QREncodeParams.md)) ### ~QREncodeParams ```cpp datalogics_interface::QREncodeParams::~QREncodeParams() ``` *destructor* ## Methods ### get_background_color ```cpp QRColor datalogics_interface::QREncodeParams::get_background_color() const ``` **Returns:** [`QRColor`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/QRColor.md) Get the color of the background behind the QR code modules. ### get_code_color ```cpp QRColor datalogics_interface::QREncodeParams::get_code_color() const ``` **Returns:** [`QRColor`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/QRColor.md) Get the color of the QR code modules (the dark elements). ### get_error_correction_level ```cpp QRErrorCorrectionLevel datalogics_interface::QREncodeParams::get_error_correction_level() const ``` **Returns:** [`QRErrorCorrectionLevel`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/QRErrorCorrectionLevel.md) Get the error correction level of the QR code. ### get_height ```cpp double datalogics_interface::QREncodeParams::get_height() const ``` **Returns:** `double` Get the height of the QR code, in user space units. ### get_quiet_zone_size ```cpp unsigned int datalogics_interface::QREncodeParams::get_quiet_zone_size() const ``` **Returns:** `unsigned int` Get the quiet zone size (margin around the QR code), in modules. ### get_text ```cpp std::string datalogics_interface::QREncodeParams::get_text() const ``` **Returns:** `std::string` Get the text string to be encoded in the QR code. ### get_width ```cpp double datalogics_interface::QREncodeParams::get_width() const ``` **Returns:** `double` Get the width of the QR code, in user space units. ### get_x ```cpp double datalogics_interface::QREncodeParams::get_x() const ``` **Returns:** `double` Get the X coordinate of the lower-left corner of the QR code on the page, in user space units. ### get_y ```cpp double datalogics_interface::QREncodeParams::get_y() const ``` **Returns:** `double` Get the Y coordinate of the lower-left corner of the QR code on the page, in user space units. ### operator= ```cpp QREncodeParams & datalogics_interface::QREncodeParams::operator=(QREncodeParams &&) noexcept ``` **Parameters** - (unnamed) ([`QREncodeParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/QREncodeParams.md)) **Returns:** [`QREncodeParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/QREncodeParams.md) ### set_background_color ```cpp void datalogics_interface::QREncodeParams::set_background_color(const QRColor &color) ``` **Parameters** - `color` ([`const QRColor &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/QRColor.md)): the color of the background behind the QR code modules **Returns:** `void` Set the color of the background behind the QR code modules. ### set_code_color ```cpp void datalogics_interface::QREncodeParams::set_code_color(const QRColor &color) ``` **Parameters** - `color` ([`const QRColor &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/QRColor.md)): the color of the QR code modules (the dark elements) **Returns:** `void` Set the color of the QR code modules (the dark elements). ### set_error_correction_level ```cpp void datalogics_interface::QREncodeParams::set_error_correction_level(QRErrorCorrectionLevel level) ``` **Parameters** - `level` ([`QRErrorCorrectionLevel`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/QRErrorCorrectionLevel.md)): the error correction level of the QR code **Returns:** `void` Set the error correction level of the QR code. ### set_height ```cpp void datalogics_interface::QREncodeParams::set_height(double height) ``` **Parameters** - `height` (`double`): the height of the QR code, in user space units **Returns:** `void` Set the height of the QR code, in user space units. ### set_quiet_zone_size ```cpp void datalogics_interface::QREncodeParams::set_quiet_zone_size(unsigned int size) ``` **Parameters** - `size` (`unsigned int`): the quiet zone size (margin around the QR code), in modules **Returns:** `void` Set the quiet zone size (margin around the QR code), in modules. ### set_text ```cpp void datalogics_interface::QREncodeParams::set_text(const std::string &text) ``` **Parameters** - `text` (`const std::string &`): the text string to be encoded in the QR code **Returns:** `void` Set the text string to be encoded in the QR code. ### set_width ```cpp void datalogics_interface::QREncodeParams::set_width(double width) ``` **Parameters** - `width` (`double`): the width of the QR code, in user space units **Returns:** `void` Set the width of the QR code, in user space units. ### set_x ```cpp void datalogics_interface::QREncodeParams::set_x(double x) ``` **Parameters** - `x` (`double`): the X coordinate of the lower-left corner of the QR code on the page, in user space units **Returns:** `void` Set the X coordinate of the lower-left corner of the QR code on the page, in user space units. ### set_y ```cpp void datalogics_interface::QREncodeParams::set_y(double y) ``` **Parameters** - `y` (`double`): the Y coordinate of the lower-left corner of the QR code on the page, in user space units **Returns:** `void` Set the Y coordinate of the lower-left corner of the QR code on the page, in user space units. --- # QRErrorCorrectionLevel Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/QRErrorCorrectionLevel **Namespace:** `datalogics_interface` ## Description The Error Correction Level of the QR Code. ## Values - `Low = 0`: Can tolerate 7% of bad codewords. - `Medium = 1`: Can tolerate 15% of bad codewords. - `Quartile = 2`: Can tolerate 25% of bad codewords. - `High = 3`: Can tolerate 30% of bad codewords. --- # Quad Struct Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad ```cpp struct Quad ``` **Namespace:** `datalogics_interface` ## Description Represents a quadrilateral in a program. A quadrilateral is a polygon graphic that has four sides or edges and four corners, Bottom Left, Bottom Right, Top Left, and Top Right. **Referenced by:** [`DocTextFinderQuadInfo`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DocTextFinderQuadInfo.md), [`HighlightAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/HighlightAnnotation.md), [`Quad`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md), [`Redaction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Redaction.md), [`TextMarkupAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextMarkupAnnotation.md), [`UnderlineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/UnderlineAnnotation.md), [`Word`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Word.md) **Uses types:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md), [`Quad`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### Quad ```cpp datalogics_interface::Quad::Quad()=default ``` *constructor* ### Quad ```cpp datalogics_interface::Quad::Quad(const Point &top_left, const Point &top_right, const Point &bottom_left, const Point &bottom_right) ``` *constructor* **Parameters** - `top_left` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)) - `top_right` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)) - `bottom_left` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)) - `bottom_right` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)) ## Fields ### bottom_left ```cpp Point datalogics_interface::Quad::bottom_left ``` ### bottom_right ```cpp Point datalogics_interface::Quad::bottom_right ``` ### top_left ```cpp Point datalogics_interface::Quad::top_left ``` ### top_right ```cpp Point datalogics_interface::Quad::top_right ``` ## Methods ### operator!= ```cpp bool datalogics_interface::Quad::operator!=(const Quad &rhs) const ``` **Parameters** - `rhs` ([`const Quad &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md)) **Returns:** `bool` ### operator== ```cpp bool datalogics_interface::Quad::operator==(const Quad &rhs) const ``` **Parameters** - `rhs` ([`const Quad &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md)) **Returns:** `bool` ### to_rect ```cpp Rect datalogics_interface::Quad::to_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ### to_string ```cpp std::string datalogics_interface::Quad::to_string() const ``` **Returns:** `std::string` ### transform ```cpp Quad datalogics_interface::Quad::transform(const Matrix &m) const ``` **Parameters** - `m` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)) **Returns:** [`Quad`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md) --- # Rect Struct Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect ```cpp struct Rect ``` **Namespace:** `datalogics_interface` ## Description A rect holds four coordinates for a rectangle. The coordinates for a rectangle include left, top, right, bottom. Width () and height () defines the rectangle's width and height. LLx and LLy defines lower left corner, and URx and URy defines the upper right corner. **Referenced by:** [`Annotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md), [`AxialShadingPattern`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/AxialShadingPattern.md), [`CircleAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CircleAnnotation.md), [`Container`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md), [`Content`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Content.md), [`DrawParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/DrawParams.md), [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md), [`Font`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`FreeTextAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FreeTextAnnotation.md), [`Group`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Group.md), [`HighlightAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/HighlightAnnotation.md), [`Image`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Image.md), [`InkAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/InkAnnotation.md), [`LineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LineAnnotation.md), [`LinkAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LinkAnnotation.md), [`Page`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md), [`Path`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Path.md), [`PolyLineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PolyLineAnnotation.md), [`PolygonAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PolygonAnnotation.md), [`Quad`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md), [`Redaction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Redaction.md), [`RemoteDestination`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination.md), [`ShadingPattern`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ShadingPattern.md), [`SignDoc`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SignDoc.md), [`SquareAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SquareAnnotation.md), [`Text`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Text.md), [`TextMarkupAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextMarkupAnnotation.md), [`TextRun`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextRun.md), [`UnderlineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/UnderlineAnnotation.md), [`ViewDestination`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md) **Uses types:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### Rect ```cpp datalogics_interface::Rect::Rect()=default ``` *constructor* ### Rect ```cpp datalogics_interface::Rect::Rect(double ll_x, double ll_y, double ur_x, double ur_y) ``` *constructor* **Parameters** - `ll_x` (`double`) - `ll_y` (`double`) - `ur_x` (`double`) - `ur_y` (`double`) ## Fields ### ll_x ```cpp double datalogics_interface::Rect::ll_x ``` ### ll_y ```cpp double datalogics_interface::Rect::ll_y ``` ### ur_x ```cpp double datalogics_interface::Rect::ur_x ``` ### ur_y ```cpp double datalogics_interface::Rect::ur_y ``` ## Methods ### bottom ```cpp double datalogics_interface::Rect::bottom() const ``` **Returns:** `double` ### height ```cpp double datalogics_interface::Rect::height() const ``` **Returns:** `double` ### in_rect ```cpp bool datalogics_interface::Rect::in_rect(const Rect &other) const ``` **Parameters** - `other` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)) **Returns:** `bool` ### intersect ```cpp Rect datalogics_interface::Rect::intersect(const Rect &other) const ``` **Parameters** - `other` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)) **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ### is_empty ```cpp bool datalogics_interface::Rect::is_empty() const ``` **Returns:** `bool` ### left ```cpp double datalogics_interface::Rect::left() const ``` **Returns:** `double` ### operator!= ```cpp bool datalogics_interface::Rect::operator!=(const Rect &rhs) const ``` **Parameters** - `rhs` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)) **Returns:** `bool` ### operator== ```cpp bool datalogics_interface::Rect::operator==(const Rect &rhs) const ``` **Parameters** - `rhs` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)) **Returns:** `bool` ### overlaps ```cpp bool datalogics_interface::Rect::overlaps(const Rect &other) const ``` **Parameters** - `other` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)) **Returns:** `bool` ### right ```cpp double datalogics_interface::Rect::right() const ``` **Returns:** `double` ### set_bottom ```cpp void datalogics_interface::Rect::set_bottom(double val) ``` **Parameters** - `val` (`double`) **Returns:** `void` ### set_left ```cpp void datalogics_interface::Rect::set_left(double val) ``` **Parameters** - `val` (`double`) **Returns:** `void` ### set_right ```cpp void datalogics_interface::Rect::set_right(double val) ``` **Parameters** - `val` (`double`) **Returns:** `void` ### set_top ```cpp void datalogics_interface::Rect::set_top(double val) ``` **Parameters** - `val` (`double`) **Returns:** `void` ### to_string ```cpp std::string datalogics_interface::Rect::to_string() const ``` **Returns:** `std::string` ### top ```cpp double datalogics_interface::Rect::top() const ``` **Returns:** `double` ### transform ```cpp Rect datalogics_interface::Rect::transform(const Matrix &m) const ``` **Parameters** - `m` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)) **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ### width ```cpp double datalogics_interface::Rect::width() const ``` **Returns:** `double` --- # RectSegment Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RectSegment ```cpp class RectSegment : Segment ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Segment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Segment.md) ## Description A rectangle path operator. RectSegment represents a single path, or line, within a rectangle, with coordinates xy, xy for the beginning and end of the line. **Uses types:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) ## Constructors ### RectSegment ```cpp datalogics_interface::RectSegment::RectSegment(const Point &pt, double width, double height) ``` *constructor* **Parameters** - `pt` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): the lower left corner of the rectangle. - `width` (`double`): the width of the rectangle. - `height` (`double`): the height of the rectangle. Append a rectangle to the current path as a complete subpath, with lower-left corner point and dimensions width and height in user space. ### RectSegment ```cpp datalogics_interface::RectSegment::RectSegment(double x, double y, double width, double height) ``` *constructor* **Parameters** - `x` (`double`): the lower left corner of the rectangle. - `y` (`double`): the width of the rectangle. - `width` (`double`): the height of the rectangle. - `height` (`double`) Append a rectangle to the current path as a complete subpath, with lower-left corner point and dimensions width and height in user space. ### ~RectSegment ```cpp datalogics_interface::RectSegment::~RectSegment() override ``` *destructor* ## Methods ### height ```cpp double datalogics_interface::RectSegment::height() const ``` **Returns:** `double` The height of the rectangle. ### point ```cpp Point datalogics_interface::RectSegment::point() const ``` **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) The lower-left corner of the rectangle. ### to_string ```cpp std::string datalogics_interface::RectSegment::to_string() const override ``` **Returns:** `std::string` Represents a segment, or a single line, within a path. ### width ```cpp double datalogics_interface::RectSegment::width() const ``` **Returns:** `double` The width of the rectangle. --- # Redaction Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Redaction ```cpp class Redaction : Annotation ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Annotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md) ## Description Associates an object with its location on a page of a PDF document. A redaction occludes some part of a document. **Uses types:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`HorizontalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HorizontalAlignment.md), [`Quad`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### Redaction ```cpp datalogics_interface::Redaction::Redaction(Page &page, const std::vector< Quad > ®ions) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page where the redaction is placed. - `regions` ([`const std::vector< Quad > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md)): Quadrilateral regions specifying the redaction bounds. Create a new Redaction annotation with default properties. ## Methods ### clear_interior_color ```cpp void datalogics_interface::Annotation::clear_interior_color() ``` **Returns:** `void` Clear the interior color. ### generate_appearance ```cpp virtual std::unique_ptr< Form > datalogics_interface::Annotation::generate_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the visual appearance, or null if the appearance could not be generated. Generate a new appearance stream with the current annotation properties. The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance. ### get_align ```cpp HorizontalAlignment datalogics_interface::Redaction::get_align() const ``` **Returns:** [`HorizontalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HorizontalAlignment.md) Horiziontal Alignment Get the horizontal alignment for the redaction text. ### get_annotation_feature_level ```cpp virtual double datalogics_interface::Annotation::get_annotation_feature_level() const ``` **Returns:** `double` The minimum PDF version level (e.g. 1.3, 1.4, or 1.5). The minimum PDF version necessary to support the features used in this annotation. ### get_border_color ```cpp Color datalogics_interface::Redaction::get_border_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) Color used for the "normal" border. Get the color used as the "normal" border. ### get_color ```cpp Color datalogics_interface::Annotation::get_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The annotation's color. The color of the annotation. ### get_contents ```cpp std::string datalogics_interface::Annotation::get_contents() const ``` **Returns:** `std::string` The annotation's text contents. The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### get_draw_border ```cpp bool datalogics_interface::Redaction::get_draw_border() const ``` **Returns:** `bool` boolean value of Draw Border Option If true, border will be drawn in Normal appearance in specified color, If false, no border will be drawn in Normal Appearance. Get Draw Border option This option will be true by default in the Brief Initializer, and the border drawn will be in the specified color. It will also be true by default in the Extended initializer, and will draw the border in the specified border color ### get_fill_color ```cpp Color datalogics_interface::Redaction::get_fill_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) Color used to fill the "normal" appearance area. Get the color used to fill the "normal" appearance area. ### get_fill_normal ```cpp bool datalogics_interface::Redaction::get_fill_normal() const ``` **Returns:** `bool` boolean value of Fill Normal Appearance Option If true, the Normal Appearance will show as filled with the fill color and opacity, If false, Normal Appearance areas will not be filled. Get Fill Normal Appearance option This option will be false by default in the Brief Initializer. It will be true by default in the Extended initializer, and will fill the area in the specified fill color and opacity. ### get_fill_opacity ```cpp double datalogics_interface::Redaction::get_fill_opacity() const ``` **Returns:** `double` Opacity applied to the fill color in "normal" appearance. Get the opacity applied to the fill color in "normal" appearance. ### get_fill_redacted ```cpp bool datalogics_interface::Redaction::get_fill_redacted() const ``` **Returns:** `bool` boolean value of Fill redacted Appearance Option If true, the Redacted Appearance will show as filled with the specfied color. If false, Redacted Appearance areas will not be filled (They will be left white). Get Fill Redacted Appearance option This option will be true by default in the Brief Initializer, and will fill with the color specified It will be true by default in the Extended initializer, and will draw the border in the specified color. ### get_flags ```cpp AnnotationFlags datalogics_interface::Annotation::get_flags() const ``` **Returns:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md) The annotation's flags. The flags for the annotation. ### get_font_face ```cpp std::string datalogics_interface::Redaction::get_font_face() const ``` **Returns:** `std::string` current Font face Get Font face for the text ### get_font_size ```cpp double datalogics_interface::Redaction::get_font_size() const ``` **Returns:** `double` current font size Get font size for the text; ### get_interior_color ```cpp std::unique_ptr< Color > datalogics_interface::Annotation::get_interior_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The interior fill color, or null if no interior color is set. The interior color with which to fill the annotation's rectangle or circle. The color of the border itself can be retrieved from Annotation.Color. ### get_internal_color ```cpp Color datalogics_interface::Redaction::get_internal_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) Color used for the replacement. Get the color used as the replacement background. ### get_normal_appearance ```cpp std::unique_ptr< Form > datalogics_interface::Annotation::get_normal_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the annotation's normal appearance, or null if no normal appearance has been set. The normal appearance of the annotation, represented as a Form XObject. ### get_note ```cpp std::string datalogics_interface::Redaction::get_note() const ``` **Returns:** `std::string` Note text Get the text string to be used as the Popup contents ### get_opacity ```cpp double datalogics_interface::Annotation::get_opacity() const ``` **Returns:** `double` The opacity value for this annotation. The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### get_overlay_text ```cpp std::string datalogics_interface::Redaction::get_overlay_text() const ``` **Returns:** `std::string` the overlay text of the redaction Get the optional overlay text of the redaction. ### get_page_no ```cpp int datalogics_interface::Redaction::get_page_no() const ``` **Returns:** `int` base zero page number Get the page number where the redaction occurs. ### get_quads ```cpp std::vector< Quad > datalogics_interface::Redaction::get_quads() const ``` **Returns:** [`std::vector< Quad >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md) A vector of CQuad objects for the redaction. A list of quads to mark. Each quad encompasses a word or group of contiguous words in the text underlying the annotation. ### get_rect ```cpp Rect datalogics_interface::Annotation::get_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The annotation's bounding rectangle in user space coordinates. The size and location of the annotation on its page. ### get_repeat ```cpp bool datalogics_interface::Redaction::get_repeat() const ``` **Returns:** `bool` repeat value Get the repeat value ### get_scale_to_fit ```cpp bool datalogics_interface::Redaction::get_scale_to_fit() const ``` **Returns:** `bool` Scale To Fit value Get the ScaleToFit value ### get_subtype ```cpp std::string datalogics_interface::Annotation::get_subtype() const ``` **Returns:** `std::string` The subtype string (e.g. "Circle", "Square", "Line"). The annotation's subtype. ### get_text_color ```cpp Color datalogics_interface::Redaction::get_text_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) Color used for the overlay text. Get the color used for the overlay text. ### get_title ```cpp std::string datalogics_interface::Annotation::get_title() const ``` **Returns:** `std::string` The title string. The title of the annotation. ### has_rich_text_data ```cpp bool datalogics_interface::Annotation::has_rich_text_data() const ``` **Returns:** `bool` true if the annotation contains Rich Text String content. Checks the annotation for Rich Text String content (PDFReference 1.7 Section 8.6.2). Annotations that contain Rich Text String content and do not have a normal appearance set will not be visible when rendering the page. ### operator== ```cpp bool datalogics_interface::Annotation::operator==(const Annotation &other) const ``` **Parameters** - `other` ([`const Annotation &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)): The annotation to compare with this annotation. **Returns:** `bool` true if the two annotations are equal. Test annotations for equality (if they are the same annotation). ### set_align ```cpp void datalogics_interface::Redaction::set_align(HorizontalAlignment align) ``` **Parameters** - `align` ([`HorizontalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HorizontalAlignment.md)): desired Horiziontal alignment **Returns:** `void` Sets the horizontal alignment for the redaction text. ### set_annotation_feature_level ```cpp virtual void datalogics_interface::Annotation::set_annotation_feature_level(double level) ``` **Parameters** - `level` (`double`): The target PDF version level. Features requiring a higher version will be removed. **Returns:** `void` Removes features not supported in the supplied version number. ### set_border_color ```cpp void datalogics_interface::Redaction::set_border_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The color of the border when the annotation is displayed in the page prior to application of redactions. **Returns:** `void` Set the color used as the "normal" border. ### set_color ```cpp void datalogics_interface::Annotation::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new color to set. **Returns:** `void` The color of the annotation. ### set_contents ```cpp void datalogics_interface::Annotation::set_contents(const std::string &contents) ``` **Parameters** - `contents` (`const std::string &`): The new text contents. **Returns:** `void` The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### set_draw_border ```cpp void datalogics_interface::Redaction::set_draw_border(bool value) ``` **Parameters** - `value` (`bool`): boolean value to set Draw Border Option If true, border will be drawn in Normal appearance in specified color, If false, no border will be drawn in Normal Appearance. **Returns:** `void` Set Draw Border option ### set_fill_color ```cpp void datalogics_interface::Redaction::set_fill_color(const Color &color, double opacity) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The color which will fill the annotation when it is viewed in the "normal" or pre-redacted appearance. - `opacity` (`double`): The amount of opacity to apply to the fill color. If this value is zero, not color will be seen. If it is 1.0, then the underlying content of the unredacted document will not be visible. **Returns:** `void` Set the color used to fill the "normal" appearance. ### set_fill_normal ```cpp void datalogics_interface::Redaction::set_fill_normal(bool value) ``` **Parameters** - `value` (`bool`): boolean value to set Draw Border Option If true, the Normal Appearance will show as filled with the fill color and opacity, If false, Normal Appearance areas will not be filled. **Returns:** `void` Set Fill Normal Appearance option ### set_fill_redacted ```cpp void datalogics_interface::Redaction::set_fill_redacted(bool value) ``` **Parameters** - `value` (`bool`): boolean value to set Draw Border Option If true, the Redacted Appearance will show as filled with the specfied, If false, Redacted Appearance areas will not be filled (They will be left white). **Returns:** `void` Set Fill Redacted Appearance option ### set_flags ```cpp void datalogics_interface::Annotation::set_flags(AnnotationFlags flags) ``` **Parameters** - `flags` ([`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md)): The new annotation flags to set. **Returns:** `void` The flags for the annotation. ### set_font_face ```cpp void datalogics_interface::Redaction::set_font_face(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): UTF-8 name of font to use for type. if omitted, "Helvetica" will be used. **Returns:** `void` Set Font face for the text ### set_font_size ```cpp void datalogics_interface::Redaction::set_font_size(double size) ``` **Parameters** - `size` (`double`): Size to draw overlay type at. if set to zero, 10.0 point type will be drawn. **Returns:** `void` Set font size for text ### set_interior_color ```cpp void datalogics_interface::Annotation::set_interior_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new interior fill color. Pass null to remove the interior color. **Returns:** `void` The interior color with which to fill the annotation's rectangle or circle. Only RGB colors are allowed. The color of the border itself can be retrieved from Annotation.Color. ### set_internal_color ```cpp void datalogics_interface::Redaction::set_internal_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The color of the redaction mark. This color is also used as the fill color when generating the replacement form for this redaction mark. The replacement form is the content that will be placed on the page when this mark is applied and the underlying content is removed. **Returns:** `void` Set the color used as the replacement background. ### set_normal_appearance ```cpp void datalogics_interface::Annotation::set_normal_appearance(Form &form) ``` **Parameters** - `form` ([`Form &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)): The Form to use as the annotation's normal appearance. **Returns:** `void` The normal appearance of the annotation, represented as a Form XObject. ### set_note ```cpp void datalogics_interface::Redaction::set_note(const std::string &text) ``` **Parameters** - `text` (`const std::string &`): Contents to use on the popup comments box. **Returns:** `void` Set the text string to be used as the Popup Contents ### set_opacity ```cpp void datalogics_interface::Annotation::set_opacity(double opacity) ``` **Parameters** - `opacity` (`double`): The new opacity value to set. **Returns:** `void` The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### set_overlay_text ```cpp void datalogics_interface::Redaction::set_overlay_text(const std::string &text) ``` **Parameters** - `text` (`const std::string &`): UTF-8 text to be written over redaction. **Returns:** `void` Set the optional overlay text of the redaction. ### set_page_no ```cpp void datalogics_interface::Redaction::set_page_no(int page_no) ``` **Parameters** - `page_no` (`int`): Base zero page number **Returns:** `void` Sets the page number where the redaction occurs. ### set_quads ```cpp void datalogics_interface::Redaction::set_quads(const std::vector< Quad > &quads) ``` **Parameters** - `quads` ([`const std::vector< Quad > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md)): std::vector of Quads **Returns:** `void` A list of quads to mark. Each quad encompasses a word or group of contiguous words in the text underlying the annotation. ### set_rect ```cpp void datalogics_interface::Annotation::set_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The new bounding rectangle in user space coordinates. **Returns:** `void` The size and location of the annotation on its page. ### set_repeat ```cpp void datalogics_interface::Redaction::set_repeat(bool value) ``` **Parameters** - `value` (`bool`): True will repeat fill string, false will display string only once. **Returns:** `void` Set the repeat value ### set_scale_to_fit ```cpp void datalogics_interface::Redaction::set_scale_to_fit(bool value) ``` **Parameters** - `value` (`bool`): True will scale text down to fit into area, false will not. **Returns:** `void` Set the ScaleToFit value ### set_text_color ```cpp void datalogics_interface::Redaction::set_text_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The color of the text when the annotation is displayed as redacted, or when the redactions are applied. **Returns:** `void` Set the color used for the overlay text. ### set_title ```cpp void datalogics_interface::Annotation::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): The new title string. **Returns:** `void` The title of the annotation. ### to_string ```cpp std::string datalogics_interface::Annotation::to_string() const ``` **Returns:** `std::string` A string describing this annotation, including its type and rectangle. Returns a string representation of this annotation. ### try_as ```cpp T * datalogics_interface::Annotation::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this annotation to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Annotation::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # RemoteDestination Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination ```cpp class RemoteDestination ``` **Namespace:** `datalogics_interface` ## Description A view of a page contained in a separate document. A RemoteDestination is not the same as a ViewDestination; the two objects are not interchangeable. **Referenced by:** [`RemoteGoToAction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteGoToAction.md) **Uses types:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### RemoteDestination ```cpp datalogics_interface::RemoteDestination::RemoteDestination(Document &doc, int page_number, const std::string &fit_type, const Rect &rect, double zoom) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): Document that the RemoteDestination will be created in. - `page_number` (`int`): Page number of the page in the remote document to display. - `fit_type` (`const std::string &`): Fit Type must be: "XYZ", "Fit", "FitH", "FitV", "FitR", "FitB", "FitBH", or "FitBV". - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): Target Rectangle - `zoom` (`double`): Zoom level Construct a RemoteDestination. ### RemoteDestination ```cpp datalogics_interface::RemoteDestination::RemoteDestination(RemoteDestination &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`RemoteDestination &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination.md)) ### ~RemoteDestination ```cpp datalogics_interface::RemoteDestination::~RemoteDestination() ``` *destructor* ## Fields ### null_value ```cpp static double datalogics_interface::RemoteDestination::null_value ``` *static* Constant used for "null" values in destination rectangles or zoom. ## Methods ### get_dest_rect ```cpp Rect datalogics_interface::RemoteDestination::get_dest_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The rectangle defining the area of the page to display. Fields not applicable to the current fit type will contain NullValue. The destination rectangle. ### get_fit_type ```cpp std::string datalogics_interface::RemoteDestination::get_fit_type() const ``` **Returns:** `std::string` The fit type string (e.g., "XYZ", "Fit", "FitH", "FitV", "FitR", "FitB", "FitBH", or "FitBV"). The fit type for the destination. ### get_page_number ```cpp int datalogics_interface::RemoteDestination::get_page_number() const ``` **Returns:** `int` The zero-based page number for this destination in the remote document. The page number of the destination. ### get_pdf_object ```cpp std::unique_ptr< PDFObject > datalogics_interface::RemoteDestination::get_pdf_object() ``` **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The underlying PDFObject for this RemoteDestination. Retrieve the PDFObject representation of this Remote Destination. ### get_zoom ```cpp double datalogics_interface::RemoteDestination::get_zoom() const ``` **Returns:** `double` The zoom level for the destination, or NullValue if not specified. The zoom factor for the destination. ### operator= ```cpp RemoteDestination & datalogics_interface::RemoteDestination::operator=(RemoteDestination &&) noexcept ``` **Parameters** - (unnamed) ([`RemoteDestination &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination.md)) **Returns:** [`RemoteDestination &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination.md) ### operator== ```cpp bool datalogics_interface::RemoteDestination::operator==(const RemoteDestination &other) const ``` **Parameters** - `other` ([`const RemoteDestination &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination.md)): The RemoteDestination to compare against. **Returns:** `bool` true if the two RemoteDestination objects refer to the same underlying PDF object, false otherwise. Tests whether two RemoteDestination objects are equal. ### set_dest_rect ```cpp void datalogics_interface::RemoteDestination::set_dest_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): the rectangle for the destination **Returns:** `void` Set the rectangle for the destination. ### set_fit_type ```cpp void datalogics_interface::RemoteDestination::set_fit_type(const std::string &fit_type) ``` **Parameters** - `fit_type` (`const std::string &`): the fit type for the destination **Returns:** `void` Set the fit type for the destination. ### set_page_number ```cpp void datalogics_interface::RemoteDestination::set_page_number(int page_number) ``` **Parameters** - `page_number` (`int`): the page number of the destination (page numbers start at 0) **Returns:** `void` Set the page number of the destination (page numbers start at 0) ### set_zoom ```cpp void datalogics_interface::RemoteDestination::set_zoom(double zoom) ``` **Parameters** - `zoom` (`double`): the zoom factor for the destination **Returns:** `void` Set the zoom factor for the destination. ### to_string ```cpp std::string datalogics_interface::RemoteDestination::to_string() const ``` **Returns:** `std::string` A string describing the page number, fit type, destination rectangle, and zoom factor. Returns a string representation of this RemoteDestination. --- # RemoteGoToAction Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteGoToAction ```cpp class RemoteGoToAction : Action ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Action`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md) ## Description A remote go-to action is an action that includes a RemoteDestination object. The action associated with this object, when selected, opens a separate PDF file, or opens a web page in a browser window. **Uses types:** [`FileSpecification`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md), [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`RemoteDestination`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination.md) ## Constructors ### RemoteGoToAction ```cpp datalogics_interface::RemoteGoToAction::RemoteGoToAction(FileSpecification &file_spec, RemoteDestination &remote_dest) ``` *constructor* **Parameters** - `file_spec` ([`FileSpecification &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md)): A FileSpecification containing the path to the remote document. - `remote_dest` ([`RemoteDestination &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination.md)): A RemoteDestination representing the destination to jump in the remote document. General constructor. The action's target will be the path referenced in the FileSpecification parameter. If the path is absolute, the target path will also be absolute. If the path is relative, the target path will also be relative. Generally, the FileSpecification and RemoteDestination should be associated with the same Document, and this Document should be the same Document that contains the RemoteGoToAction. (All three objects, FileSpecification, RemoteDestination, and RemoteGoToAction, are associated with a Document at creation time, and the association cannot be changed.) The RemoteGoToAction will be associated with the same Document that the RemoteDestination parameter is associated with. When creating the RemoteGoToAction, the FileSpecification and RemoteDestination given to the constructor must be associated with the same Document, or an exception will be thrown. ### RemoteGoToAction ```cpp datalogics_interface::RemoteGoToAction::RemoteGoToAction(RemoteGoToAction &&) noexcept=default ``` *constructor* **Parameters** - (unnamed) ([`RemoteGoToAction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteGoToAction.md)) ### ~RemoteGoToAction ```cpp datalogics_interface::RemoteGoToAction::~RemoteGoToAction() override ``` *destructor* ## Methods ### clear_file_specification ```cpp void datalogics_interface::RemoteGoToAction::clear_file_specification() ``` **Returns:** `void` Removes the file specification from this action. ### clear_remote_destination ```cpp void datalogics_interface::RemoteGoToAction::clear_remote_destination() ``` **Returns:** `void` Removes the remote destination from this action. ### get_file_specification ```cpp std::unique_ptr< FileSpecification > datalogics_interface::RemoteGoToAction::get_file_specification() const ``` **Returns:** [`std::unique_ptr< FileSpecification >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md) The FileSpecification associated with the RemoteGoToAction. The FileSpecification for this action. Generally, the FileSpecification should be associated with the same Document that contains the RemoteGoToAction. (Both FileSpecification and RemoteGoToAction are associated with a Document at creation time.) ### get_new_window ```cpp bool datalogics_interface::RemoteGoToAction::get_new_window() const ``` **Returns:** `bool` True if the destination document is set to open in a new window, false otherwise. A flag specifying whether to open the destination document in a new window. By default, this flag is not present. If the action's FileSpecification is not a PDF, this flag is ignored. ### get_pdf_dict ```cpp PDFDict datalogics_interface::Action::get_pdf_dict() ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The underlying PDF dictionary for this Action. Retrieve the PDFObject representation of this object. ### get_remote_destination ```cpp std::unique_ptr< RemoteDestination > datalogics_interface::RemoteGoToAction::get_remote_destination() const ``` **Returns:** [`std::unique_ptr< RemoteDestination >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination.md) The RemoteDestination associated with the RemoteGoToAction. The RemoteDestination for this action. Generally, the RemoteDestination should be associated with the same Document that contains the RemoteGoToAction. (Both RemoteDestination and RemoteGoToAction are associated with a Document at creation time.) ### get_subtype ```cpp std::string datalogics_interface::Action::get_subtype() const ``` **Returns:** `std::string` The subtype string for this action, such as "GoTo", "URI", "Launch", or "GoToR". The action's subtype. ### operator= ```cpp RemoteGoToAction & datalogics_interface::RemoteGoToAction::operator=(RemoteGoToAction &&) noexcept=default ``` **Parameters** - (unnamed) ([`RemoteGoToAction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteGoToAction.md)) **Returns:** [`RemoteGoToAction &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteGoToAction.md) ### operator== ```cpp bool datalogics_interface::Action::operator==(const Action &other) const ``` **Parameters** - `other` ([`const Action &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md)) **Returns:** `bool` true if the two objects refer to the same action, false otherwise. Determines whether this Action is equal to another. Two Actions are considered equal if they refer to the same underlying PDF action object. ### set_file_specification ```cpp void datalogics_interface::RemoteGoToAction::set_file_specification(const FileSpecification &file_spec) ``` **Parameters** - `file_spec` ([`const FileSpecification &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md)): The FileSpecification to associate with the RemoteGoToAction. **Returns:** `void` The FileSpecification for this action. Generally, the FileSpecification should be associated with the same Document that contains the RemoteGoToAction. (Both FileSpecification and RemoteGoToAction are associated with a Document at creation time.) ### set_new_window ```cpp void datalogics_interface::RemoteGoToAction::set_new_window(bool new_window) ``` **Parameters** - `new_window` (`bool`): The new value for the flag. **Returns:** `void` A flag specifying whether to open the destination document in a new window. By default, this flag is not present. If the action's FileSpecification is not a PDF, this flag is ignored. ### set_remote_destination ```cpp void datalogics_interface::RemoteGoToAction::set_remote_destination(const RemoteDestination &remote_dest) ``` **Parameters** - `remote_dest` ([`const RemoteDestination &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination.md)): The RemoteDestination to associate with the RemoteGoToAction. **Returns:** `void` The RemoteDestination for this action. Generally, the RemoteDestination should be associated with the same Document that contains the RemoteGoToAction. (Both RemoteDestination and RemoteGoToAction are associated with a Document at creation time.) ### to_string ```cpp std::string datalogics_interface::Action::to_string() const ``` **Returns:** `std::string` A string describing this Action. Returns a string representation of this Action. The string includes the action's subtype. ### try_as ```cpp T * datalogics_interface::Action::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this action to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Action::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # RenderIntent Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent **Namespace:** `datalogics_interface` ## Description Constants that specify a standard ICC rendering intent for a device color profile. The rendering intent specifies the color translation method for colors that are outside the gamut of the color profile. ## Values - `Perceptual = 0`: Preserves visual relationships between colors as perceived by the human eye, even if individual values shift. Suitable for photographic, continuous-tone images. - `RelColorimetric = 1`: Like absolute colorimetric but compares source and destination white points and shifts other colors accordingly. - `Saturation = 2`: Favors vivid color over accurate color; preserves saturation rather than hue when scaling gamuts. Suitable for charts and business graphics. - `AbsColorimetric = 3`: Maintains color accuracy at the expense of inter-color relationships. Colors inside the destination gamut are unchanged. - `UseProfileIntent = 4`: Use the source profile's rendering intent. - `UseGStateIntent = 5`: Use the source intent for the destination intent. --- # RolledBackDocument Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RolledBackDocument ```cpp class RolledBackDocument ``` **Namespace:** `datalogics_interface` ## Description A class representing a Rolled back instance of a PDF document that was previously saved Incrementally. ## Constructors ### RolledBackDocument ```cpp datalogics_interface::RolledBackDocument::RolledBackDocument(RolledBackDocument &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`RolledBackDocument &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RolledBackDocument.md)) ### ~RolledBackDocument ```cpp datalogics_interface::RolledBackDocument::~RolledBackDocument() ``` *destructor* ## Methods ### close_document ```cpp void datalogics_interface::RolledBackDocument::close_document() ``` **Returns:** `void` Closes the rolled-back document and releases its associated file resources. This closes both the underlying file and the PDF document handle. After calling this method, the object should no longer be used. ### operator= ```cpp RolledBackDocument & datalogics_interface::RolledBackDocument::operator=(RolledBackDocument &&) noexcept ``` **Parameters** - (unnamed) ([`RolledBackDocument &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RolledBackDocument.md)) **Returns:** [`RolledBackDocument &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RolledBackDocument.md) ### save ```cpp void datalogics_interface::RolledBackDocument::save(const std::string &path) ``` **Parameters** - `path` (`const std::string &`): The file system path where the rolled-back document will be saved. **Returns:** `void` Saves the Rolled back document instance using the specified path to disk. The document is saved in full (non-incremental) mode. --- # SaveFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SaveFlags **Namespace:** `datalogics_interface` ## Description Flags for saving documents. ## Values - `Incremental = 0x00`: Incremental save only write objects that have changed after the end of the document rather than disturbing unchanged items. Use with Copy to create a new file which incorporates a copy of the input file before making changes. This flag can be useful when making changes to signed documents, as it preserves the validity of any existing signatures. - `Full = 0x01`: Save the entire document. - `Copy = 0x02`: Saves a copy of the document. Used with Incremental to create a new file from a binary copy of the input document. - `Linearized = 0x04`: Save in a format that is suitable for remote (network) access, Linearized is sometimes referred to as Web Optimized because of its goal of minimizing the perception of poor performance due to the number of pages in a document. This inherently uses OptimizeFonts, for documents with a large number of fonts, font optimization can have poor performance, see SaveLinearizedNoOptimizeFonts as an alternative. - `CollectGarbage = 0x20`: Collect Garbage by removing unreferenced objects. Only valid with Full. - `KeepModDate = 0x80`: Do not update the Modification Date. - `SaveLinearizedNoOptimizeFonts = 0x200`: Save the document as Linearized the same as Linearized but OptimizeFonts is disabled. For documents with a large number of fonts, font optimization can have poor performance and is often unnecessary. - `Compressed = 0x20000`: Use object compression wherever possible. Only valid with Full. --- # SchemaFieldSubtype Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SchemaFieldSubtype **Namespace:** `datalogics_interface` ## Description The data type of a collection schema field. ## Values - `Text = 0`: Text string value. - `Date = 1`: Date value. - `Number = 2`: Numeric value. - `FieldData = 3`: Raw field data. - `Description = 4`: Descriptive text. - `ModificationDate = 5`: Date the field was last modified. - `CreationDate = 6`: Date the field was created. - `FieldDataSize = 7`: Size of the field data in bytes. --- # Segment Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Segment ```cpp class Segment ``` **Namespace:** `datalogics_interface` **Derived classes:** [`ClosePathSegment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ClosePathSegment.md), [`CurveTo`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CurveTo.md), [`CurveToV`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CurveToV.md), [`CurveToY`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CurveToY.md), [`LineTo`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LineTo.md), [`MoveTo`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/MoveTo.md), [`RectSegment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RectSegment.md) ## Description Represents a segment, or a single line, within a path. ## Constructors ### ~Segment ```cpp virtual datalogics_interface::Segment::~Segment() ``` *destructor* ## Methods ### to_string ```cpp virtual std::string datalogics_interface::Segment::to_string() const =0 ``` **Returns:** `std::string` Represents a segment, or a single line, within a path. --- # SeparationColorSpace Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationColorSpace ```cpp class SeparationColorSpace : ColorSpace ``` **Namespace:** `datalogics_interface` **Inherits from:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) ## Description Defines the use of additional named colorants in a PDF document. Colorants in a separation color space are also sometimes referred to as spot colorants. The device displaying or printing the PDF document will supply an appropriate color based on the colorant included in the separation color space. **Uses types:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md), [`Function`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) ## Constructors ### SeparationColorSpace ```cpp datalogics_interface::SeparationColorSpace::SeparationColorSpace(const std::string &name, const ColorSpace &alternate, const Function &tint_transform) ``` *constructor* **Parameters** - `name` (`const std::string &`): the name of the colorant that the Separation space is intended to represent, or All, or None - `alternate` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): the alternate color space, which can be any device or CIE-based color space but not another special color space (Pattern, Indexed, Separation, or DeviceN). - `tint_transform` ([`const Function &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md)): function, called with the tint value and returning the corresponding color component values. That is, the number of components and the interpretation of their values depend on the alternate color space. Create a separation color space. ### SeparationColorSpace ```cpp datalogics_interface::SeparationColorSpace::SeparationColorSpace(Page &page, const Ink &ink) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): the name of the colorant that the Separation space is intended to represent, or All, or None - `ink` ([`const Ink &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Ink.md)): the alternate color space, which can be any device or CIE- based color space but not another special color space (Pattern, Indexed, Separation, or DeviceN). Create a separation color space. ## Methods ### get_alternate ```cpp std::unique_ptr< ColorSpace > datalogics_interface::SeparationColorSpace::get_alternate() const ``` **Returns:** [`std::unique_ptr< ColorSpace >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) The alternate color space. The alternate color space. The alternate color space can be any device or CIE-based color space but not another special color space (Pattern, Indexed, Separation, or DeviceN). ### get_function ```cpp std::unique_ptr< Function > datalogics_interface::SeparationColorSpace::get_function() const ``` **Returns:** [`std::unique_ptr< Function >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md) A function, called with the tint value and returning the corresponding color component values. That is, the number of components and the interpretation of their values depend on the alternate color space. ### get_name ```cpp std::string datalogics_interface::ColorSpace::get_name() const ``` **Returns:** `std::string` The name of the color space. A named color space may be named something like DeviceRGB. More complicated color spaces may have a name like Indexed or ICCBased. ### get_num_components ```cpp int datalogics_interface::ColorSpace::get_num_components() const ``` **Returns:** `int` The number of color components. The number of components in the color space. For example, DeviceGray has 1 component, DeviceRGB has 3, and DeviceCMYK has 4. ### get_pdf_object ```cpp std::unique_ptr< PDFObject > datalogics_interface::ColorSpace::get_pdf_object() const ``` **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The PDFObject associated with the color space. Get the PDFObject associated with the color space. This may be a PDFName, PDFDict, PDFStream, or PDFArray. ### get_separation_name ```cpp std::string datalogics_interface::SeparationColorSpace::get_separation_name() const ``` **Returns:** `std::string` The separation colorant name as a string. The name of the colorant that the Separation space is intended to represent, or All, or None. ### get_separation_name_array ```cpp std::vector< unsigned char > datalogics_interface::SeparationColorSpace::get_separation_name_array() const ``` **Returns:** `std::vector< unsigned char >` A byte array containing the raw separation name. The name of the colorant as a byte array. The name of the colorant that the Separation space is intended to represent, or All, or None. This property is suitable for retrieving the name when the SeparationName cannot be retrieved as a string (for example, when the name contains non-Unicode characters). ### operator== ```cpp virtual bool datalogics_interface::ColorSpace::operator==(const ColorSpace &other) const ``` **Parameters** - `other` ([`const ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): The ColorSpace to compare against. **Returns:** `bool` true if the two color spaces are equal, false otherwise. Test for equality. This works best for named color spaces. More complex color spaces (such as ICCBased) do not support equality testing and will always return false. ### to_string ```cpp std::string datalogics_interface::ColorSpace::to_string() const ``` **Returns:** `std::string` A string describing this ColorSpace. Convert a ColorSpace to a string representation. --- # SeparationFontOption Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SeparationFontOption **Namespace:** `datalogics_interface` ## Description Options controlling how fonts are emitted in separation output. ## Values - `DontEmbedFonts = 0`: Embed no fonts. - `EmitAllEmbeddedFonts = 1`: Emit all embedded fonts. - `EmitAllFonts = 2`: Emit all fonts. --- # SeparationParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationParams ```cpp class SeparationParams ``` **Namespace:** `datalogics_interface` ## Description Holds parameters for making color separations. Used with PostScript. **Uses types:** [`MirrorOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/MirrorOption.md), [`PageMarkFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageMarkFlags.md), [`SeparationFontOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SeparationFontOption.md), [`SeparationPlate`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationPlate.md) ## Constructors ### SeparationParams ```cpp datalogics_interface::SeparationParams::SeparationParams(const SeparationParams &other) ``` *constructor* **Parameters** - `other` ([`const SeparationParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationParams.md)) Copy constructor. ### SeparationParams ```cpp datalogics_interface::SeparationParams::SeparationParams(SeparationParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`SeparationParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationParams.md)) ### SeparationParams ```cpp datalogics_interface::SeparationParams::SeparationParams(std::vector< SeparationPlate > plates) ``` *constructor* **Parameters** - `plates` ([`std::vector< SeparationPlate >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationPlate.md)): The plates to use for making separations. Set up default parameters for making separations. ### ~SeparationParams ```cpp datalogics_interface::SeparationParams::~SeparationParams() ``` *destructor* ## Methods ### get_apply_ocg_print_overrides ```cpp bool datalogics_interface::SeparationParams::get_apply_ocg_print_overrides() const ``` **Returns:** `bool` If true, apply print-specific visibility state settings from the optional content group. Default is false. ### get_binary_channel_available ```cpp bool datalogics_interface::SeparationParams::get_binary_channel_available() const ``` **Returns:** `bool` True if a binary channel to the printer is supported, false otherwise. Default is false. ### get_convert_to_process_using_opp ```cpp bool datalogics_interface::SeparationParams::get_convert_to_process_using_opp() const ``` **Returns:** `bool` If true, use the overprint preview (OPP) for converting to process, which better simulates what would happen if the spot ink were really used. Default is false. ### get_convert_true_type_to_type42 ```cpp bool datalogics_interface::SeparationParams::get_convert_true_type_to_type42() const ``` **Returns:** `bool` If true, send TrueType fonts as TrueType fonts (level 3 and most level 2 PS printers). If false, convert TrueType to T1 (typically desirable only for Level 1 PS where no TrueType handling is present). Default is false. ### get_destination_profile_string ```cpp std::string datalogics_interface::SeparationParams::get_destination_profile_string() const ``` **Returns:** `std::string` The profile description of a valid CMYK profile, such as the strings seen in the color management preferences in a PDF Viewer (for example, "U.S. Web Coated (SWOP) v2"). Default is "U.S. Web Coated (SWOP) v2". ### get_emit_annotations ```cpp bool datalogics_interface::SeparationParams::get_emit_annotations() const ``` **Returns:** `bool` If true, emit annotations. Default is false. ### get_emit_font_option ```cpp SeparationFontOption datalogics_interface::SeparationParams::get_emit_font_option() const ``` **Returns:** [`SeparationFontOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SeparationFontOption.md) Font output options. Default is EmitAllFonts. ### get_emit_halftones ```cpp bool datalogics_interface::SeparationParams::get_emit_halftones() const ``` **Returns:** `bool` If true, emit halftones. Default is true. ### get_emit_separable_images_only ```cpp bool datalogics_interface::SeparationParams::get_emit_separable_images_only() const ``` **Returns:** `bool` If true, emit separable images only. Default is false. ### get_emit_transfer_functions ```cpp bool datalogics_interface::SeparationParams::get_emit_transfer_functions() const ``` **Returns:** `bool` If true, emit transfer functions. Default is true. ### get_invert_plates ```cpp bool datalogics_interface::SeparationParams::get_invert_plates() const ``` **Returns:** `bool` If true, invert the plates. Default is false. ### get_mirror_print ```cpp MirrorOption datalogics_interface::SeparationParams::get_mirror_print() const ``` **Returns:** [`MirrorOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/MirrorOption.md) Options for mirroring. Mirroring is done in the PostScript output stream. Default is DontFlip. ### get_page_marks_to_emit ```cpp PageMarkFlags datalogics_interface::SeparationParams::get_page_marks_to_emit() const ``` **Returns:** [`PageMarkFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageMarkFlags.md) The page marks to emit for this plate. It is a bit-wise OR of the PageMarkFlags values. Default is None. ### get_plates ```cpp std::vector< SeparationPlate > datalogics_interface::SeparationParams::get_plates() const ``` **Returns:** [`std::vector< SeparationPlate >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationPlate.md) A list of plates to use for separations. ### get_post_script_level ```cpp int datalogics_interface::SeparationParams::get_post_script_level() const ``` **Returns:** `int` The PostScript printing level. 2 means emit as level 2, 3 means level 3. Default is level 2. ### get_printer_has_far_east_fonts ```cpp bool datalogics_interface::SeparationParams::get_printer_has_far_east_fonts() const ``` **Returns:** `bool` If true, do not include Far East fonts. Default is false. ### get_suppress_cjk_substitution ```cpp bool datalogics_interface::SeparationParams::get_suppress_cjk_substitution() const ``` **Returns:** `bool` If true, suppress CJK substitution. Default is false. ### get_transparency_level ```cpp int datalogics_interface::SeparationParams::get_transparency_level() const ``` **Returns:** `int` The transparency flattening quality level. Range is from 0 to 100. Lower values flatten faster. Higher values provide better quality. Default is ### get_use_cmyk_working_color_space ```cpp bool datalogics_interface::SeparationParams::get_use_cmyk_working_color_space() const ``` **Returns:** `bool` If true, color manage DeviceCMYK. If false, pass it directly onto the process plates. Default is false. ### get_use_western_style_page_marks ```cpp bool datalogics_interface::SeparationParams::get_use_western_style_page_marks() const ``` **Returns:** `bool` If true, use the western style for page marks. Default is false. ### operator= ```cpp SeparationParams & datalogics_interface::SeparationParams::operator=(const SeparationParams &other) ``` **Parameters** - `other` ([`const SeparationParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationParams.md)) **Returns:** [`SeparationParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationParams.md) Copy assignment. ### operator= ```cpp SeparationParams & datalogics_interface::SeparationParams::operator=(SeparationParams &&) noexcept ``` **Parameters** - (unnamed) ([`SeparationParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationParams.md)) **Returns:** [`SeparationParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationParams.md) ### set_apply_ocg_print_overrides ```cpp void datalogics_interface::SeparationParams::set_apply_ocg_print_overrides(bool value) ``` **Parameters** - `value` (`bool`): true to apply print-specific visibility state settings from the optional content group. Default is false **Returns:** `void` If true, apply print-specific visibility state settings from the optional content group. Default is false. ### set_binary_channel_available ```cpp void datalogics_interface::SeparationParams::set_binary_channel_available(bool value) ``` **Parameters** - `value` (`bool`): true if a binary channel to the printer is supported, false otherwise. Default is false. **Returns:** `void` True if a binary channel to the printer is supported, false otherwise. Default is false. ### set_convert_to_process_using_opp ```cpp void datalogics_interface::SeparationParams::set_convert_to_process_using_opp(bool value) ``` **Parameters** - `value` (`bool`): true to use the overprint preview (OPP) for converting to process, which better simulates what would happen if t... **Returns:** `void` If true, use the overprint preview (OPP) for converting to process, which better simulates what would happen if the spot ink were really used. Default is false. ### set_convert_true_type_to_type42 ```cpp void datalogics_interface::SeparationParams::set_convert_true_type_to_type42(bool value) ``` **Parameters** - `value` (`bool`): true to send TrueType fonts as TrueType fonts (level 3 and most level 2 PS printers). If false, convert TrueType... **Returns:** `void` If true, send TrueType fonts as TrueType fonts (level 3 and most level 2 PS printers). If false, convert TrueType to T1 (typically desirable only for Level 1 PS where no TrueType handling is present). Default is false. ### set_destination_profile_string ```cpp void datalogics_interface::SeparationParams::set_destination_profile_string(const std::string &profile) ``` **Parameters** - `profile` (`const std::string &`): the profile description of a valid CMYK profile, such as the strings seen in the color management preferences in a PD... **Returns:** `void` The profile description of a valid CMYK profile, such as the strings seen in the color management preferences in a PDF Viewr (for example, "U.S. Web Coated (SWOP) v2"). Default is "U.S. Web Coated (SWOP) v2". ### set_emit_annotations ```cpp void datalogics_interface::SeparationParams::set_emit_annotations(bool value) ``` **Parameters** - `value` (`bool`): true to emit annotations. Default is false **Returns:** `void` If true, emit annotations. Default is false. ### set_emit_font_option ```cpp void datalogics_interface::SeparationParams::set_emit_font_option(SeparationFontOption option) ``` **Parameters** - `option` ([`SeparationFontOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SeparationFontOption.md)): the font output options. Default is EmitAllFonts **Returns:** `void` Font output options. Default is EmitAllFonts. ### set_emit_halftones ```cpp void datalogics_interface::SeparationParams::set_emit_halftones(bool value) ``` **Parameters** - `value` (`bool`): true to emit halftones. Default is true **Returns:** `void` If true, emit halftones. Default is true. ### set_emit_separable_images_only ```cpp void datalogics_interface::SeparationParams::set_emit_separable_images_only(bool value) ``` **Parameters** - `value` (`bool`): true to emit separable images only. Default is false **Returns:** `void` If true, emit separable images only. Default is false. ### set_emit_transfer_functions ```cpp void datalogics_interface::SeparationParams::set_emit_transfer_functions(bool value) ``` **Parameters** - `value` (`bool`): true to emit transfer functions. Default is true **Returns:** `void` If true, emit transfer functions. Default is true. ### set_invert_plates ```cpp void datalogics_interface::SeparationParams::set_invert_plates(bool value) ``` **Parameters** - `value` (`bool`): true to invert the plates. Default is false **Returns:** `void` If true, invert the plates. Default is false. ### set_mirror_print ```cpp void datalogics_interface::SeparationParams::set_mirror_print(MirrorOption option) ``` **Parameters** - `option` ([`MirrorOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/MirrorOption.md)): the options for mirroring. Mirroring is done in the PostScript output stream. Default is DontFlip **Returns:** `void` Options for mirroring. Mirroring is done in the PostScript output stream. Default is DontFlip. ### set_page_marks_to_emit ```cpp void datalogics_interface::SeparationParams::set_page_marks_to_emit(PageMarkFlags marks) ``` **Parameters** - `marks` ([`PageMarkFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageMarkFlags.md)): the page marks to emit for this plate. It is a bit-wise OR of the PageMarkFlags values. Default is None **Returns:** `void` The page marks to emit for this plate. It is a bit-wise OR of the PageMarkFlags values. Default is None. ### set_plates ```cpp void datalogics_interface::SeparationParams::set_plates(std::vector< SeparationPlate > plates) ``` **Parameters** - `plates` ([`std::vector< SeparationPlate >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationPlate.md)): a list of plates to use for separations **Returns:** `void` A list of plates to use for separations. ### set_post_script_level ```cpp void datalogics_interface::SeparationParams::set_post_script_level(int level) ``` **Parameters** - `level` (`int`): the PostScript printing level. 2 means emit as level 2, 3 means level 3. Default is level 2 **Returns:** `void` The PostScript printing level. 2 means emit as level 2, 3 means level 3. Default is level 2. ### set_printer_has_far_east_fonts ```cpp void datalogics_interface::SeparationParams::set_printer_has_far_east_fonts(bool value) ``` **Parameters** - `value` (`bool`): true to exclude Far East fonts, false to include them. Default is false. **Returns:** `void` If true, do not include Far East fonts. Default is false. ### set_suppress_cjk_substitution ```cpp void datalogics_interface::SeparationParams::set_suppress_cjk_substitution(bool value) ``` **Parameters** - `value` (`bool`): true to suppress CJK substitution. Default is false **Returns:** `void` If true, suppress CJK substitution. Default is false. ### set_transparency_level ```cpp void datalogics_interface::SeparationParams::set_transparency_level(int level) ``` **Parameters** - `level` (`int`): the transparency flattening quality level. Range is from 0 to 100. Lower values flatten faster. Higher values provide... **Returns:** `void` The transparency flattening quality level. Range is from 0 to 100. Lower values flatten faster. Higher values provide better quality. Default is 75. ### set_use_cmyk_working_color_space ```cpp void datalogics_interface::SeparationParams::set_use_cmyk_working_color_space(bool value) ``` **Parameters** - `value` (`bool`): true to color manage DeviceCMYK. If false, pass it directly onto the process plates. Default is false **Returns:** `void` If true, color manage DeviceCMYK. If false, pass it directly onto the process plates. Default is false. ### set_use_western_style_page_marks ```cpp void datalogics_interface::SeparationParams::set_use_western_style_page_marks(bool value) ``` **Parameters** - `value` (`bool`): true to use the western style for page marks. Default is false **Returns:** `void` If true, use the western style for page marks. Default is false. --- # SeparationPlate Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationPlate ```cpp class SeparationPlate ``` **Namespace:** `datalogics_interface` ## Description Represents a plate for making print separations. Used with PostScript. **Referenced by:** [`SeparationParams`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationParams.md) **Uses types:** [`InkType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/InkType.md), [`SeparationPreviewOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SeparationPreviewOption.md) ## Constructors ### SeparationPlate ```cpp datalogics_interface::SeparationPlate::SeparationPlate() ``` *constructor* Default constructor (needed for containers). ### SeparationPlate ```cpp datalogics_interface::SeparationPlate::SeparationPlate(const Ink &colorant) ``` *constructor* **Parameters** - `colorant` ([`const Ink &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Ink.md)) Represents a plate for making print separations. Used with PostScript. ### SeparationPlate ```cpp datalogics_interface::SeparationPlate::SeparationPlate(const Ink &colorant, std::ostream &eps_output) ``` *constructor* **Parameters** - `colorant` ([`const Ink &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Ink.md)) - `eps_output` (`std::ostream &`) Create a separation plate for a given ink, writing EPS output to a stream. The stream must remain valid through the MakeSeparations call. ### SeparationPlate ```cpp datalogics_interface::SeparationPlate::SeparationPlate(const SeparationPlate &other) ``` *constructor* **Parameters** - `other` ([`const SeparationPlate &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationPlate.md)) Copy constructor. ### SeparationPlate ```cpp datalogics_interface::SeparationPlate::SeparationPlate(SeparationPlate &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`SeparationPlate &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationPlate.md)) ### ~SeparationPlate ```cpp datalogics_interface::SeparationPlate::~SeparationPlate() ``` *destructor* ## Methods ### get_alias ```cpp std::string datalogics_interface::SeparationPlate::get_alias() const ``` **Returns:** `std::string` The alias name for this colorant. Another name for this colorant. ### get_angle ```cpp double datalogics_interface::SeparationPlate::get_angle() const ``` **Returns:** `double` The halftone screen angle for this ink, in degrees. The angle for this ink. The angle must be greater than or equal to zero. The default is 45.0. ### get_colorant_name ```cpp std::string datalogics_interface::SeparationPlate::get_colorant_name() const ``` **Returns:** `std::string` The colorant name for this separation plate. The name of the colorant from the Separation or DeviceN color space, or the process color name. ### get_density ```cpp double datalogics_interface::SeparationPlate::get_density() const ``` **Returns:** `double` The density value for this ink. The density for this ink. The density must be greater than zero. The default is 1.0. ### get_frequency ```cpp double datalogics_interface::SeparationPlate::get_frequency() const ``` **Returns:** `double` The halftone screen frequency for this ink. The frequency for this ink. The frequency must be greater than zero. The default is 60.0. ### get_ink_type ```cpp InkType datalogics_interface::SeparationPlate::get_ink_type() const ``` **Returns:** [`InkType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/InkType.md) The ink type for this separation plate. The ink type of this ink for trapping. The default is Normal. ### get_preview_option ```cpp SeparationPreviewOption datalogics_interface::SeparationPlate::get_preview_option() const ``` **Returns:** [`SeparationPreviewOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SeparationPreviewOption.md) The preview option for this separation plate. How to handle the colorant for a separation preview. The default is EmitPlate. ### operator= ```cpp SeparationPlate & datalogics_interface::SeparationPlate::operator=(const SeparationPlate &other) ``` **Parameters** - `other` ([`const SeparationPlate &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationPlate.md)) **Returns:** [`SeparationPlate &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationPlate.md) Copy assignment. ### operator= ```cpp SeparationPlate & datalogics_interface::SeparationPlate::operator=(SeparationPlate &&) noexcept ``` **Parameters** - (unnamed) ([`SeparationPlate &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationPlate.md)) **Returns:** [`SeparationPlate &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SeparationPlate.md) ### set_alias ```cpp void datalogics_interface::SeparationPlate::set_alias(const std::string &alias) ``` **Parameters** - `alias` (`const std::string &`): The alias name to assign to this colorant. **Returns:** `void` Another name for this colorant. ### set_angle ```cpp void datalogics_interface::SeparationPlate::set_angle(double angle) ``` **Parameters** - `angle` (`double`): The halftone screen angle to assign to this ink, in degrees. **Returns:** `void` The angle for this ink. The angle must be greater than or equal to zero. The default is 45.0. ### set_colorant_name ```cpp void datalogics_interface::SeparationPlate::set_colorant_name(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): The colorant name to assign to this separation plate. **Returns:** `void` The name of the colorant from the Separation or DeviceN color space, or the process color name. ### set_density ```cpp void datalogics_interface::SeparationPlate::set_density(double density) ``` **Parameters** - `density` (`double`): The density value to assign to this ink. **Returns:** `void` The density for this ink. The density must be greater than zero. The default is 1.0. ### set_frequency ```cpp void datalogics_interface::SeparationPlate::set_frequency(double frequency) ``` **Parameters** - `frequency` (`double`): The halftone screen frequency to assign to this ink. **Returns:** `void` The frequency for this ink. The frequency must be greater than zero. The default is 60.0. ### set_ink_type ```cpp void datalogics_interface::SeparationPlate::set_ink_type(InkType type) ``` **Parameters** - `type` ([`InkType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/InkType.md)): The ink type to assign to this separation plate. **Returns:** `void` The ink type of this ink for trapping. The default is Normal. ### set_preview_option ```cpp void datalogics_interface::SeparationPlate::set_preview_option(SeparationPreviewOption option) ``` **Parameters** - `option` ([`SeparationPreviewOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SeparationPreviewOption.md)): The preview option to assign to this separation plate. **Returns:** `void` How to handle the colorant for a separation preview. The default is EmitPlate. --- # SeparationPreviewOption Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SeparationPreviewOption **Namespace:** `datalogics_interface` ## Description Specifies how a colorant is handled during a separation preview. ## Values - `EmitColorant = 0`: Emit a plate for this colorant in a separation preview. - `DontEmitColorant = 1`: Don't emit a plate for this colorant for a separation preview. - `ConvertToProcess = 2`: Convert this colorant to a process color for a separation preview. --- # ShadingPattern Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ShadingPattern ```cpp class ShadingPattern : Pattern ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Pattern`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Pattern.md) **Derived classes:** [`AxialShadingPattern`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/AxialShadingPattern.md) ## Description A shading pattern consists of a smoothly varying gradient between two colors. **Uses types:** [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Methods ### get_anti_alias ```cpp bool datalogics_interface::ShadingPattern::get_anti_alias() const ``` **Returns:** `bool` true if anti-aliasing is enabled, false otherwise. Gets whether anti-aliasing is enabled for the shading. When enabled, the shading function is filtered to prevent aliasing artifacts. ### get_bounding_box ```cpp Rect datalogics_interface::ShadingPattern::get_bounding_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The bounding box Rect, or NULL if none is set. Gets the bounding box of the shading. The coordinates are interpreted in the target coordinate space. If present, provides an additional, temporary clipping boundary to the shading. ### get_color_space ```cpp std::unique_ptr< ColorSpace > datalogics_interface::ShadingPattern::get_color_space() const ``` **Returns:** [`std::unique_ptr< ColorSpace >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md) The ColorSpace of the shading pattern. Gets the color space of a shading pattern. This space is restricted to be any space except a Pattern space. ### get_pdf_object ```cpp std::unique_ptr< PDFObject > datalogics_interface::Pattern::get_pdf_object() const ``` **Returns:** [`std::unique_ptr< PDFObject >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) The PDFObject representing this pattern in the PDF document. Gets the underlying PDF object for this pattern. ### set_anti_alias ```cpp void datalogics_interface::ShadingPattern::set_anti_alias(bool anti_alias) ``` **Parameters** - `anti_alias` (`bool`): true to enable anti-aliasing, false to disable it. **Returns:** `void` Sets whether anti-aliasing is enabled for the shading. When enabled, the shading function is filtered to prevent aliasing artifacts. ### set_bounding_box ```cpp void datalogics_interface::ShadingPattern::set_bounding_box(const Rect &bbox) ``` **Parameters** - `bbox` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The bounding box Rect to set, or NULL to remove it. **Returns:** `void` Sets the bounding box of the shading. The coordinates are interpreted in the target coordinate space. If present, provides an additional, temporary clipping boundary to the shading. Set to NULL to remove the bounding box. ### set_color_space ```cpp void datalogics_interface::ShadingPattern::set_color_space(ColorSpace &color_space) ``` **Parameters** - `color_space` ([`ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)): The ColorSpace to set for the shading pattern. **Returns:** `void` Sets the color space of a shading pattern. This space is restricted to be any space except a Pattern space. ### to_string ```cpp std::string datalogics_interface::ShadingPattern::to_string() const override ``` **Returns:** `std::string` A string describing the shading pattern. Converts the shading pattern to a string representation. --- # SignatureFieldID Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SignatureFieldID **Namespace:** `datalogics_interface` ## Description Digital signature field options. ## Values - `SearchForFirstUnsignedField = 0`: Search for the first unsigned field. - `FieldCosObject = 1`: Use a CosObject identifier. - `FullyQualifiedFieldName = 2`: Use a fully qualified field name. - `CreateFieldWithQualifiedName = 3`: Create a new field with the specified qualified name. --- # SignatureType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SignatureType **Namespace:** `datalogics_interface` ## Description Enumeration to specify fields to display as part of signature appearance. ## Values - `CMS = 0`: CMS-based digital signature. - `RFC3161 = 1`: RFC3161 trusted timestamp. - `PADES = 2`: PAdES baseline digital signature. --- # SignDoc Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SignDoc ```cpp class SignDoc ``` **Namespace:** `datalogics_interface` ## Description Implementation of the PDF SignDoc function. Use the SignDoc object to digitally sign a document **Uses types:** [`CredentialDataFormat`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CredentialDataFormat.md), [`CredentialStorageFormat`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CredentialStorageFormat.md), [`DigestCategory`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DigestCategory.md), [`DisplayTraits`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DisplayTraits.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md), [`SignatureFieldID`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SignatureFieldID.md), [`SignatureType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SignatureType.md) ## Constructors ### SignDoc ```cpp datalogics_interface::SignDoc::SignDoc() ``` *constructor* Creates an empty SignDoc object and initializes memory for its parameters. ### SignDoc ```cpp datalogics_interface::SignDoc::SignDoc(SignDoc &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`SignDoc &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SignDoc.md)) ### ~SignDoc ```cpp datalogics_interface::SignDoc::~SignDoc() ``` *destructor* ## Methods ### add_digital_signature ```cpp void datalogics_interface::SignDoc::add_digital_signature(Document &document) ``` **Parameters** - `document` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): The Document to be digitally signed. **Returns:** `void` Adds a digital signature using the specified credentials. If the document has not been previously signed, signs and saves the entire document. If the document has been previously signed, signs and saves only the portions of the document that have changed. If the document has been previously signed and the path to which the file is saved is NULL or the same as the path specified by the parameter, doc, signs and copies the document, saving only the portions of the document that have changed. ### add_sig_policy ```cpp int datalogics_interface::SignDoc::add_sig_policy(const std::string &oid) ``` **Parameters** - `oid` (`const std::string &`): - Object Identifier (OID) of the signature policy to add. **Returns:** `int` - The number of signature policies added to the signature. Add a signature policy to the PAdES signature being generated. Signature policies may be applied to PAdES signatures, only. The signature type must be set to PADES prior to adding a policy. ### add_sig_policy_qualifier_uri ```cpp void datalogics_interface::SignDoc::add_sig_policy_qualifier_uri(const std::string &uri) ``` **Parameters** - `uri` (`const std::string &`): - URI pointing to the signature policy document. **Returns:** `void` Qualify an existing signature policy with a Signature Policy URI (SPuri) qualifier. A policy must be added via AddSigPolicy prior to calling this method. A signature policy may be qualified by no more than one policy qualifier. ### add_sig_policy_qualifier_user_notice ```cpp void datalogics_interface::SignDoc::add_sig_policy_qualifier_user_notice(const std::string &display_text, const std::string &org, const std::vector< std::int64_t > ¬ice_nos) ``` **Parameters** - `display_text` (`const std::string &`): - Text to display to the user when the signature is verified. - `org` (`const std::string &`): - Organization that prepared the notice. - `notice_nos` (`const std::vector< std::int64_t > &`): - Group of integers that identify textual statements prepared by the organization. **Returns:** `void` Qualify an existing signature policy with a Signature Policy UserNotice (SPUserNotice) qualifier. A policy must be added via AddSigPolicy prior to calling this method. A signature policy may be qualified by no more than one policy qualifier. The displayText and org attributes can be defined independent of each other. However, a valid org attribute must be defined in order to qualify a PAdES signature policy with the noticeNos attribute. ### get_credential_data_format ```cpp CredentialDataFormat datalogics_interface::SignDoc::get_credential_data_format() const ``` **Returns:** [`CredentialDataFormat`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CredentialDataFormat.md) - Format of user-credentials used to sign the document. Get the value of the credential data format option. ### get_digest_category ```cpp DigestCategory datalogics_interface::SignDoc::get_digest_category() const ``` **Returns:** [`DigestCategory`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DigestCategory.md) - Member of the enumeration DigestCategory, which option to set. Get the value of the digest category. ### get_field_id ```cpp SignatureFieldID datalogics_interface::SignDoc::get_field_id() const ``` **Returns:** [`SignatureFieldID`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SignatureFieldID.md) - SignatureFieldID choice currently set Get the field identifier used to determine the form field that will contain the digital signature. ### get_field_name ```cpp std::string datalogics_interface::SignDoc::get_field_name() const ``` **Returns:** `std::string` - Fully qualified field name. May return NULL based on the SignatureFieldID attribute defined by the user. Get the form field fully qualified name of the form field that contains the digital signature. ### get_output_path ```cpp std::string datalogics_interface::SignDoc::get_output_path() const ``` **Returns:** `std::string` Get Output Path The path to which the file is saved. A path must be specified in case a full save (PDSaveFull) is needed. In case of an incremental save (PDSaveIncremental), newPath should be set to NULL. If a full save (PDSaveFull) is performed and newPath is the same as the file's original path, the new file is saved to a file system determined temporary path. The old file is then deleted and the new file is renamed to newPath. ### get_signature_box_page_number ```cpp unsigned int datalogics_interface::SignDoc::get_signature_box_page_number() const ``` **Returns:** `unsigned int` - The page number on which signature field's widget annotation is created. A value of zero is returned if page number was not set. Get the page number on which the widget annotation of the signature field is created. ### get_signature_box_rectangle ```cpp Rect datalogics_interface::SignDoc::get_signature_box_rectangle() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) - Dimension of the annotation rectangle of the signature field being created. A value of {0,0,0,0} is returned if annotation rectangle dimension was not set. Get the dimension of the annotation rectangle of the signature field being created. ### get_signature_type ```cpp SignatureType datalogics_interface::SignDoc::get_signature_type() const ``` **Returns:** [`SignatureType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SignatureType.md) - Member of the enumeration CSignatureType set in a document. Get the type of signature added to a document. ### operator= ```cpp SignDoc & datalogics_interface::SignDoc::operator=(SignDoc &&) noexcept ``` **Parameters** - (unnamed) ([`SignDoc &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SignDoc.md)) **Returns:** [`SignDoc &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SignDoc.md) ### set_credential_data_format ```cpp void datalogics_interface::SignDoc::set_credential_data_format(CredentialDataFormat format) ``` **Parameters** - `format` ([`CredentialDataFormat`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CredentialDataFormat.md)): - Encoding format of credentials used to sign a document. **Returns:** `void` Set the value of the credential data format option. ### set_digest_category ```cpp void datalogics_interface::SignDoc::set_digest_category(DigestCategory category) ``` **Parameters** - `category` ([`DigestCategory`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DigestCategory.md)): - Cryptographic hash function to use for generating message digests. **Returns:** `void` Set the value of the digest category. ### set_field_id ```cpp void datalogics_interface::SignDoc::set_field_id(SignatureFieldID id) ``` **Parameters** - `id` ([`SignatureFieldID`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SignatureFieldID.md)): - Identifier to determine the form field that will contain the digital signature. **Returns:** `void` Set the field identifier used to determine the form field that will contain the digital signature. ### set_field_name ```cpp void datalogics_interface::SignDoc::set_field_name(const std::string &name) ``` **Parameters** - `name` (`const std::string &`): - Fully qualified name of the form field that will contain the digital signature. **Returns:** `void` Set the form field fully qualified name option. ### set_field_object ```cpp void datalogics_interface::SignDoc::set_field_object(int a_value, int b_value) ``` **Parameters** - `a_value` (`int`): - a value of the CosObject. - `b_value` (`int`): - b value of the CosObject. **Returns:** `void` Set the form field CosObject option. ### set_non_pfx_passphrase ```cpp void datalogics_interface::SignDoc::set_non_pfx_passphrase(const std::string &passphrase, unsigned int passphrase_size, CredentialStorageFormat storage_format) ``` **Parameters** - `passphrase` (`const std::string &`): - Passphrase used to encrypt Non-PFX private key. Should be set to NULL if unencrypted. - `passphrase_size` (`unsigned int`): - Passphrase size in bytes. Shall be set to 0 if private key is unencrypted or passphrase is stored on disk. - `storage_format` ([`CredentialStorageFormat`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CredentialStorageFormat.md)): - Storage format for passphrase. **Returns:** `void` Set the passphrase used to decrypt Non-PFX credentials. Note: The passphrase provided must use the exact same character encoding used to encrypt the private key. The application makes no effort whatsoever to re-encode the same. ### set_non_pfx_private_key ```cpp void datalogics_interface::SignDoc::set_non_pfx_private_key(const std::string &private_key, unsigned int key_size, CredentialStorageFormat storage_format) ``` **Parameters** - `private_key` (`const std::string &`): - Private key. - `key_size` (`unsigned int`): - Size of private key in bytes. Shall be set to 0 if key is stored on disk. - `storage_format` ([`CredentialStorageFormat`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CredentialStorageFormat.md)): - Storage format for private key. **Returns:** `void` Set the private key for Non-PFX credentials.. ### set_non_pfx_signer_cert ```cpp void datalogics_interface::SignDoc::set_non_pfx_signer_cert(const std::string &signer_cert, unsigned int cert_size, CredentialStorageFormat storage_format) ``` **Parameters** - `signer_cert` (`const std::string &`): - Signer certificate - `cert_size` (`unsigned int`): - Size of signer certificate in bytes. Shall be set to 0 if certificate is stored on disk. - `storage_format` ([`CredentialStorageFormat`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CredentialStorageFormat.md)): - Storage format for the signer certificate. **Returns:** `void` Set the signer certificate for Non-PFX credentials. ### set_output_path ```cpp void datalogics_interface::SignDoc::set_output_path(const std::string &path) ``` **Parameters** - `path` (`const std::string &`): output Path The path to which the file is saved. A path must be specified in case a full save (PDSaveFull) is needed.... **Returns:** `void` Set Output Path The path to which the file is saved. A path must be specified in case a full save (PDSaveFull) is needed. In case of an incremental save (PDSaveIncremental), newPath should be set to NULL. If a full save (PDSaveFull) is performed and newPath is the same as the file's original path, the new file is saved to a file system determined temporary path. The old file is then deleted and the new file is renamed to newPath. ### set_pfx_credentials ```cpp void datalogics_interface::SignDoc::set_pfx_credentials(const std::string &credentials, CredentialStorageFormat storage_format) ``` **Parameters** - `credentials` (`const std::string &`): - Credentials in PFX/PKCS#12 file format. - `storage_format` ([`CredentialStorageFormat`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CredentialStorageFormat.md)): - Storage format for the signer certificate. (Only OnDisk is allowed for this option) **Returns:** `void` Set PFX/PKCS#12 credentials. ### set_pfx_passphrase ```cpp void datalogics_interface::SignDoc::set_pfx_passphrase(const std::string &passphrase, unsigned int size, CredentialStorageFormat storage_format) ``` **Parameters** - `passphrase` (`const std::string &`): - Passphrase used to encrypt PFX/PKCS#12 credentials. Shall be set to NULL if credentials are unencrypted. - `size` (`unsigned int`): - Passphrase size in bytes. Shall be set to 0 if PFX credentials are unencrypted or passphrase is stored on disk. - `storage_format` ([`CredentialStorageFormat`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/CredentialStorageFormat.md)): - Storage format for PFX/PKCS#12 credentials. **Returns:** `void` Set the passphrase used to decrypt PFX/PKCS#12 credentials. Note: The passphrase provided must use the exact same character encoding used to encrypt the PFX credentials. The application makes no effort whatsoever to re-encode the same. ### set_signature_box_page_number ```cpp void datalogics_interface::SignDoc::set_signature_box_page_number(unsigned int page) ``` **Parameters** - `page` (`unsigned int`): - Page number on which to create the widget annotation. **Returns:** `void` Set the page number on which the widget annotation of the signature field is created. ### set_signature_box_rectangle ```cpp void datalogics_interface::SignDoc::set_signature_box_rectangle(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): - Dimension of the annotation rectangle of the signature field. **Returns:** `void` Set the dimension of the annotation rectangle of the signature field being created. ### set_signature_type ```cpp void datalogics_interface::SignDoc::set_signature_type(SignatureType type) ``` **Parameters** - `type` ([`SignatureType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SignatureType.md)): - Member of the enumeration CSignatureType to be added to a document. **Returns:** `void` Set the type of signature to be added to a document. ### set_signer_info ```cpp void datalogics_interface::SignDoc::set_signer_info(const std::string &logo_file_path, float logo_opacity, const std::string &name, const std::string &location, const std::string &reason, const std::string &contact_info, DisplayTraits display_traits) ``` **Parameters** - `logo_file_path` (`const std::string &`): - Image to display as part of signature appearance. - `logo_opacity` (`float`): - Opacity of image to display as part of signature appearance. - `name` (`const std::string &`): - Name of the person or authority signing the document. - `location` (`const std::string &`): - CPU host name or physical location of the signing. - `reason` (`const std::string &`): - Reason for signing the document. - `contact_info` (`const std::string &`): - Information provided by the signer to enable recipients to contact signer for signature verification. - `display_traits` ([`DisplayTraits`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DisplayTraits.md)): - Fields to display as part of signature appearance. **Returns:** `void` --- # SmoothFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SmoothFlags **Namespace:** `datalogics_interface` ## Description Flags controlling smoothing and antialiasing when rendering a page. These flags can be OR'd together to control text, line art, and image smoothing behavior during page rendering. ## Values - `None = 0`: Do not smooth any drawn elements. - `Text = 0x00000001`: Antialias text. - `LineArt = 0x00000002`: Antialias line art (paths). - `Image = 0x00000004`: Antialias and resample images using averaged subsampling. - `ImageBicubicResampleAndAntiAlias = 0x00000008`: Resample images using bicubic resampling and antialias. - `ImageBicubicResample = 0x00000010`: Resample images using bicubic resampling without antialiasing. - `ImageLinearResample = 0x00000020`: Resample images using linear average subsampling without antialiasing. - `ImageAntiAliasOnly = 0x00000040`: Antialias images without resampling. - `TextAntiAliasEnableDDR = 0x00000080`: Antialias text using DDR sub-pixel algorithm. - `TextAntiAliasEnablePreview = 0x00000100`: Enable special text preview rendering for lower resolutions. --- # SquareAnnotation Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/SquareAnnotation ```cpp class SquareAnnotation : Annotation ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Annotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md) ## Description The square annotation allows a user to display a rectangle on a PDF page. Text associated with the Square Annotation appears in a pop-up window. The size and shape of the rectangle is defined within the Rect entry. **Uses types:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### SquareAnnotation ```cpp datalogics_interface::SquareAnnotation::SquareAnnotation(Page &page, const Rect &rect) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the SquareAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. Create a new SquareAnnotation at the end of a page's annotation array. To create a SquareAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### SquareAnnotation ```cpp datalogics_interface::SquareAnnotation::SquareAnnotation(Page &page, const Rect &rect, int add_after) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the SquareAnnotation is added. - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): A rectangle specifying the annotation's bounds, specified in user space coordinates. - `add_after` (`int`) Create a new SquareAnnotation at the end of a page's annotation array. To create a SquareAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### ~SquareAnnotation ```cpp datalogics_interface::SquareAnnotation::~SquareAnnotation() override ``` *destructor* ## Methods ### clear_interior_color ```cpp void datalogics_interface::Annotation::clear_interior_color() ``` **Returns:** `void` Clear the interior color. ### generate_appearance ```cpp virtual std::unique_ptr< Form > datalogics_interface::Annotation::generate_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the visual appearance, or null if the appearance could not be generated. Generate a new appearance stream with the current annotation properties. The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance. ### get_annotation_feature_level ```cpp virtual double datalogics_interface::Annotation::get_annotation_feature_level() const ``` **Returns:** `double` The minimum PDF version level (e.g. 1.3, 1.4, or 1.5). The minimum PDF version necessary to support the features used in this annotation. ### get_border_dash_pattern ```cpp std::vector< double > datalogics_interface::SquareAnnotation::get_border_dash_pattern() const ``` **Returns:** `std::vector< double >` An array defining a pattern of dashes and gaps to be used in drawing a dashed border (border style D). The dash array is a series of numbers that specify the lengths of alternating dashes and gaps. Lengths must be nonnegative, and are expressed in user space units. Default value is [3] ### get_border_style ```cpp std::string datalogics_interface::SquareAnnotation::get_border_style() const ``` **Returns:** `std::string` The border style. Can be one of: S - Solid D - Dashed. The dash pattern is specified as an array (see DashPattern) B - Beveled I - Inset U - Underline Other border styles may be defined in the future. Default is "S" ### get_border_style_width ```cpp double datalogics_interface::SquareAnnotation::get_border_style_width() const ``` **Returns:** `double` The border width in points. If this value is 0, no border is drawn. The default is 1.0. ### get_color ```cpp Color datalogics_interface::Annotation::get_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The annotation's color. The color of the annotation. ### get_contents ```cpp std::string datalogics_interface::Annotation::get_contents() const ``` **Returns:** `std::string` The annotation's text contents. The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### get_flags ```cpp AnnotationFlags datalogics_interface::Annotation::get_flags() const ``` **Returns:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md) The annotation's flags. The flags for the annotation. ### get_interior_color ```cpp std::unique_ptr< Color > datalogics_interface::Annotation::get_interior_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The interior fill color, or null if no interior color is set. The interior color with which to fill the annotation's rectangle or circle. The color of the border itself can be retrieved from Annotation.Color. ### get_normal_appearance ```cpp std::unique_ptr< Form > datalogics_interface::Annotation::get_normal_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the annotation's normal appearance, or null if no normal appearance has been set. The normal appearance of the annotation, represented as a Form XObject. ### get_opacity ```cpp double datalogics_interface::Annotation::get_opacity() const ``` **Returns:** `double` The opacity value for this annotation. The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### get_rect ```cpp Rect datalogics_interface::Annotation::get_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The annotation's bounding rectangle in user space coordinates. The size and location of the annotation on its page. ### get_subtype ```cpp std::string datalogics_interface::Annotation::get_subtype() const ``` **Returns:** `std::string` The subtype string (e.g. "Circle", "Square", "Line"). The annotation's subtype. ### get_title ```cpp std::string datalogics_interface::Annotation::get_title() const ``` **Returns:** `std::string` The title string. The title of the annotation. ### has_rich_text_data ```cpp bool datalogics_interface::Annotation::has_rich_text_data() const ``` **Returns:** `bool` true if the annotation contains Rich Text String content. Checks the annotation for Rich Text String content (PDFReference 1.7 Section 8.6.2). Annotations that contain Rich Text String content and do not have a normal appearance set will not be visible when rendering the page. ### operator== ```cpp bool datalogics_interface::Annotation::operator==(const Annotation &other) const ``` **Parameters** - `other` ([`const Annotation &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)): The annotation to compare with this annotation. **Returns:** `bool` true if the two annotations are equal. Test annotations for equality (if they are the same annotation). ### set_annotation_feature_level ```cpp virtual void datalogics_interface::Annotation::set_annotation_feature_level(double level) ``` **Parameters** - `level` (`double`): The target PDF version level. Features requiring a higher version will be removed. **Returns:** `void` Removes features not supported in the supplied version number. ### set_border_dash_pattern ```cpp void datalogics_interface::SquareAnnotation::set_border_dash_pattern(const std::vector< double > &pattern) ``` **Parameters** - `pattern` (`const std::vector< double > &`): the border style dash pattern **Returns:** `void` ### set_border_style ```cpp void datalogics_interface::SquareAnnotation::set_border_style(const std::string &style) ``` **Parameters** - `style` (`const std::string &`): the border style **Returns:** `void` ### set_border_style_width ```cpp void datalogics_interface::SquareAnnotation::set_border_style_width(double width) ``` **Parameters** - `width` (`double`): the border style width **Returns:** `void` ### set_color ```cpp void datalogics_interface::Annotation::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new color to set. **Returns:** `void` The color of the annotation. ### set_contents ```cpp void datalogics_interface::Annotation::set_contents(const std::string &contents) ``` **Parameters** - `contents` (`const std::string &`): The new text contents. **Returns:** `void` The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### set_flags ```cpp void datalogics_interface::Annotation::set_flags(AnnotationFlags flags) ``` **Parameters** - `flags` ([`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md)): The new annotation flags to set. **Returns:** `void` The flags for the annotation. ### set_interior_color ```cpp void datalogics_interface::Annotation::set_interior_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new interior fill color. Pass null to remove the interior color. **Returns:** `void` The interior color with which to fill the annotation's rectangle or circle. Only RGB colors are allowed. The color of the border itself can be retrieved from Annotation.Color. ### set_normal_appearance ```cpp void datalogics_interface::Annotation::set_normal_appearance(Form &form) ``` **Parameters** - `form` ([`Form &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)): The Form to use as the annotation's normal appearance. **Returns:** `void` The normal appearance of the annotation, represented as a Form XObject. ### set_opacity ```cpp void datalogics_interface::Annotation::set_opacity(double opacity) ``` **Parameters** - `opacity` (`double`): The new opacity value to set. **Returns:** `void` The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### set_rect ```cpp void datalogics_interface::Annotation::set_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The new bounding rectangle in user space coordinates. **Returns:** `void` The size and location of the annotation on its page. ### set_title ```cpp void datalogics_interface::Annotation::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): The new title string. **Returns:** `void` The title of the annotation. ### to_string ```cpp std::string datalogics_interface::Annotation::to_string() const ``` **Returns:** `std::string` A string describing this annotation, including its type and rectangle. Returns a string representation of this annotation. ### try_as ```cpp T * datalogics_interface::Annotation::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this annotation to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Annotation::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # StructElement Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement ```cpp class StructElement ``` **Namespace:** `datalogics_interface` ## Description Internal wrapper for a single node in the PDF logical structure tree. Owns a non-owning reference to its CDocument. Exposes type (/S) access, the backing dict (for arbitrary attribute reads/writes), child creation, and marked-content reference insertion. Threading: single-thread use. A `StructElement` is bound to its owning `Document`'s thread; do not share it across threads. See `datalogics_interface.hpp` for the full threading model. Lifetime: a `StructElement` must not outlive the `Document` that produced it. **Referenced by:** [`StructElement`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md), [`StructTreeRoot`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructTreeRoot.md) **Uses types:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md), [`Page`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md), [`StructElement`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md), [`StructKidType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/StructKidType.md) ## Constructors ### StructElement ```cpp datalogics_interface::StructElement::StructElement(StructElement &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`StructElement &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md)) ### ~StructElement ```cpp datalogics_interface::StructElement::~StructElement() ``` *destructor* ## Methods ### add_child ```cpp StructElement datalogics_interface::StructElement::add_child(const std::string &struct_type) ``` **Parameters** - `struct_type` (`const std::string &`) **Returns:** [`StructElement`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md) Create and append a child element with the given struct type (/S). ### add_marked_content_ref ```cpp void datalogics_interface::StructElement::add_marked_content_ref(Page &page, const Container &container) ``` **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)) - `container` ([`const Container &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Container.md)) **Returns:** `void` Append a marked-content reference. `/StructParents` on the page and the parent tree are wired automatically. ### as_pdf_object ```cpp PDFObject datalogics_interface::StructElement::as_pdf_object() const ``` **Returns:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) Non-owning indirect handle for use in containers. ### get_kid_as_element ```cpp StructElement datalogics_interface::StructElement::get_kid_as_element(size_t index) const ``` **Parameters** - `index` (`size_t`) **Returns:** [`StructElement`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md) Kid at `index` interpreted as a child struct element. **Exceptions** - `std::invalid_argument`: if the kid is not a struct element. ### get_kid_as_marked_content_mcid ```cpp int datalogics_interface::StructElement::get_kid_as_marked_content_mcid(size_t index) const ``` **Parameters** - `index` (`size_t`) **Returns:** `int` MCID of the marked-content kid at `index`. **Exceptions** - `std::invalid_argument`: if the kid is not a marked-content ref. ### get_kid_as_marked_content_page ```cpp Page datalogics_interface::StructElement::get_kid_as_marked_content_page(size_t index) const ``` **Parameters** - `index` (`size_t`) **Returns:** [`Page`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md) Page containing the marked-content kid at `index`. **Exceptions** - `std::invalid_argument`: if the kid is not a marked-content ref. ### get_kid_count ```cpp size_t datalogics_interface::StructElement::get_kid_count() const ``` **Returns:** `size_t` Number of kids in this element's /K array. ### get_kid_type ```cpp StructKidType datalogics_interface::StructElement::get_kid_type(size_t index) const ``` **Parameters** - `index` (`size_t`) **Returns:** [`StructKidType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/StructKidType.md) Classify the kid at `index`. Caller should gate type-specific accessors on this result. ### get_parent ```cpp std::optional< StructElement > datalogics_interface::StructElement::get_parent() const ``` **Returns:** [`std::optional< StructElement >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md) Immediate parent element in the tree, or std::nullopt when the parent is the struct tree root (use parent_is_tree_root() to tell the two nullopt conditions apart explicitly). ### get_pdf_dict ```cpp PDFDict datalogics_interface::StructElement::get_pdf_dict() const ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) Full backing dict — escape hatch for all attributes (/Alt, /ActualText, /Lang, /E, /T, /ID, /A, etc.). ### get_type ```cpp std::string datalogics_interface::StructElement::get_type() const ``` **Returns:** `std::string` Struct type (/S) value as a string. ### operator= ```cpp StructElement & datalogics_interface::StructElement::operator=(StructElement &&) noexcept ``` **Parameters** - (unnamed) ([`StructElement &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md)) **Returns:** [`StructElement &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md) ### parent_is_tree_root ```cpp bool datalogics_interface::StructElement::parent_is_tree_root() const ``` **Returns:** `bool` True when this element's immediate parent is the struct tree root. --- # StructKidType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/StructKidType **Namespace:** `datalogics_interface` ## Description Discriminator for the three shapes of kid entries that can live in a struct element's /K array: another struct element, a marked-content reference (inline MCID or MCR dict), or an object reference (OBJR). ## Values - `Element = 0`: Kid is another StructElement. - `MarkedContent = 1`: Kid is a marked-content reference (MCID + page). - `ObjectRef = 2`: Kid is an object reference (OBJR) — out of scope for v2. - `Unknown = 3`: Kid type was not recognized by the underlying PDF data. --- # StructTreeRoot Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructTreeRoot ```cpp class StructTreeRoot ``` **Namespace:** `datalogics_interface` ## Description Internal wrapper for the root of a PDF logical structure tree. Owns a non-owning reference to its CDocument. The underlying PDF structure tree is owned by the document; this wrapper provides C++ access to catalog- level struct tree operations (add children, access the backing dict). Root of the PDF logical structure tree. Obtained exclusively via Document::create_struct_tree_root() or Document::get_struct_tree_root(). Threading: single-thread use. A `StructTreeRoot` is bound to its owning `Document`'s thread; do not share it across threads. See `datalogics_interface.hpp` for the full threading model. Lifetime: a `StructTreeRoot` must not outlive the `Document` that produced it. **Referenced by:** [`Document`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md) **Uses types:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md), [`StructElement`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md) ## Constructors ### StructTreeRoot ```cpp datalogics_interface::StructTreeRoot::StructTreeRoot(StructTreeRoot &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`StructTreeRoot &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructTreeRoot.md)) ### ~StructTreeRoot ```cpp datalogics_interface::StructTreeRoot::~StructTreeRoot() ``` *destructor* ## Methods ### add_child ```cpp StructElement datalogics_interface::StructTreeRoot::add_child(const std::string &struct_type) ``` **Parameters** - `struct_type` (`const std::string &`) **Returns:** [`StructElement`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md) Create and append a top-level child element with the given struct type. ### as_pdf_object ```cpp PDFObject datalogics_interface::StructTreeRoot::as_pdf_object() const ``` **Returns:** [`PDFObject`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFObject.md) Non-owning handle suitable for use in dicts/arrays as an indirect reference. The StructTreeRoot dict is always indirect. ### find_element_by_id ```cpp std::optional< StructElement > datalogics_interface::StructTreeRoot::find_element_by_id(const std::string &id) const ``` **Parameters** - `id` (`const std::string &`) **Returns:** [`std::optional< StructElement >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md) Element whose /ID (via the tree's /IDTree) matches `id`, or std::nullopt when no element with that ID exists. ### get_kid ```cpp StructElement datalogics_interface::StructTreeRoot::get_kid(size_t index) const ``` **Parameters** - `index` (`size_t`) **Returns:** [`StructElement`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructElement.md) Top-level kid at `index`. Always a struct element per the PDF spec. **Exceptions** - `std::out_of_range`: if `index` is not less than get_kid_count(). ### get_kid_count ```cpp size_t datalogics_interface::StructTreeRoot::get_kid_count() const ``` **Returns:** `size_t` Number of top-level kids on this tree root. Per the PDF spec, all kids of a tree root are struct elements (no MCRs / OBJRs), so the counterpart accessor is `get_kid(index)`. ### get_pdf_dict ```cpp PDFDict datalogics_interface::StructTreeRoot::get_pdf_dict() const ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) Returns the raw catalog-side dict for this StructTreeRoot — used as the escape hatch for /RoleMap, /IDTree, /ParentTreeNextKey and any other entry without a dedicated accessor. ### operator= ```cpp StructTreeRoot & datalogics_interface::StructTreeRoot::operator=(StructTreeRoot &&) noexcept ``` **Parameters** - (unnamed) ([`StructTreeRoot &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructTreeRoot.md)) **Returns:** [`StructTreeRoot &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/StructTreeRoot.md) --- # Style Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Style ```cpp class Style ``` **Namespace:** `datalogics_interface` ## Description Provides access to data about fonts, font sizes, and colors used in a word. **Referenced by:** [`StyleTransition`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/StyleTransition.md) **Uses types:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) ## Constructors ### Style ```cpp datalogics_interface::Style::Style(Style &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Style &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Style.md)) ### ~Style ```cpp datalogics_interface::Style::~Style() ``` *destructor* ## Methods ### get_color ```cpp std::unique_ptr< Color > datalogics_interface::Style::get_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The Color associated with this style. Gets the style's color. ### get_font_name ```cpp std::string datalogics_interface::Style::get_font_name() const ``` **Returns:** `std::string` The font name as a string. Gets the name of the style's font. ### get_font_size ```cpp double datalogics_interface::Style::get_font_size() const ``` **Returns:** `double` The font size for this style, in points. Gets the style's font size. ### operator= ```cpp Style & datalogics_interface::Style::operator=(Style &&) noexcept ``` **Parameters** - (unnamed) ([`Style &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Style.md)) **Returns:** [`Style &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Style.md) ### to_string ```cpp std::string datalogics_interface::Style::to_string() const ``` **Returns:** `std::string` A string in the format "[color=..., fontsize=..., fontname=...]". Returns a string representing the Style's value. The returned value indicates the color, font, and font size of the style. --- # StyleTransition Struct Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/StyleTransition ```cpp struct StyleTransition ``` **Namespace:** `datalogics_interface` ## Description Represents a style change in a word. A StyleTransition provides information about the character index in the word where the style changes, and the new Style. **Referenced by:** [`Word`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Word.md) **Uses types:** [`Style`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Style.md) ## Fields ### char_index ```cpp int datalogics_interface::StyleTransition::char_index ``` ### style ```cpp Style datalogics_interface::StyleTransition::style ``` ## Methods ### to_string ```cpp std::string datalogics_interface::StyleTransition::to_string() const ``` **Returns:** `std::string` --- # TempStoreType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TempStoreType **Namespace:** `datalogics_interface` ## Description Enumeration for selecting the temporary storage type used by the library. Controls whether temporary files are stored on disk or in memory. ## Values - `Disk = 1`: Library does not use the in-memory file system; temp data goes to disk. - `Memory = 2`: Library uses an in-memory file system with unlimited memory by default. --- # Text Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Text ```cpp class Text : Element ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) ## Description A container that represents a series of text elements and characters. A Text object is container that represents both a series of TextRun elements and a series of text characters. Operations can be performed on individual TextRuns within a Text or on individual characters within a Text by specifying the index of the individual TextRun or character. All indices start at 0. **Referenced by:** [`Text`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Text.md) **Uses types:** [`Clip`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md), [`Element`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md), [`ElementCloneFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags.md), [`ElementType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType.md), [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md), [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md), [`Text`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Text.md), [`TextFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TextFlags.md), [`TextRun`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextRun.md) ## Constructors ### Text ```cpp datalogics_interface::Text::Text() ``` *constructor* Create a new, empty Text object. ### Text ```cpp datalogics_interface::Text::Text(Text &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Text &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Text.md)) ### ~Text ```cpp datalogics_interface::Text::~Text() override ``` *destructor* ## Methods ### add_glyphs ```cpp void datalogics_interface::Text::add_glyphs(const std::vector< std::uint8_t > &glyph_ids, const std::vector< std::uint8_t > &uni_text, Font &font, GraphicState &gs, TextState &ts, const Matrix &matrix, TextFlags flags) ``` **Parameters** - `glyph_ids` (`const std::vector< std::uint8_t > &`): Glyphs IDs in the specified font for adding to the page's content - `uni_text` (`const std::vector< std::uint8_t > &`): Unicode codes for the specified glyph IDs - `font` ([`Font &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md)): - Font for wich GlyphIDs were specified - `gs` ([`GraphicState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md)): - The GraphicsState for Text element - `ts` ([`TextState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextState.md)): - TextState flags - `matrix` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)): - matrix for the Text element - `flags` ([`TextFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TextFlags.md)): - TextFlags that specifies what kind of text to add **Returns:** `void` Adds Unicode text to a Text object ### add_glyphs ```cpp void datalogics_interface::Text::add_glyphs(const std::vector< std::uint8_t > &glyph_ids, const std::vector< std::uint8_t > &uni_text, Font &font, GraphicState &gs, TextState &ts, const Matrix &matrix, TextFlags flags, int index) ``` **Parameters** - `glyph_ids` (`const std::vector< std::uint8_t > &`): Glyphs IDs in the specified font for adding to the page's content - `uni_text` (`const std::vector< std::uint8_t > &`): Unicode codes for the specified glyph IDs - `font` ([`Font &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md)): - Font for wich GlyphIDs were specified - `gs` ([`GraphicState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md)): - The GraphicsState for Text element - `ts` ([`TextState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextState.md)): - TextState flags - `matrix` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)): - matrix for the Text element - `flags` ([`TextFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TextFlags.md)): - TextFlags that specifies what kind of text to add - `index` (`int`) **Returns:** `void` Adds Unicode text to a Text object ### add_run ```cpp void datalogics_interface::Text::add_run(TextRun &run) ``` **Parameters** - `run` ([`TextRun &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextRun.md)): The TextRun to append. **Returns:** `void` Adds a TextRun to the end of this text element. ### add_run ```cpp void datalogics_interface::Text::add_run(TextRun &run, int index) ``` **Parameters** - `run` ([`TextRun &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextRun.md)): The TextRun to append. - `index` (`int`) **Returns:** `void` Adds a TextRun to the end of this text element. ### change_text_matrix_for_text_run ```cpp void datalogics_interface::Text::change_text_matrix_for_text_run(const Matrix &new_matrix, int text_run_index) ``` **Parameters** - `new_matrix` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)): The new transformation matrix to use for the TextRun. - `text_run_index` (`int`): The index of a TextRun, relative to the Text object (the first TextRun in the Text object is at index 0). **Returns:** `void` Changes the transformation matrix from user space to the current text space for the specified TextRun. The H and V values of the matrix indicate the origin of the first character. ### clone ```cpp std::unique_ptr< Element > datalogics_interface::Element::clone(ElementCloneFlags flags) const ``` **Parameters** - `flags` ([`ElementCloneFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementCloneFlags.md)) **Returns:** [`std::unique_ptr< Element >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Element.md) The copied element. Makes a copy of the element. Make a copy of an element to obtain a new element that has a distinct set of attributes. Note: TextRun objects may not be cloned. ### clone ```cpp std::unique_ptr< Text > datalogics_interface::Text::clone() const ``` **Returns:** [`std::unique_ptr< Text >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Text.md) Makes a copy of this Text object. ### find_text_run_index_for_character ```cpp int datalogics_interface::Text::find_text_run_index_for_character(int char_index) const ``` **Parameters** - `char_index` (`int`): The index of a character, relative to the Text object (the first character in the Text object is at index 0). **Returns:** `int` The index of the TextRun that contains the character specified by characterIndex. Finds the index of the TextRun that contains the nth character in a Text object. ### get_advance_for_character ```cpp Point datalogics_interface::Text::get_advance_for_character(int index) const ``` **Parameters** - `index` (`int`): The index of a character, relative to the Text object (the first character in the Text object is at index 0). **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) A value specifying both the horizontal and vertical components of the advance width of a character in user space. Gets the advance width of a character, in user space. The advance width is the amount by which the current point advances when the character is drawn. Advance width may be horizontal or vertical, depending on the writing style. Thus, the return value has both a horizontal and a vertical component. ### get_advance_for_text_run ```cpp Point datalogics_interface::Text::get_advance_for_text_run(int index) const ``` **Parameters** - `index` (`int`): The index of a TextRun, relative to the Text object (the first TextRun in the Text object is at index 0). **Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md) A value specifying both the horizontal and vertical components of the advance width of a TextRun in user space. Gets the advance width of a TextRun, in user space. The advance width is the amount by which the current point advances when the TextRun is drawn. Advance width may be horizontal or vertical, depending on the writing style. Thus, the return value has both a horizontal and a vertical component. ### get_bounding_box ```cpp Rect datalogics_interface::Element::get_bounding_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The bounding box for this element. The coordinates of the bounding box are specified in user space coordinates, relative to the element's Content. Note that user space coordinates correspond to unrotated pages; any rotation specified in the page dictionary is not taken into account. The bounding box for this element. The bounding box is a rectangle that is guaranteed to encompass the element, but it is not guaranteed to be the smallest box that could contain the element. For example, if the element is a Path that contains an arc, the bounding box encompasses the bezier control points, and not just the curve itself. ### get_bounding_box_for_character ```cpp Rect datalogics_interface::Text::get_bounding_box_for_character(int index) const ``` **Parameters** - `index` (`int`): The index of a character, relative to the Text object (the first character in the Text object is at index 0) **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) A Rect specifying the bounding box for the character. The bounding box for a character in this text element. ### get_clip ```cpp std::unique_ptr< Clip > datalogics_interface::Element::get_clip() ``` **Returns:** [`std::unique_ptr< Clip >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md) The current Clip for this Element, or NULL if no clip is set. Gets the current Clip for an Element. ### get_element_type ```cpp ElementType datalogics_interface::Element::get_element_type() const ``` **Returns:** [`ElementType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ElementType.md) Returns the runtime type of this element. ### get_matrix ```cpp Matrix datalogics_interface::Element::get_matrix() const ``` **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) The current transformation matrix applied to this element. The transformation matrix for the element. ### get_number_of_characters ```cpp int datalogics_interface::Text::get_number_of_characters() const ``` **Returns:** `int` The number of characters in this text element. ### get_number_of_runs ```cpp int datalogics_interface::Text::get_number_of_runs() const ``` **Returns:** `int` The number of text runs in this text element. ### get_run ```cpp std::unique_ptr< TextRun > datalogics_interface::Text::get_run(int index) ``` **Parameters** - `index` (`int`): The zero-based index of the TextRun to retrieve. **Returns:** [`std::unique_ptr< TextRun >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextRun.md) The TextRun at the specified index. Obtains the TextRun at the specified index. ### get_text_matrix_for_character ```cpp Matrix datalogics_interface::Text::get_text_matrix_for_character(int index) const ``` **Parameters** - `index` (`int`): The index of a character, relative to the Text object (the first character in the Text object is at index 0). **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) The transformation matrix for the character specified by characterIndex. Gets the transformation matrix from user space to the current text space for the specified character. The H and V values of the matrix indicate the origin of the first character. ### get_text_matrix_for_text_run ```cpp Matrix datalogics_interface::Text::get_text_matrix_for_text_run(int index) const ``` **Parameters** - `index` (`int`): The index of a TextRun, relative to the Text object (the first TextRun in the Text object is at index 0). **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) The transformation matrix for the TextRun specified by TextRunIndex. Gets the transformation matrix from user space to the current text space for the specified TextRun. The H and V values of the matrix indicate the origin of the first character. ### operator= ```cpp Text & datalogics_interface::Text::operator=(Text &&) noexcept ``` **Parameters** - (unnamed) ([`Text &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Text.md)) **Returns:** [`Text &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Text.md) ### point_intersects_character ```cpp bool datalogics_interface::Text::point_intersects_character(const Point &p, int index) ``` **Parameters** - `p` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): The point to test, in user space coordinates. - `index` (`int`): The index of the character. The first character in the Text has an index of 0. **Returns:** `bool` true if the point is on the character, false if the point is not on the character. Tests whether a point is on a specified character within this Text object. ### point_intersects_text_run ```cpp bool datalogics_interface::Text::point_intersects_text_run(const Point &p, int index) ``` **Parameters** - `p` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): The point to test, in user space coordinates. - `index` (`int`): The index of the TextRun. The first TextRun in the Text has an index of 0. **Returns:** `bool` true if the point is on the TextRun, false if the point is not on the TextRun. Tests whether a point is on a specified TextRun within this Text object. ### rect_intersects_character ```cpp bool datalogics_interface::Text::rect_intersects_character(const Rect &r, int index) ``` **Parameters** - `r` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The rect to test, in user space coordinates. - `index` (`int`): The index of the character. The first character in the Text has an index of 0. **Returns:** `bool` true if any part of the rectangle is on the character, false if no part of the rectangle is on the character. Tests whether any part of a rectangle is on a specified character within this Text object. ### rect_intersects_text_run ```cpp bool datalogics_interface::Text::rect_intersects_text_run(const Rect &r, int index) ``` **Parameters** - `r` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The rect to test, in user space coordinates. - `index` (`int`): The index of the TextRun. The first TextRun in the Text has an index of 0. **Returns:** `bool` true if any part of the rectangle is on the TextRun, false if no part of the rectangle is on the TextRun. Tests whether any part of a rectangle is on a specified TextRun within this Text object. ### remove_runs ```cpp void datalogics_interface::Text::remove_runs(int index, int count) ``` **Parameters** - `index` (`int`): Start position of range to delete - `count` (`int`): Count of TextRuns to delete **Returns:** `void` Removes a count of TextRuns, starting from index ### rotate ```cpp void datalogics_interface::Element::rotate(double theta) ``` **Parameters** - `theta` (`double`): The rotation angle in degrees. **Returns:** `void` Rotate an element by theta degrees counterclockwise using the matrix [ cos T sin T -sin T cos T 0 0 ]. ### scale ```cpp void datalogics_interface::Element::scale(double sx, double sy) ``` **Parameters** - `sx` (`double`): The horizontal scale factor. - `sy` (`double`): The vertical scale factor. **Returns:** `void` Scale an element by (sx,sy) units using the matrix [ sx 0 0 sy 0 0 ]. ### set_clip ```cpp void datalogics_interface::Element::set_clip(Clip &clip) ``` **Parameters** - `clip` ([`Clip &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Clip.md)): The clip to set as the current clip for this element, or NULL to remove clipping. **Returns:** `void` Sets the current Clip for an Element. ### set_matrix ```cpp void datalogics_interface::Element::set_matrix(const Matrix &matrix) ``` **Parameters** - `matrix` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)): The transformation matrix for the element. **Returns:** `void` Set the transformation matrix for the element. ### split_text_run_at_character ```cpp void datalogics_interface::Text::split_text_run_at_character(int split_location) ``` **Parameters** - `split_location` (`int`): The split location, relative to the Text object. **Returns:** `void` Splits the TextRun containing the character at the specified location into two contiguous TextRuns. The character at the specified index will be part of the first TextRun. ### translate ```cpp void datalogics_interface::Element::translate(double tx, double ty) ``` **Parameters** - `tx` (`double`): The horizontal translation distance in user space units. - `ty` (`double`): The vertical translation distance in user space units. **Returns:** `void` Translate an element by (tx,ty) units using the matrix [ 1 0 0 1 tx ty ]. ### try_as ```cpp T * datalogics_interface::Element::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this element to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Element::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # TextFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TextFlags **Namespace:** `datalogics_interface` ## Description Flags that control how text operations address text within a Text object. ## Values - `TextRun = 0x0001`: Indices identify text runs within the Text object. - `TextChar = 0x0002`: Indices identify individual characters within the Text object. - `TextPageSpace = 0x0004`: Coordinates and bounds are returned in page space rather than text space. - `TextGetBounds = 0x0008`: Compute the bounding box of the addressed text. --- # TextMarkupAnnotation Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextMarkupAnnotation ```cpp class TextMarkupAnnotation : Annotation ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Annotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md) **Derived classes:** [`HighlightAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/HighlightAnnotation.md), [`UnderlineAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/UnderlineAnnotation.md) ## Description Annotations that appears as highlighted content when added to a PDF file. Text markup annotations appear as highlights, underlines, or strikeouts when added to a PDF document in a PDF Viewer. When the edited PDF file is opened the markups appear in a pop-up window containing the text of the associated note. **Uses types:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`Quad`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### ~TextMarkupAnnotation ```cpp datalogics_interface::TextMarkupAnnotation::~TextMarkupAnnotation() override ``` *destructor* ## Methods ### clear_interior_color ```cpp void datalogics_interface::Annotation::clear_interior_color() ``` **Returns:** `void` Clear the interior color. ### generate_appearance ```cpp virtual std::unique_ptr< Form > datalogics_interface::Annotation::generate_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the visual appearance, or null if the appearance could not be generated. Generate a new appearance stream with the current annotation properties. The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance. ### get_annotated_text ```cpp std::string datalogics_interface::TextMarkupAnnotation::get_annotated_text(bool split_lines=false) ``` **Parameters** - `split_lines` (`bool`): If true, text corresponding to each quadrilateral will be separated by CRLF characters. If false, text corresponding to each quadrilateral will be separated by spaces. **Returns:** `std::string` The text marked by the annotation. The text that is marked by the annotation. Marked text is defined as text which falls within one or more of the quadrilaterals specified by the annotation's QuadPoints entry. If the annotation marks partial words, only those portions of the word that are bounded within the QuadPoints array will be returned. If the annotation marks partial characters, the characters that fall partially within the annotation bounds may not be returned. ### get_annotation_feature_level ```cpp virtual double datalogics_interface::Annotation::get_annotation_feature_level() const ``` **Returns:** `double` The minimum PDF version level (e.g. 1.3, 1.4, or 1.5). The minimum PDF version necessary to support the features used in this annotation. ### get_color ```cpp Color datalogics_interface::Annotation::get_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The annotation's color. The color of the annotation. ### get_contents ```cpp std::string datalogics_interface::Annotation::get_contents() const ``` **Returns:** `std::string` The annotation's text contents. The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### get_flags ```cpp AnnotationFlags datalogics_interface::Annotation::get_flags() const ``` **Returns:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md) The annotation's flags. The flags for the annotation. ### get_interior_color ```cpp std::unique_ptr< Color > datalogics_interface::Annotation::get_interior_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The interior fill color, or null if no interior color is set. The interior color with which to fill the annotation's rectangle or circle. The color of the border itself can be retrieved from Annotation.Color. ### get_normal_appearance ```cpp std::unique_ptr< Form > datalogics_interface::Annotation::get_normal_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the annotation's normal appearance, or null if no normal appearance has been set. The normal appearance of the annotation, represented as a Form XObject. ### get_opacity ```cpp double datalogics_interface::Annotation::get_opacity() const ``` **Returns:** `double` The opacity value for this annotation. The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### get_quads ```cpp std::vector< Quad > datalogics_interface::TextMarkupAnnotation::get_quads() const ``` **Returns:** [`std::vector< Quad >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md) A list of quads to mark. Each quad encompasses a word or group of contiguous words in the text underlying the annotation. ### get_rect ```cpp Rect datalogics_interface::Annotation::get_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The annotation's bounding rectangle in user space coordinates. The size and location of the annotation on its page. ### get_subtype ```cpp std::string datalogics_interface::Annotation::get_subtype() const ``` **Returns:** `std::string` The subtype string (e.g. "Circle", "Square", "Line"). The annotation's subtype. ### get_title ```cpp std::string datalogics_interface::Annotation::get_title() const ``` **Returns:** `std::string` The title string. The title of the annotation. ### has_rich_text_data ```cpp bool datalogics_interface::Annotation::has_rich_text_data() const ``` **Returns:** `bool` true if the annotation contains Rich Text String content. Checks the annotation for Rich Text String content (PDFReference 1.7 Section 8.6.2). Annotations that contain Rich Text String content and do not have a normal appearance set will not be visible when rendering the page. ### operator== ```cpp bool datalogics_interface::Annotation::operator==(const Annotation &other) const ``` **Parameters** - `other` ([`const Annotation &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)): The annotation to compare with this annotation. **Returns:** `bool` true if the two annotations are equal. Test annotations for equality (if they are the same annotation). ### set_annotation_feature_level ```cpp virtual void datalogics_interface::Annotation::set_annotation_feature_level(double level) ``` **Parameters** - `level` (`double`): The target PDF version level. Features requiring a higher version will be removed. **Returns:** `void` Removes features not supported in the supplied version number. ### set_color ```cpp void datalogics_interface::Annotation::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new color to set. **Returns:** `void` The color of the annotation. ### set_contents ```cpp void datalogics_interface::Annotation::set_contents(const std::string &contents) ``` **Parameters** - `contents` (`const std::string &`): The new text contents. **Returns:** `void` The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### set_flags ```cpp void datalogics_interface::Annotation::set_flags(AnnotationFlags flags) ``` **Parameters** - `flags` ([`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md)): The new annotation flags to set. **Returns:** `void` The flags for the annotation. ### set_interior_color ```cpp void datalogics_interface::Annotation::set_interior_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new interior fill color. Pass null to remove the interior color. **Returns:** `void` The interior color with which to fill the annotation's rectangle or circle. Only RGB colors are allowed. The color of the border itself can be retrieved from Annotation.Color. ### set_normal_appearance ```cpp void datalogics_interface::Annotation::set_normal_appearance(Form &form) ``` **Parameters** - `form` ([`Form &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)): The Form to use as the annotation's normal appearance. **Returns:** `void` The normal appearance of the annotation, represented as a Form XObject. ### set_opacity ```cpp void datalogics_interface::Annotation::set_opacity(double opacity) ``` **Parameters** - `opacity` (`double`): The new opacity value to set. **Returns:** `void` The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### set_quads ```cpp void datalogics_interface::TextMarkupAnnotation::set_quads(const std::vector< Quad > &quads) ``` **Parameters** - `quads` ([`const std::vector< Quad > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md)): a list of quads to mark. Each quad encompasses a word or group of contiguous words in the text underlying the annotation **Returns:** `void` A list of quads to mark. Each quad encompasses a word or group of contiguous words in the text underlying the annotation. ### set_rect ```cpp void datalogics_interface::Annotation::set_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The new bounding rectangle in user space coordinates. **Returns:** `void` The size and location of the annotation on its page. ### set_title ```cpp void datalogics_interface::Annotation::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): The new title string. **Returns:** `void` The title of the annotation. ### to_string ```cpp std::string datalogics_interface::Annotation::to_string() const ``` **Returns:** `std::string` A string describing this annotation, including its type and rectangle. Returns a string representation of this annotation. ### try_as ```cpp T * datalogics_interface::Annotation::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this annotation to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Annotation::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # TextRenderMode Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TextRenderMode **Namespace:** `datalogics_interface` ## Description Rendering mode for text, corresponding to the Tr operator in a PDF content stream. ## Values - `Fill = 0`: Fill text glyphs. - `Stroke = 1`: Stroke text glyph outlines. - `FillThenStroke = 2`: Fill, then stroke, each glyph. - `Invisible = 3`: Render no visible glyphs (used for hidden text in OCR'd documents). - `FillAndAddToClipPath = 4`: Fill glyphs and add their outlines to the clip path. - `StrokeAndAddToClipPath = 5`: Stroke glyph outlines and add them to the clip path. - `FillThenStrokeAndAddToClipPath = 6`: Fill then stroke each glyph, and add the outlines to the clip path. - `InvisibleAddToClipPath = 7`: Render no visible glyphs but add their outlines to the clip path. --- # TextRun Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextRun ```cpp class TextRun ``` **Namespace:** `datalogics_interface` ## Description Represents one or more contiguous characters in a text object. @structure PDEGraphicState @structure PDETextState @structure PDETextItem All the characters contained within a text run have the same style, color, font, and size. **Referenced by:** [`Text`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Text.md) **Uses types:** [`Font`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md), [`GraphicState`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md), [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md), [`TextState`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextState.md) ## Constructors ### TextRun ```cpp datalogics_interface::TextRun::TextRun(const std::string &text, Font &font, GraphicState &gstate, TextState &tstate, const Matrix &matrix) ``` *constructor* **Parameters** - `text` (`const std::string &`): The text content for this run. - `font` ([`Font &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md)): The font to use for rendering the text. - `gstate` ([`GraphicState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md)): The graphic state (colors, line width, etc.) for this text run. - `tstate` ([`TextState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextState.md)): The text state (character spacing, word spacing, font size, etc.) for this text run. - `matrix` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)): The transformation matrix positioning this text run in user space. Creates a new TextRun with the specified text, font, graphic state, text state, and matrix. ### TextRun ```cpp datalogics_interface::TextRun::TextRun(TextRun &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`TextRun &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextRun.md)) ### ~TextRun ```cpp datalogics_interface::TextRun::~TextRun() ``` *destructor* ## Methods ### clear_graphic_state ```cpp void datalogics_interface::TextRun::clear_graphic_state() ``` **Returns:** `void` Removes the graphic state from this text run. ### get_advance ```cpp double datalogics_interface::TextRun::get_advance() const ``` **Returns:** `double` The advance width of this text run. Deprecated, use Text.GetAdvanceForTextRun(int textRunIndex) instead. This version does not indicate the direction of the advance width. The advance width of this run of text, in user space. The advance width is the amount by which the current point advances when the text run is drawn. ### get_bounding_box ```cpp Rect datalogics_interface::TextRun::get_bounding_box() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) Represents one or more contiguous characters in a text object. @structure PDEGraphicState @structure PDETextState @structure PDETextItem All the characters contained within a text run have the same style, color, font, and size. ### get_font ```cpp Font datalogics_interface::TextRun::get_font() const ``` **Returns:** [`Font`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md) The font for this text run. The font used to render this TextRun. ### get_graphic_state ```cpp std::unique_ptr< GraphicState > datalogics_interface::TextRun::get_graphic_state() ``` **Returns:** [`std::unique_ptr< GraphicState >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md) The GraphicState for this text run, or null. The graphic state (colors, line width, etc.) of the text run. May return null if this element does not have a GraphicState. ### get_matrix ```cpp Matrix datalogics_interface::TextRun::get_matrix() const ``` **Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md) Represents one or more contiguous characters in a text object. @structure PDEGraphicState @structure PDETextState @structure PDETextItem All the characters contained within a text run have the same style, color, font, and size. ### get_text ```cpp std::string datalogics_interface::TextRun::get_text() const ``` **Returns:** `std::string` The text string for this run. The Unicode text content of this TextRun. ### get_text_state ```cpp TextState datalogics_interface::TextRun::get_text_state() const ``` **Returns:** [`TextState`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextState.md) The TextState for this text run. The text state parameters (character spacing, word spacing, font size, etc.) of this TextRun. ### operator= ```cpp TextRun & datalogics_interface::TextRun::operator=(TextRun &&) noexcept ``` **Parameters** - (unnamed) ([`TextRun &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextRun.md)) **Returns:** [`TextRun &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextRun.md) ### set_font ```cpp void datalogics_interface::TextRun::set_font(Font &font) ``` **Parameters** - `font` ([`Font &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md)): The new font for this text run. **Returns:** `void` The font used to render this TextRun. ### set_graphic_state ```cpp void datalogics_interface::TextRun::set_graphic_state(const GraphicState &gstate) ``` **Parameters** - `gstate` ([`const GraphicState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GraphicState.md)): - the new/updated Graphic State for the text run. **Returns:** `void` Set the Graphic State of the text run. ### set_matrix ```cpp void datalogics_interface::TextRun::set_matrix(const Matrix &matrix) ``` **Parameters** - `matrix` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Matrix.md)) **Returns:** `void` Represents one or more contiguous characters in a text object. @structure PDEGraphicState @structure PDETextState @structure PDETextItem All the characters contained within a text run have the same style, color, font, and size. ### set_text ```cpp void datalogics_interface::TextRun::set_text(const std::string &text) ``` **Parameters** - `text` (`const std::string &`): The new text content for this run. **Returns:** `void` The Unicode text content of this TextRun. --- # TextState Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextState ```cpp class TextState ``` **Namespace:** `datalogics_interface` ## Description The text state includes parameters that affect text. These parameters include character and word spacing, font, font size, and horizontal scale. **Referenced by:** [`TextRun`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextRun.md) **Uses types:** [`TextRenderMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TextRenderMode.md) ## Constructors ### TextState ```cpp datalogics_interface::TextState::TextState() ``` *constructor* Create a default text state. ### TextState ```cpp datalogics_interface::TextState::TextState(const TextState &) ``` *constructor* **Parameters** - (unnamed) ([`const TextState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextState.md)) Copy constructor. ### TextState ```cpp datalogics_interface::TextState::TextState(TextState &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`TextState &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextState.md)) ### ~TextState ```cpp datalogics_interface::TextState::~TextState() ``` *destructor* ## Methods ### get_character_spacing ```cpp double datalogics_interface::TextState::get_character_spacing() const ``` **Returns:** `double` The current character spacing (corresponding to the Tc operator), in unscaled text space units. ### get_font_size ```cpp double datalogics_interface::TextState::get_font_size() const ``` **Returns:** `double` The current font size (corresponding to the Tf operator). ### get_horizontal_scale ```cpp double datalogics_interface::TextState::get_horizontal_scale() const ``` **Returns:** `double` The current horizontal scaling (corresponding to the Tz operator), as a percentage of the normal glyph width. Default is 100. ### get_render_mode ```cpp TextRenderMode datalogics_interface::TextState::get_render_mode() const ``` **Returns:** [`TextRenderMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TextRenderMode.md) The current text rendering mode (corresponding to the Tr operator). ### get_text_rise ```cpp double datalogics_interface::TextState::get_text_rise() const ``` **Returns:** `double` The current text rise (corresponding to the Ts operator), in unscaled text space units. ### get_word_spacing ```cpp double datalogics_interface::TextState::get_word_spacing() const ``` **Returns:** `double` The current word spacing (corresponding to the Tw operator), in unscaled text space units. ### operator= ```cpp TextState & datalogics_interface::TextState::operator=(const TextState &) ``` **Parameters** - (unnamed) ([`const TextState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextState.md)) **Returns:** [`TextState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextState.md) Copy assignment. ### operator= ```cpp TextState & datalogics_interface::TextState::operator=(TextState &&) noexcept ``` **Parameters** - (unnamed) ([`TextState &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextState.md)) **Returns:** [`TextState &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextState.md) ### set_character_spacing ```cpp void datalogics_interface::TextState::set_character_spacing(double spacing) ``` **Parameters** - `spacing` (`double`): - the new/updated character spacing **Returns:** `void` The current character spacing (corresponding to the Tc operator), in unscaled text space units. ### set_font_size ```cpp void datalogics_interface::TextState::set_font_size(double size) ``` **Parameters** - `size` (`double`): - the new/updated font size **Returns:** `void` The current font size (corresponding to the Tf operator). ### set_horizontal_scale ```cpp void datalogics_interface::TextState::set_horizontal_scale(double scale) ``` **Parameters** - `scale` (`double`): - the new/updated horizontal scaling **Returns:** `void` The current horizontal scaling (corresponding to the Tz operator), as a percentage of the normal glyph width. Default is 100. ### set_render_mode ```cpp void datalogics_interface::TextState::set_render_mode(TextRenderMode mode) ``` **Parameters** - `mode` ([`TextRenderMode`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TextRenderMode.md)): - the new/updated text rendering mode **Returns:** `void` The current text rendering mode (corresponding to the Tr operator). ### set_text_rise ```cpp void datalogics_interface::TextState::set_text_rise(double rise) ``` **Parameters** - `rise` (`double`): - the new/updated text rise **Returns:** `void` The current text rise (corresponding to the Ts operator), in unscaled text space units. ### set_word_spacing ```cpp void datalogics_interface::TextState::set_word_spacing(double spacing) ``` **Parameters** - `spacing` (`double`): - the new/updated character spacing **Returns:** `void` The current word spacing (corresponding to the Tw operator), in unscaled text space units. --- # TIFFByteOrder Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/TIFFByteOrder **Namespace:** `datalogics_interface` ## Description TIFF Byte Order values describing the byte order used within a file. ## Values - `BigEndian = 0`: Use big-endian byte order (Motorola). - `LittleEndian = 1`: Use little-endian byte order (Intel). - `Host = 2`: Use the host machine's byte order. --- # UnderlineAnnotation Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/UnderlineAnnotation ```cpp class UnderlineAnnotation : TextMarkupAnnotation ``` **Namespace:** `datalogics_interface` **Inherits from:** [`TextMarkupAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/TextMarkupAnnotation.md) ## Description A type of text markup annotation, for underlining text. Text markup annotations added to a PDF file appear as highlights, underlines, or strikeouts. The Underline Annotation appears PDF document as underlined text when the documnent is opened in a PDF Viewer. **Uses types:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md), [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Form`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md), [`Quad`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### UnderlineAnnotation ```cpp datalogics_interface::UnderlineAnnotation::UnderlineAnnotation(Page &page, const std::vector< Quad > &quads) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the UnderlineAnnotation is added. - `quads` ([`const std::vector< Quad > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md)): A list of quads to underline. Each quad encompasses a word or group of contiguous words in the text underlying the annotation. Create a new UnderlineAnnotation at the end of a page's annotation array. To create a FreeTextAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### UnderlineAnnotation ```cpp datalogics_interface::UnderlineAnnotation::UnderlineAnnotation(Page &page, int add_after, const std::vector< Quad > &quads) ``` *constructor* **Parameters** - `page` ([`Page &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)): The page to which the UnderlineAnnotation is added. - `add_after` (`int`): A list of quads to underline. Each quad encompasses a word or group of contiguous words in the text underlying the annotation. - `quads` ([`const std::vector< Quad > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md)) Create a new UnderlineAnnotation at the end of a page's annotation array. To create a FreeTextAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position. ### ~UnderlineAnnotation ```cpp datalogics_interface::UnderlineAnnotation::~UnderlineAnnotation() override ``` *destructor* ## Methods ### clear_interior_color ```cpp void datalogics_interface::Annotation::clear_interior_color() ``` **Returns:** `void` Clear the interior color. ### generate_appearance ```cpp virtual std::unique_ptr< Form > datalogics_interface::Annotation::generate_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the visual appearance, or null if the appearance could not be generated. Generate a new appearance stream with the current annotation properties. The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance. ### get_annotated_text ```cpp std::string datalogics_interface::TextMarkupAnnotation::get_annotated_text(bool split_lines=false) ``` **Parameters** - `split_lines` (`bool`): If true, text corresponding to each quadrilateral will be separated by CRLF characters. If false, text corresponding to each quadrilateral will be separated by spaces. **Returns:** `std::string` The text marked by the annotation. The text that is marked by the annotation. Marked text is defined as text which falls within one or more of the quadrilaterals specified by the annotation's QuadPoints entry. If the annotation marks partial words, only those portions of the word that are bounded within the QuadPoints array will be returned. If the annotation marks partial characters, the characters that fall partially within the annotation bounds may not be returned. ### get_annotation_feature_level ```cpp virtual double datalogics_interface::Annotation::get_annotation_feature_level() const ``` **Returns:** `double` The minimum PDF version level (e.g. 1.3, 1.4, or 1.5). The minimum PDF version necessary to support the features used in this annotation. ### get_color ```cpp Color datalogics_interface::Annotation::get_color() const ``` **Returns:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The annotation's color. The color of the annotation. ### get_contents ```cpp std::string datalogics_interface::Annotation::get_contents() const ``` **Returns:** `std::string` The annotation's text contents. The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### get_flags ```cpp AnnotationFlags datalogics_interface::Annotation::get_flags() const ``` **Returns:** [`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md) The annotation's flags. The flags for the annotation. ### get_interior_color ```cpp std::unique_ptr< Color > datalogics_interface::Annotation::get_interior_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The interior fill color, or null if no interior color is set. The interior color with which to fill the annotation's rectangle or circle. The color of the border itself can be retrieved from Annotation.Color. ### get_normal_appearance ```cpp std::unique_ptr< Form > datalogics_interface::Annotation::get_normal_appearance() const ``` **Returns:** [`std::unique_ptr< Form >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md) A Form representing the annotation's normal appearance, or null if no normal appearance has been set. The normal appearance of the annotation, represented as a Form XObject. ### get_opacity ```cpp double datalogics_interface::Annotation::get_opacity() const ``` **Returns:** `double` The opacity value for this annotation. The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### get_quads ```cpp std::vector< Quad > datalogics_interface::TextMarkupAnnotation::get_quads() const ``` **Returns:** [`std::vector< Quad >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md) A list of quads to mark. Each quad encompasses a word or group of contiguous words in the text underlying the annotation. ### get_rect ```cpp Rect datalogics_interface::Annotation::get_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The annotation's bounding rectangle in user space coordinates. The size and location of the annotation on its page. ### get_subtype ```cpp std::string datalogics_interface::Annotation::get_subtype() const ``` **Returns:** `std::string` The subtype string (e.g. "Circle", "Square", "Line"). The annotation's subtype. ### get_title ```cpp std::string datalogics_interface::Annotation::get_title() const ``` **Returns:** `std::string` The title string. The title of the annotation. ### has_rich_text_data ```cpp bool datalogics_interface::Annotation::has_rich_text_data() const ``` **Returns:** `bool` true if the annotation contains Rich Text String content. Checks the annotation for Rich Text String content (PDFReference 1.7 Section 8.6.2). Annotations that contain Rich Text String content and do not have a normal appearance set will not be visible when rendering the page. ### operator== ```cpp bool datalogics_interface::Annotation::operator==(const Annotation &other) const ``` **Parameters** - `other` ([`const Annotation &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Annotation.md)): The annotation to compare with this annotation. **Returns:** `bool` true if the two annotations are equal. Test annotations for equality (if they are the same annotation). ### set_annotation_feature_level ```cpp virtual void datalogics_interface::Annotation::set_annotation_feature_level(double level) ``` **Parameters** - `level` (`double`): The target PDF version level. Features requiring a higher version will be removed. **Returns:** `void` Removes features not supported in the supplied version number. ### set_color ```cpp void datalogics_interface::Annotation::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new color to set. **Returns:** `void` The color of the annotation. ### set_contents ```cpp void datalogics_interface::Annotation::set_contents(const std::string &contents) ``` **Parameters** - `contents` (`const std::string &`): The new text contents. **Returns:** `void` The text contents of the annotation. The text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. ### set_flags ```cpp void datalogics_interface::Annotation::set_flags(AnnotationFlags flags) ``` **Parameters** - `flags` ([`AnnotationFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/AnnotationFlags.md)): The new annotation flags to set. **Returns:** `void` The flags for the annotation. ### set_interior_color ```cpp void datalogics_interface::Annotation::set_interior_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): The new interior fill color. Pass null to remove the interior color. **Returns:** `void` The interior color with which to fill the annotation's rectangle or circle. Only RGB colors are allowed. The color of the border itself can be retrieved from Annotation.Color. ### set_normal_appearance ```cpp void datalogics_interface::Annotation::set_normal_appearance(Form &form) ``` **Parameters** - `form` ([`Form &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Form.md)): The Form to use as the annotation's normal appearance. **Returns:** `void` The normal appearance of the annotation, represented as a Form XObject. ### set_opacity ```cpp void datalogics_interface::Annotation::set_opacity(double opacity) ``` **Parameters** - `opacity` (`double`): The new opacity value to set. **Returns:** `void` The constant opacity value used in painting a Markup annotation. Opacity is a range from 0.0 (fully transparent) to 1.0 (fully opaque). ### set_quads ```cpp void datalogics_interface::TextMarkupAnnotation::set_quads(const std::vector< Quad > &quads) ``` **Parameters** - `quads` ([`const std::vector< Quad > &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md)): a list of quads to mark. Each quad encompasses a word or group of contiguous words in the text underlying the annotation **Returns:** `void` A list of quads to mark. Each quad encompasses a word or group of contiguous words in the text underlying the annotation. ### set_rect ```cpp void datalogics_interface::Annotation::set_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The new bounding rectangle in user space coordinates. **Returns:** `void` The size and location of the annotation on its page. ### set_title ```cpp void datalogics_interface::Annotation::set_title(const std::string &title) ``` **Parameters** - `title` (`const std::string &`): The new title string. **Returns:** `void` The title of the annotation. ### to_string ```cpp std::string datalogics_interface::Annotation::to_string() const ``` **Returns:** `std::string` A string describing this annotation, including its type and rectangle. Returns a string representation of this annotation. ### try_as ```cpp T * datalogics_interface::Annotation::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this annotation to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Annotation::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # URIAction Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/URIAction ```cpp class URIAction : Action ``` **Namespace:** `datalogics_interface` **Inherits from:** [`Action`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md) ## Description A text string, typically a hyperlink. A Uniform Resource Identifier (URI) is a text string that identifies a resource on the Internet, typically a hyperlink to a web page. A URI Action within a PDF file allows a reader to click on a hyperlink and open a separate web page or another PDF or other kind of file accessed through a web link. **Uses types:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) ## Constructors ### URIAction ```cpp datalogics_interface::URIAction::URIAction(const std::string &uri, bool use_map) ``` *constructor* **Parameters** - `uri` (`const std::string &`): String for the URI - `use_map` (`bool`): Send mouse position with the URI General constructor ### URIAction ```cpp datalogics_interface::URIAction::URIAction(URIAction &&) noexcept=default ``` *constructor* **Parameters** - (unnamed) ([`URIAction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/URIAction.md)) ### ~URIAction ```cpp datalogics_interface::URIAction::~URIAction() override ``` *destructor* ## Methods ### get_is_map ```cpp bool datalogics_interface::URIAction::get_is_map() const ``` **Returns:** `bool` true if mouse coordinates will be sent with the URI, false otherwise. Whether to include mouse coordinates with the URI. When true, the position of the mouse click that triggered the action is appended to the URI as a query parameter. ### get_pdf_dict ```cpp PDFDict datalogics_interface::Action::get_pdf_dict() ``` **Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md) The underlying PDF dictionary for this Action. Retrieve the PDFObject representation of this object. ### get_subtype ```cpp std::string datalogics_interface::Action::get_subtype() const ``` **Returns:** `std::string` The subtype string for this action, such as "GoTo", "URI", "Launch", or "GoToR". The action's subtype. ### get_uri ```cpp std::string datalogics_interface::URIAction::get_uri() const ``` **Returns:** `std::string` The Uniform Resource Identifier string for this action. The URI string for this action. ### operator= ```cpp URIAction & datalogics_interface::URIAction::operator=(URIAction &&) noexcept=default ``` **Parameters** - (unnamed) ([`URIAction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/URIAction.md)) **Returns:** [`URIAction &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/URIAction.md) ### operator== ```cpp bool datalogics_interface::Action::operator==(const Action &other) const ``` **Parameters** - `other` ([`const Action &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md)) **Returns:** `bool` true if the two objects refer to the same action, false otherwise. Determines whether this Action is equal to another. Two Actions are considered equal if they refer to the same underlying PDF action object. ### set_is_map ```cpp void datalogics_interface::URIAction::set_is_map(bool use_map) ``` **Parameters** - `use_map` (`bool`): true to send mouse coordinates with the URI, false otherwise. **Returns:** `void` Set whether to include mouse coordinates with the URI. ### set_uri ```cpp void datalogics_interface::URIAction::set_uri(const std::string &uri) ``` **Parameters** - `uri` (`const std::string &`): The Uniform Resource Identifier string to set. **Returns:** `void` Set the URI string for this action. ### to_string ```cpp std::string datalogics_interface::Action::to_string() const ``` **Returns:** `std::string` A string describing this Action. Returns a string representation of this Action. The string includes the action's subtype. ### try_as ```cpp T * datalogics_interface::Action::try_as() ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `T *` Attempt to downcast this action to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match. ### try_as ```cpp const T * datalogics_interface::Action::try_as() const ``` **Parameters** - (unnamed) (`typename T`) **Returns:** `const T *` Const overload of try_as(). Returns a const pointer, or nullptr. --- # VerticalAlignment Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/VerticalAlignment **Namespace:** `datalogics_interface` ## Description Specification of vertical alignment options. ## Values - `Top = 0`: Align to top edge. - `Center = 1`: Center vertically. - `Bottom = 2`: Align to bottom edge. --- # ViewDestination Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination ```cpp class ViewDestination ``` **Namespace:** `datalogics_interface` ## Description Represents a particular view of a page in a document. A destination describes a place in the PDF document where the user will be taken in response to clicking a hyperlink. The destination defines where a bookmark or hyperlink points to. The ViewDestination contains a reference to a page, a place (rectangle) on that page, and information specifying how to adjust the view to fit the window's size and shape. **Referenced by:** [`Bookmark`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Bookmark.md), [`GoToAction`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/GoToAction.md), [`LinkAnnotation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/LinkAnnotation.md) **Uses types:** [`PDFArray`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFArray.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) ## Constructors ### ViewDestination ```cpp datalogics_interface::ViewDestination::ViewDestination(Document &doc, int page_number, const std::string &fit_type, const Rect &rect, double zoom) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): Containing document - `page_number` (`int`): Target page number - `fit_type` (`const std::string &`): Fit Type must be: "XYZ", "Fit", "FitH", "FitV", "FitR", "FitB", "FitBH", or "FitBV". - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): Target rectangle - `zoom` (`double`): Zoom level General purpose constructor: construct with all elements ### ViewDestination ```cpp datalogics_interface::ViewDestination::ViewDestination(ViewDestination &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`ViewDestination &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md)) ### ~ViewDestination ```cpp datalogics_interface::ViewDestination::~ViewDestination() ``` *destructor* ## Fields ### null_value ```cpp static double datalogics_interface::ViewDestination::null_value ``` *static* Constant used for "null" values in destination rectangles or zoom. ## Methods ### get_dest_rect ```cpp Rect datalogics_interface::ViewDestination::get_dest_rect() const ``` **Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md) The destination rectangle for this view. The destination rectangle. Coordinates with a value of NullValue indicate that the corresponding coordinate is not specified in the destination. ### get_fit_type ```cpp std::string datalogics_interface::ViewDestination::get_fit_type() const ``` **Returns:** `std::string` The fit type string for this destination. The fit type describing how the destination page is displayed. The fit type determines how the page content is fitted into the window. Valid fit types are: "XYZ", "Fit", "FitH", "FitV", "FitR", "FitB", "FitBH", and "FitBV". ### get_page_number ```cpp int datalogics_interface::ViewDestination::get_page_number() const ``` **Returns:** `int` The zero-based page number for this destination. The page number of the destination. ### get_pdf_array ```cpp std::unique_ptr< PDFArray > datalogics_interface::ViewDestination::get_pdf_array() ``` **Returns:** [`std::unique_ptr< PDFArray >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFArray.md) The underlying PDF array object for this destination. Retrieve the PDFArray representation of this ViewDestination. ### get_zoom ```cpp double datalogics_interface::ViewDestination::get_zoom() const ``` **Returns:** `double` The zoom factor, or NullValue if not set. The zoom factor for the destination. A value of NullValue indicates that the zoom factor is not specified. ### operator= ```cpp ViewDestination & datalogics_interface::ViewDestination::operator=(ViewDestination &&) noexcept ``` **Parameters** - (unnamed) ([`ViewDestination &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md)) **Returns:** [`ViewDestination &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md) ### operator== ```cpp bool datalogics_interface::ViewDestination::operator==(const ViewDestination &other) const ``` **Parameters** - `other` ([`const ViewDestination &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ViewDestination.md)): The ViewDestination to compare against. **Returns:** `bool` true if the two ViewDestination objects refer to the same destination, false otherwise. Compare two ViewDestination objects for equality. Two ViewDestination objects are considered equal if their underlying PDF Cos objects are equal. ### set_dest_rect ```cpp void datalogics_interface::ViewDestination::set_dest_rect(const Rect &rect) ``` **Parameters** - `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Rect.md)): The rectangle defining the visible area of the destination page. **Returns:** `void` Set the destination rectangle of the view. ### set_fit_type ```cpp void datalogics_interface::ViewDestination::set_fit_type(const std::string &fit_type) ``` **Parameters** - `fit_type` (`const std::string &`): The fit type string. Must be one of: "XYZ", "Fit", "FitH", "FitV", "FitR", "FitB", "FitBH", or "FitBV". **Returns:** `void` Set the fit type for the view. ### set_page_number ```cpp void datalogics_interface::ViewDestination::set_page_number(int page_number) ``` **Parameters** - `page_number` (`int`): The zero-based page number to set as the destination. **Returns:** `void` Set the page number of the destination starting at 0. ### set_zoom ```cpp void datalogics_interface::ViewDestination::set_zoom(double zoom) ``` **Parameters** - `zoom` (`double`): The zoom level to apply when navigating to this destination. **Returns:** `void` Set the zoom factor for the destination. ### to_string ```cpp std::string datalogics_interface::ViewDestination::to_string() const ``` **Returns:** `std::string` A formatted string describing this ViewDestination. Return a string representation of the ViewDestination. The string includes the page number, fit type, destination rectangle, and zoom factor. --- # VisibilityPolicy Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/VisibilityPolicy **Namespace:** `datalogics_interface` ## Description Determines how content visibility is resolved when an OptionalContentMembershipDict references multiple OptionalContentGroups with conflicting on/off states. ## Values - `AllOn = 0`: Display if all OptionalContentGroups in this OptionalContentMembershipDict are ON - `AnyOn = 1`: Display if at least one OptionalContentGroup in this OptionalContentMembershipDict is ON - `AnyOff = 2`: Display if at least one OptionalContentGroup in this OptionalContentMembershipDict is OFF - `AllOff = 3`: Display if all OptionalContentGroups in this OptionalContentMembershipDict are OFF --- # WatermarkDrawOption Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WatermarkDrawOption **Namespace:** `datalogics_interface` ## Description Specifies how a watermark should be drawn in a PDF document. Controls whether the watermark is rendered as an annotation or as a form XObject within the page content stream. The "Try" variants attempt the specified method but may fall back if it is not possible. ## Values - `TryAnnotation = 0`: Try annotation; may fall back to form XObject. - `TryFormXObject = 1`: Try form XObject; may fall back to annotation. - `Annotation = 2`: Strictly annotation. - `FormXObject = 3`: Strictly form XObject. --- # WatermarkParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkParams ```cpp class WatermarkParams ``` **Namespace:** `datalogics_interface` ## Description Watermark settings control the appearance of a watermark in a PDF. **Uses types:** [`HorizontalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HorizontalAlignment.md), [`PageSpec`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageSpec.md), [`VerticalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/VerticalAlignment.md), [`WatermarkDrawOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WatermarkDrawOption.md) ## Constructors ### WatermarkParams ```cpp datalogics_interface::WatermarkParams::WatermarkParams() ``` *constructor* Construct default WatermarkParams. Initializes with rotation 0, full page range, opacity 1.0, scale 0.5, zOrderTop true, showOnPrint true, showOnScreen true, centered alignment, and the TryAnnotation draw option. ### WatermarkParams ```cpp datalogics_interface::WatermarkParams::WatermarkParams(const WatermarkParams &other) ``` *constructor* **Parameters** - `other` ([`const WatermarkParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkParams.md)) Copy constructor. ### WatermarkParams ```cpp datalogics_interface::WatermarkParams::WatermarkParams(WatermarkParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`WatermarkParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkParams.md)) ### ~WatermarkParams ```cpp datalogics_interface::WatermarkParams::~WatermarkParams() ``` *destructor* ## Methods ### get_draw_option ```cpp WatermarkDrawOption datalogics_interface::WatermarkParams::get_draw_option() const ``` **Returns:** [`WatermarkDrawOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WatermarkDrawOption.md) Get the draw option to be used when adding the watermark to a page. Controls whether the watermark is drawn as an annotation or form XObject. ### get_end_page ```cpp int datalogics_interface::WatermarkParams::get_end_page() const ``` **Returns:** `int` The page range of the document to which the watermark should be added. Defaults to all pages. ### get_horiz_alignment ```cpp HorizontalAlignment datalogics_interface::WatermarkParams::get_horiz_alignment() const ``` **Returns:** [`HorizontalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HorizontalAlignment.md) Get the horizontal alignment to be used when adding the watermark to a page. Defaults to center alignment. ### get_horiz_value ```cpp float datalogics_interface::WatermarkParams::get_horiz_value() const ``` **Returns:** `float` Watermark settings control the appearance of a watermark in a PDF. ### get_opacity ```cpp float datalogics_interface::WatermarkParams::get_opacity() const ``` **Returns:** `float` Watermark settings control the appearance of a watermark in a PDF. ### get_page_spec ```cpp PageSpec datalogics_interface::WatermarkParams::get_page_spec() const ``` **Returns:** [`PageSpec`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageSpec.md) Get which pages the watermark targets. ### get_rotation ```cpp float datalogics_interface::WatermarkParams::get_rotation() const ``` **Returns:** `float` Watermark settings control the appearance of a watermark in a PDF. ### get_scale ```cpp float datalogics_interface::WatermarkParams::get_scale() const ``` **Returns:** `float` Watermark settings control the appearance of a watermark in a PDF. ### get_show_on_print ```cpp bool datalogics_interface::WatermarkParams::get_show_on_print() const ``` **Returns:** `bool` Watermark settings control the appearance of a watermark in a PDF. ### get_show_on_screen ```cpp bool datalogics_interface::WatermarkParams::get_show_on_screen() const ``` **Returns:** `bool` Watermark settings control the appearance of a watermark in a PDF. ### get_start_page ```cpp int datalogics_interface::WatermarkParams::get_start_page() const ``` **Returns:** `int` The page range of the document to which the watermark should be added. Defaults to all pages. ### get_vert_alignment ```cpp VerticalAlignment datalogics_interface::WatermarkParams::get_vert_alignment() const ``` **Returns:** [`VerticalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/VerticalAlignment.md) Get the vertical alignment to be used when adding the watermark to a page. Defaults to center alignment. ### get_vert_value ```cpp float datalogics_interface::WatermarkParams::get_vert_value() const ``` **Returns:** `float` Watermark settings control the appearance of a watermark in a PDF. ### get_z_order_top ```cpp bool datalogics_interface::WatermarkParams::get_z_order_top() const ``` **Returns:** `bool` Watermark settings control the appearance of a watermark in a PDF. ### operator= ```cpp WatermarkParams & datalogics_interface::WatermarkParams::operator=(const WatermarkParams &other) ``` **Parameters** - `other` ([`const WatermarkParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkParams.md)) **Returns:** [`WatermarkParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkParams.md) Copy assignment. ### operator= ```cpp WatermarkParams & datalogics_interface::WatermarkParams::operator=(WatermarkParams &&) noexcept ``` **Parameters** - (unnamed) ([`WatermarkParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkParams.md)) **Returns:** [`WatermarkParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkParams.md) ### set_draw_option ```cpp void datalogics_interface::WatermarkParams::set_draw_option(WatermarkDrawOption option) ``` **Parameters** - `option` ([`WatermarkDrawOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WatermarkDrawOption.md)): The watermark draw option. **Returns:** `void` Set the draw option to be used when adding the watermark to a page. Controls whether the watermark is drawn as an annotation or form XObject. ### set_end_page ```cpp void datalogics_interface::WatermarkParams::set_end_page(int page) ``` **Parameters** - `page` (`int`) **Returns:** `void` The page range of the document to which the watermark should be added. Defaults to all pages. ### set_horiz_alignment ```cpp void datalogics_interface::WatermarkParams::set_horiz_alignment(HorizontalAlignment align) ``` **Parameters** - `align` ([`HorizontalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HorizontalAlignment.md)): The horizontal alignment value. **Returns:** `void` Set the horizontal alignment to be used when adding the watermark to a page. ### set_horiz_value ```cpp void datalogics_interface::WatermarkParams::set_horiz_value(float value) ``` **Parameters** - `value` (`float`) **Returns:** `void` Watermark settings control the appearance of a watermark in a PDF. ### set_opacity ```cpp void datalogics_interface::WatermarkParams::set_opacity(float opacity) ``` **Parameters** - `opacity` (`float`) **Returns:** `void` Watermark settings control the appearance of a watermark in a PDF. ### set_page_spec ```cpp void datalogics_interface::WatermarkParams::set_page_spec(PageSpec spec) ``` **Parameters** - `spec` ([`PageSpec`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/PageSpec.md)) **Returns:** `void` Set which pages the watermark targets. ### set_rotation ```cpp void datalogics_interface::WatermarkParams::set_rotation(float degrees) ``` **Parameters** - `degrees` (`float`) **Returns:** `void` Watermark settings control the appearance of a watermark in a PDF. ### set_scale ```cpp void datalogics_interface::WatermarkParams::set_scale(float scale) ``` **Parameters** - `scale` (`float`) **Returns:** `void` Watermark settings control the appearance of a watermark in a PDF. ### set_show_on_print ```cpp void datalogics_interface::WatermarkParams::set_show_on_print(bool show) ``` **Parameters** - `show` (`bool`) **Returns:** `void` Watermark settings control the appearance of a watermark in a PDF. ### set_show_on_screen ```cpp void datalogics_interface::WatermarkParams::set_show_on_screen(bool show) ``` **Parameters** - `show` (`bool`) **Returns:** `void` Watermark settings control the appearance of a watermark in a PDF. ### set_start_page ```cpp void datalogics_interface::WatermarkParams::set_start_page(int page) ``` **Parameters** - `page` (`int`) **Returns:** `void` The page range of the document to which the watermark should be added. Defaults to all pages. ### set_vert_alignment ```cpp void datalogics_interface::WatermarkParams::set_vert_alignment(VerticalAlignment align) ``` **Parameters** - `align` ([`VerticalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/VerticalAlignment.md)): The vertical alignment value. **Returns:** `void` Set the vertical alignment to be used when adding the watermark to a page. ### set_vert_value ```cpp void datalogics_interface::WatermarkParams::set_vert_value(float value) ``` **Parameters** - `value` (`float`) **Returns:** `void` Watermark settings control the appearance of a watermark in a PDF. ### set_z_order_top ```cpp void datalogics_interface::WatermarkParams::set_z_order_top(bool top) ``` **Parameters** - `top` (`bool`) **Returns:** `void` Watermark settings control the appearance of a watermark in a PDF. --- # WatermarkTextParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkTextParams ```cpp class WatermarkTextParams ``` **Namespace:** `datalogics_interface` ## Description Watermark settings to control the appearance of text in a text-based watermark. **Uses types:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md), [`Font`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md), [`HorizontalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HorizontalAlignment.md) ## Constructors ### WatermarkTextParams ```cpp datalogics_interface::WatermarkTextParams::WatermarkTextParams() ``` *constructor* Creates a new WatermarkTextParams with default settings. The default font is CourierStd, font size is 24.0, color is DeviceGray black, and text alignment is left-aligned. ### WatermarkTextParams ```cpp datalogics_interface::WatermarkTextParams::WatermarkTextParams(WatermarkTextParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`WatermarkTextParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkTextParams.md)) ### ~WatermarkTextParams ```cpp datalogics_interface::WatermarkTextParams::~WatermarkTextParams() ``` *destructor* ## Methods ### get_color ```cpp std::unique_ptr< Color > datalogics_interface::WatermarkTextParams::get_color() const ``` **Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md) The Color of the watermark text. Gets the color to be used when generating a text-based watermark. ### get_font ```cpp Font datalogics_interface::WatermarkTextParams::get_font() const ``` **Returns:** [`Font`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md) The Font used for the watermark text. Gets the Font to be used when generating a text-based watermark. ### get_font_size ```cpp float datalogics_interface::WatermarkTextParams::get_font_size() const ``` **Returns:** `float` Font size in points. ### get_text ```cpp std::string datalogics_interface::WatermarkTextParams::get_text() const ``` **Returns:** `std::string` The watermark text string. Gets the text to be used when generating a text-based watermark. ### get_text_alignment ```cpp HorizontalAlignment datalogics_interface::WatermarkTextParams::get_text_alignment() const ``` **Returns:** [`HorizontalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HorizontalAlignment.md) The horizontal alignment for the watermark text. Gets the alignment to be used when justifying a text-based watermark. ### operator= ```cpp WatermarkTextParams & datalogics_interface::WatermarkTextParams::operator=(WatermarkTextParams &&) noexcept ``` **Parameters** - (unnamed) ([`WatermarkTextParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkTextParams.md)) **Returns:** [`WatermarkTextParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WatermarkTextParams.md) ### set_color ```cpp void datalogics_interface::WatermarkTextParams::set_color(const Color &color) ``` **Parameters** - `color` ([`const Color &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)): the color to be used when generating a text-based watermark **Returns:** `void` Sets the color to be used when generating a text-based watermark. ### set_font ```cpp void datalogics_interface::WatermarkTextParams::set_font(Font &font) ``` **Parameters** - `font` ([`Font &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Font.md)): The Font to use for the watermark text. **Returns:** `void` Sets the Font to be used when generating a text-based watermark. ### set_font_size ```cpp void datalogics_interface::WatermarkTextParams::set_font_size(float size) ``` **Parameters** - `size` (`float`) **Returns:** `void` Font size in points. ### set_text ```cpp void datalogics_interface::WatermarkTextParams::set_text(const std::string &text) ``` **Parameters** - `text` (`const std::string &`): The watermark text string. **Returns:** `void` Sets the text to be used when generating a text-based watermark. ### set_text_alignment ```cpp void datalogics_interface::WatermarkTextParams::set_text_alignment(HorizontalAlignment align) ``` **Parameters** - `align` ([`HorizontalAlignment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/HorizontalAlignment.md)): The horizontal alignment for the watermark text. **Returns:** `void` Sets the alignment to be used when justifying a text-based watermark. --- # WebConvertError Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertError ```cpp class WebConvertError : runtime_error ``` **Namespace:** `datalogics_interface` **Inherits from:** `runtime_error` ## Description Thrown by web-to-PDF conversion when the underlying plugin reports a non-cancellation failure. Carries the C-layer result code and textual detail in addition to the human-readable what() string. ## Constructors ### WebConvertError ```cpp datalogics_interface::WebConvertError::WebConvertError(Category category, int plugin_result_code, const std::string &detail) ``` *constructor* **Parameters** - `category` (`Category`) - `plugin_result_code` (`int`) - `detail` (`const std::string &`) ## Methods ### category ```cpp Category datalogics_interface::WebConvertError::category() const noexcept ``` **Returns:** `Category` ### detail ```cpp const std::string & datalogics_interface::WebConvertError::detail() const noexcept ``` **Returns:** `const std::string &` from WebToPDFGetLastError ### plugin_result_code ```cpp int datalogics_interface::WebConvertError::plugin_result_code() const noexcept ``` **Returns:** `int` WebToPDFResultCode value. --- # WebConvertInfo Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertInfo ```cpp class WebConvertInfo ``` **Namespace:** `datalogics_interface` ## Description Metadata about a successful web/HTML conversion. Result metadata for a completed web-to-PDF conversion: page count, conversion time, document title, and resolved source URL. Populate() reads the plugin's last-conversion record on supported platforms and is a no-op (returning false) on the stub path; the page count is then overridden by the curator bridge with the authoritative count from the opened PDF. Header has no plugin-typed surface; all conversions live in the .cpp. **Referenced by:** [`WebConvertResult`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/WebConvertResult.md) ## Constructors ### WebConvertInfo ```cpp datalogics_interface::WebConvertInfo::WebConvertInfo() ``` *constructor* ### WebConvertInfo ```cpp datalogics_interface::WebConvertInfo::WebConvertInfo(const WebConvertInfo &) ``` *constructor* **Parameters** - (unnamed) ([`const WebConvertInfo &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertInfo.md)) ### WebConvertInfo ```cpp datalogics_interface::WebConvertInfo::WebConvertInfo(WebConvertInfo &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`WebConvertInfo &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertInfo.md)) ### ~WebConvertInfo ```cpp datalogics_interface::WebConvertInfo::~WebConvertInfo() ``` *destructor* ## Methods ### get_conversion_time_ms ```cpp int datalogics_interface::WebConvertInfo::get_conversion_time_ms() const ``` **Returns:** `int` 0 if unknown ### get_page_count ```cpp int datalogics_interface::WebConvertInfo::get_page_count() const ``` **Returns:** `int` pages written; 0 if unknown ### get_source_url ```cpp std::string datalogics_interface::WebConvertInfo::get_source_url() const ``` **Returns:** `std::string` resolved URL after redirects; empty if unknown ### get_title ```cpp std::string datalogics_interface::WebConvertInfo::get_title() const ``` **Returns:** `std::string` empty if the page had no ### operator= ```cpp WebConvertInfo & datalogics_interface::WebConvertInfo::operator=(const WebConvertInfo &) ``` **Parameters** - (unnamed) ([`const WebConvertInfo &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertInfo.md)) **Returns:** [`WebConvertInfo &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertInfo.md) ### operator= ```cpp WebConvertInfo & datalogics_interface::WebConvertInfo::operator=(WebConvertInfo &&) noexcept ``` **Parameters** - (unnamed) ([`WebConvertInfo &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertInfo.md)) **Returns:** [`WebConvertInfo &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertInfo.md) --- # WebConvertParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertParams ```cpp class WebConvertParams ``` **Namespace:** `datalogics_interface` ## Description Parameters controlling Document::from_web_url and Document::from_html_file. Plain value type. Safe to construct and pass by reference. Parameters that control web/HTML-to-PDF conversion. Configure the target page geometry, viewport, image handling, and behavior on this object, then pass it to a web-to-PDF conversion call. The enum-valued settings (viewport preset, page size, page orientation, image compression, and downsampling resolution) take named values rather than raw integers. Safe to construct and configure on any platform; conversion itself runs only where the WebToPDF plugin is supported. **Uses types:** [`WebDownsamplingDPI`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebDownsamplingDPI.md), [`WebImageCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebImageCompression.md), [`WebPageOrientation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebPageOrientation.md), [`WebPageSize`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebPageSize.md), [`WebViewportPreset`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebViewportPreset.md) ## Constructors ### WebConvertParams ```cpp datalogics_interface::WebConvertParams::WebConvertParams() ``` *constructor* ### WebConvertParams ```cpp datalogics_interface::WebConvertParams::WebConvertParams(const WebConvertParams &) ``` *constructor* **Parameters** - (unnamed) ([`const WebConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertParams.md)) ### WebConvertParams ```cpp datalogics_interface::WebConvertParams::WebConvertParams(WebConvertParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`WebConvertParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertParams.md)) ### ~WebConvertParams ```cpp datalogics_interface::WebConvertParams::~WebConvertParams() ``` *destructor* ## Methods ### get_display_header_footer ```cpp bool datalogics_interface::WebConvertParams::get_display_header_footer() const ``` **Returns:** `bool` Show default browser-style header/footer. ### get_downsampling_dpi ```cpp WebDownsamplingDPI datalogics_interface::WebConvertParams::get_downsampling_dpi() const ``` **Returns:** [`WebDownsamplingDPI`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebDownsamplingDPI.md) ### get_enable_verbose_logging ```cpp bool datalogics_interface::WebConvertParams::get_enable_verbose_logging() const ``` **Returns:** `bool` Emit debug-level log messages. ### get_generate_tagged_pdf ```cpp bool datalogics_interface::WebConvertParams::get_generate_tagged_pdf() const ``` **Returns:** `bool` Produce a tagged (accessible) PDF. ### get_image_compression ```cpp WebImageCompression datalogics_interface::WebConvertParams::get_image_compression() const ``` **Returns:** [`WebImageCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebImageCompression.md) ### get_margin_bottom_inches ```cpp double datalogics_interface::WebConvertParams::get_margin_bottom_inches() const ``` **Returns:** `double` ### get_margin_left_inches ```cpp double datalogics_interface::WebConvertParams::get_margin_left_inches() const ``` **Returns:** `double` ### get_margin_right_inches ```cpp double datalogics_interface::WebConvertParams::get_margin_right_inches() const ``` **Returns:** `double` ### get_margin_top_inches ```cpp double datalogics_interface::WebConvertParams::get_margin_top_inches() const ``` **Returns:** `double` ### get_page_height_points ```cpp double datalogics_interface::WebConvertParams::get_page_height_points() const ``` **Returns:** `double` ### get_page_orientation ```cpp WebPageOrientation datalogics_interface::WebConvertParams::get_page_orientation() const ``` **Returns:** [`WebPageOrientation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebPageOrientation.md) ### get_page_size ```cpp WebPageSize datalogics_interface::WebConvertParams::get_page_size() const ``` **Returns:** [`WebPageSize`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebPageSize.md) ### get_page_width_points ```cpp double datalogics_interface::WebConvertParams::get_page_width_points() const ``` **Returns:** `double` Used when size == Custom. 1 pt = 1/72 in. ### get_print_background ```cpp bool datalogics_interface::WebConvertParams::get_print_background() const ``` **Returns:** `bool` Print CSS background colors and images. ### get_scale ```cpp double datalogics_interface::WebConvertParams::get_scale() const ``` **Returns:** `double` Content scale factor (1.0 = 100%). ### get_timeout_seconds ```cpp int datalogics_interface::WebConvertParams::get_timeout_seconds() const ``` **Returns:** `int` Conversion timeout. Sentinels match the plugin: `0` = use the plugin default (300s), `-1` = infinite, positive values = explicit seconds. ### get_viewport_height_px ```cpp int datalogics_interface::WebConvertParams::get_viewport_height_px() const ``` **Returns:** `int` ### get_viewport_preset ```cpp WebViewportPreset datalogics_interface::WebConvertParams::get_viewport_preset() const ``` **Returns:** [`WebViewportPreset`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebViewportPreset.md) ### get_viewport_width_px ```cpp int datalogics_interface::WebConvertParams::get_viewport_width_px() const ``` **Returns:** `int` Used when preset == Custom. ### operator= ```cpp WebConvertParams & datalogics_interface::WebConvertParams::operator=(const WebConvertParams &) ``` **Parameters** - (unnamed) ([`const WebConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertParams.md)) **Returns:** [`WebConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertParams.md) ### operator= ```cpp WebConvertParams & datalogics_interface::WebConvertParams::operator=(WebConvertParams &&) noexcept ``` **Parameters** - (unnamed) ([`WebConvertParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertParams.md)) **Returns:** [`WebConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertParams.md) ### set_display_header_footer ```cpp void datalogics_interface::WebConvertParams::set_display_header_footer(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` ### set_downsampling_dpi ```cpp void datalogics_interface::WebConvertParams::set_downsampling_dpi(WebDownsamplingDPI dpi) ``` **Parameters** - `dpi` ([`WebDownsamplingDPI`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebDownsamplingDPI.md)) **Returns:** `void` ### set_enable_verbose_logging ```cpp void datalogics_interface::WebConvertParams::set_enable_verbose_logging(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` ### set_generate_tagged_pdf ```cpp void datalogics_interface::WebConvertParams::set_generate_tagged_pdf(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` ### set_image_compression ```cpp void datalogics_interface::WebConvertParams::set_image_compression(WebImageCompression c) ``` **Parameters** - `c` ([`WebImageCompression`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebImageCompression.md)) **Returns:** `void` ### set_log_callback ```cpp void datalogics_interface::WebConvertParams::set_log_callback(LogCallback cb) ``` **Parameters** - `cb` (`LogCallback`) **Returns:** `void` ### set_margins_inches ```cpp void datalogics_interface::WebConvertParams::set_margins_inches(double top, double right, double bottom, double left) ``` **Parameters** - `top` (`double`) - `right` (`double`) - `bottom` (`double`) - `left` (`double`) **Returns:** `void` ### set_page_height_points ```cpp void datalogics_interface::WebConvertParams::set_page_height_points(double h) ``` **Parameters** - `h` (`double`) **Returns:** `void` ### set_page_orientation ```cpp void datalogics_interface::WebConvertParams::set_page_orientation(WebPageOrientation o) ``` **Parameters** - `o` ([`WebPageOrientation`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebPageOrientation.md)) **Returns:** `void` ### set_page_size ```cpp void datalogics_interface::WebConvertParams::set_page_size(WebPageSize size) ``` **Parameters** - `size` ([`WebPageSize`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebPageSize.md)) **Returns:** `void` ### set_page_width_points ```cpp void datalogics_interface::WebConvertParams::set_page_width_points(double w) ``` **Parameters** - `w` (`double`) **Returns:** `void` ### set_prefer_css_page_size ```cpp void datalogics_interface::WebConvertParams::set_prefer_css_page_size(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` ### set_print_background ```cpp void datalogics_interface::WebConvertParams::set_print_background(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` ### set_progress_callback ```cpp void datalogics_interface::WebConvertParams::set_progress_callback(ProgressCallback cb) ``` **Parameters** - `cb` (`ProgressCallback`) **Returns:** `void` ### set_scale ```cpp void datalogics_interface::WebConvertParams::set_scale(double value) ``` **Parameters** - `value` (`double`) **Returns:** `void` ### set_timeout_seconds ```cpp void datalogics_interface::WebConvertParams::set_timeout_seconds(int seconds) ``` **Parameters** - `seconds` (`int`) **Returns:** `void` ### set_viewport_height_px ```cpp void datalogics_interface::WebConvertParams::set_viewport_height_px(int px) ``` **Parameters** - `px` (`int`) **Returns:** `void` ### set_viewport_preset ```cpp void datalogics_interface::WebConvertParams::set_viewport_preset(WebViewportPreset preset) ``` **Parameters** - `preset` ([`WebViewportPreset`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebViewportPreset.md)) **Returns:** `void` ### set_viewport_width_px ```cpp void datalogics_interface::WebConvertParams::set_viewport_width_px(int px) ``` **Parameters** - `px` (`int`) **Returns:** `void` --- # WebConvertResult Struct Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/WebConvertResult ```cpp struct WebConvertResult ``` **Namespace:** `datalogics_interface` ## Description Result of a successful web/HTML conversion. Designed for structured-binding destructuring at the call site: `auto[doc,info]=Document::from_web_url(url,params);` **Referenced by:** [`Document`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md) **Uses types:** [`Document`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md), [`WebConvertInfo`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WebConvertInfo.md) ## Fields ### document ```cpp Document datalogics_interface::WebConvertResult::document ``` ### info ```cpp WebConvertInfo datalogics_interface::WebConvertResult::info ``` --- # WebDownsamplingDPI Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebDownsamplingDPI **Namespace:** `datalogics_interface` ## Description Downsampling resolution for raster images. The plugin supports only this discrete set; arbitrary DPI values are not accepted. Numeric values match the underlying `WebToPDFDownsamplingDPI` enum so a `static_cast` suffices at the bridge. ## Values - `Disabled = -1`: Preserve original resolution. - `DPI300 = 0`: 300 DPI (plugin default) - `DPI75 = 1`: 75 DPI (screen quality) - `DPI150 = 2`: 150 DPI - `DPI600 = 3`: 600 DPI (high quality print) - `DPI1200 = 4`: 1200 DPI (very high quality) --- # WebImageCompression Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebImageCompression **Namespace:** `datalogics_interface` ## Values - `JPEG = 0`: Lossy JPEG (smaller file). - `Lossless = 1`: Lossless compression (larger file, pixel-perfect). --- # WebLogLevel Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebLogLevel **Namespace:** `datalogics_interface` ## Values - `Error = 0` - `Warning = 1` - `Info = 2` - `Debug = 3` --- # WebPageOrientation Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebPageOrientation **Namespace:** `datalogics_interface` ## Values - `Portrait = 0` - `Landscape = 1` --- # WebPageSize Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebPageSize **Namespace:** `datalogics_interface` ## Values - `Letter = 0`: US Letter (8.5 x 11 in). - `Legal = 1`: US Legal (8.5 x 14 in). - `Ledger = 2`: US Ledger / Tabloid (11 x 17 in). - `A3 = 3`: ISO A3 (297 x 420 mm). - `A4 = 4`: ISO A4 (210 x 297 mm). - `A5 = 5`: ISO A5 (148 x 210 mm). - `Custom = 6`: Use the explicit width/height (points) set on params. --- # WebViewportPreset Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WebViewportPreset **Namespace:** `datalogics_interface` ## Values - `Desktop = 0`: Default 1280x1024. - `Mobile = 1`: e.g. 375x812 - `Tablet = 2`: e.g. 768x1024 - `Custom = 3`: Use the explicit width/height set on params. --- # Word Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Word ```cpp class Word ``` **Namespace:** `datalogics_interface` ## Description A word in a PDF file. Each word contains a sequence of characters in one or more styles (see Style). **Referenced by:** [`WordFinder`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WordFinder.md) **Uses types:** [`Quad`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md), [`StyleTransition`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/StyleTransition.md), [`WordAttributeFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WordAttributeFlags.md) ## Constructors ### Word ```cpp datalogics_interface::Word::Word(Word &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`Word &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Word.md)) ### ~Word ```cpp datalogics_interface::Word::~Word() ``` *destructor* ## Methods ### get_attributes ```cpp WordAttributeFlags datalogics_interface::Word::get_attributes() const ``` **Returns:** [`WordAttributeFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WordAttributeFlags.md) A set of WordAttributeFlags containing information on the types of characters in the word. Gets a set of summary flags containing information on the types of characters in a word. ### get_char_quads ```cpp std::vector< Quad > datalogics_interface::Word::get_char_quads() const ``` **Returns:** [`std::vector< Quad >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md) A list containing the Quads found in the word, one for each individual character. Gets a list of Quads occupied by the individual characters in a word. ### get_is_last_word_in_region ```cpp bool datalogics_interface::Word::get_is_last_word_in_region() const ``` **Returns:** `bool` true if the word is the last word in a region, false if it is not. Specifies whether this word is the last word in a region as determined by the WordFinder. This can be useful for determining visual line breaks in tagged PDFs. In tagged PDF documents, WordAttributeFlags.LastWordOnLine is set according to the tags in the document, so that flag cannot be used to determine visual line breaks. ### get_quads ```cpp std::vector< Quad > datalogics_interface::Word::get_quads() const ``` **Returns:** [`std::vector< Quad >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Quad.md) A list containing the Quads found in the word. Gets the specified word's quads, specified in user space coordinates. The quad's height is the height of the font's bounding box, not the height of the tallest character used in the word. The font's bounding box is determined by the glyphs in the font that extend farthest above and below the baseline; it often extends somewhat above the top of 'A' and below the bottom of 'y'. The quad's width is determined from the characters actually present in the word. For example, the quads for the words "AWAY" and "away" have the same height, but generally do not have the same width unless the font is a mono-spaced font (a font in which all characters have the same width). Despite the names of the fields in an Quad (TopLeft for top left, BottomLeft for bottom left, and so forth) the corners of Quad do not necessarily have these positions. ### get_style_transitions ```cpp std::vector< StyleTransition > datalogics_interface::Word::get_style_transitions() const ``` **Returns:** [`std::vector< StyleTransition >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/StyleTransition.md) The list of StyleTransition objects. Gets a list of style transitions for the word. Every word has at least one style transition, at character position zero in the word. ### get_text ```cpp std::string datalogics_interface::Word::get_text() const ``` **Returns:** `std::string` The text of the Word. Gets a word's text, converting ligatures to their constituent characters. The string to return includes any word break characters (such as space characters) that follow the word, but not any that precede the word. ### operator= ```cpp Word & datalogics_interface::Word::operator=(Word &&) noexcept ``` **Parameters** - (unnamed) ([`Word &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Word.md)) **Returns:** [`Word &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Word.md) --- # WordAttributeFlags Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WordAttributeFlags **Namespace:** `datalogics_interface` ## Description Flags returned by Word::GetAttributes. ## Values - `HasNonalphanum = 0x1`: The word contains a character outside A-Z, a-z, 0-9. - `HasLetter = 0x2`: The word contains a character in A-Z or a-z. - `HasUppercase = 0x4`: The word contains a character in A-Z. - `HasDigit = 0x8`: One or more characters are digits. - `HasPunctuation = 0x10`: One or more characters are punctuation. Use the leading/trailing flags to determine position. - `HasHyphen = 0x20`: The word contains a hyphen. - `HasSoftHyphen = 0x40`: The word contains a soft hyphen. - `HasLigature = 0x80`: The word contains a ligature. - `HasLeadingPunctuation = 0x100`: The first character is a punctuation mark. - `HasTrailingPunctuation = 0x200`: The last character is a punctuation mark. - `HasUnmappedCharacters = 0x400`: One or more characters cannot be represented in the output font's encoding. - `AdjacentToSpace = 0x800`: The character following the word is a space (explicit or implicit from a drawing-point move). - `Rotated = 0x1000`: Writing direction is not a multiple of 90 degrees, or the bounding box is skewed; use the word's quads for highlight regions. - `VerticalFlow = 0x2000`: Writing direction is 90 or 180 degrees, ignoring the page rotation entry. Set on words rendered horizontally on a 90°-rotated page. - `WordBreak = 0x4000`: The word is followed by a word-break character (e.g. a space). - `LastWordOnLine = 0x8000`: The word ends a text line (e.g. is followed by a line break). In tagged PDFs this follows the document's tags; for visual line breaks use IsLastWordInRegion. --- # WordFinder Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WordFinder ```cpp class WordFinder ``` **Namespace:** `datalogics_interface` ## Description A class used to extract words from a document. **Uses types:** [`Word`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Word.md), [`WordFinderVersion`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WordFinderVersion.md) ## Constructors ### WordFinder ```cpp datalogics_interface::WordFinder::WordFinder(Document &doc, WordFinderVersion version, const WordFinderConfig &config) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): document in which to find words - `version` ([`WordFinderVersion`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WordFinderVersion.md)): algorithm version to use - `config` ([`const WordFinderConfig &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WordFinderConfig.md)): configuration for this word finder Construct a WordFinder with a specific configuration. Create a word finder ### WordFinder ```cpp datalogics_interface::WordFinder::WordFinder(Document &doc, WordFinderVersion version=WordFinderVersion::Latest) ``` *constructor* **Parameters** - `doc` ([`Document &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Document.md)): document in which to find words - `version` ([`WordFinderVersion`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WordFinderVersion.md)): algorithm version to use Create a word finder ### WordFinder ```cpp datalogics_interface::WordFinder::WordFinder(WordFinder &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`WordFinder &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WordFinder.md)) ### ~WordFinder ```cpp datalogics_interface::WordFinder::~WordFinder() ``` *destructor* ## Methods ### enum_words ```cpp bool datalogics_interface::WordFinder::enum_words(int page_num, WordCallback callback) ``` **Parameters** - `page_num` (`int`): The page number from which to extract words. Pass AllPages to sequentially process all pages in the document. - `callback` (`WordCallback`): A user-supplied callback to call once for each word found. Enumeration halts if wordProc returns false. **Returns:** `bool` true if enumeration was successfully completed, false if enumeration was terminated because wordProc returned false. Extracts words, one at a time, from the specified page or the entire document. It calls a user-supplied procedure once for each word found. Only words within or partially within the page's crop box (see Page::CropBox) are enumerated. Words outside the crop box are skipped. Word objects passed to wordProc become invalid once the call to EnumWords returns, or if the page number changes between calls to the WordProc. ### get_visible_word_list ```cpp std::vector< Word > datalogics_interface::WordFinder::get_visible_word_list(int page_num) ``` **Parameters** - `page_num` (`int`): the page number for which to get the list of words. **Returns:** [`std::vector< Word >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Word.md) a list of x, y sorted words on the specified page. Finds all Visible words on the specified page and returns a list containing the words. The words are sorted by their x- and y-coordinates on the page. NOTE: Only words visible according to the Optional Content are returned. ### get_word_list ```cpp std::vector< Word > datalogics_interface::WordFinder::get_word_list(int page_num) ``` **Parameters** - `page_num` (`int`): the page number for which to get the list of words. **Returns:** [`std::vector< Word >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Word.md) a list of x, y sorted words on the specified page. Finds all words on the specified page and returns a list containing the words. The words are sorted by their x- and y-coordinates on the page. NOTE: All words found on the page are returned, even if they are currently invisible as specified by the Optional Content. ### operator= ```cpp WordFinder & datalogics_interface::WordFinder::operator=(WordFinder &&) noexcept ``` **Parameters** - (unnamed) ([`WordFinder &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WordFinder.md)) **Returns:** [`WordFinder &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WordFinder.md) --- # WordFinderConfig Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WordFinderConfig ```cpp class WordFinderConfig ``` **Namespace:** `datalogics_interface` ## Description Wraps the key fields from PDWordFinderConfigRec to configure word extraction. ## Constructors ### WordFinderConfig ```cpp datalogics_interface::WordFinderConfig::WordFinderConfig() ``` *constructor* Creates a WordFinderConfig with all options set to false (default behavior). ### WordFinderConfig ```cpp datalogics_interface::WordFinderConfig::WordFinderConfig(WordFinderConfig &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`WordFinderConfig &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WordFinderConfig.md)) ### ~WordFinderConfig ```cpp datalogics_interface::WordFinderConfig::~WordFinderConfig() ``` *destructor* ## Methods ### get_disable_char_reordering ```cpp bool datalogics_interface::WordFinderConfig::get_disable_char_reordering() const ``` **Returns:** `bool` When true, disables character reordering. ### get_disable_tagged_pdf ```cpp bool datalogics_interface::WordFinderConfig::get_disable_tagged_pdf() const ``` **Returns:** `bool` When true, disables tagged PDF support. ### get_ignore_char_gaps ```cpp bool datalogics_interface::WordFinderConfig::get_ignore_char_gaps() const ``` **Returns:** `bool` When true, disables converting large character gaps to spaces. ### get_ignore_line_gaps ```cpp bool datalogics_interface::WordFinderConfig::get_ignore_line_gaps() const ``` **Returns:** `bool` When true, disables treating vertical movements as line breaks. ### get_no_annotations ```cpp bool datalogics_interface::WordFinderConfig::get_no_annotations() const ``` **Returns:** `bool` When true, disables extracting text from annotations. ### get_no_encoding_guess ```cpp bool datalogics_interface::WordFinderConfig::get_no_encoding_guess() const ``` **Returns:** `bool` When true, disables guessing encoding of fonts with unknown encoding. ### get_no_ext_char_offset ```cpp bool datalogics_interface::WordFinderConfig::get_no_ext_char_offset() const ``` **Returns:** `bool` When true, disables extended character offset generation. ### get_no_hyphen_detection ```cpp bool datalogics_interface::WordFinderConfig::get_no_hyphen_detection() const ``` **Returns:** `bool` When true, disables soft hyphen detection in non-tagged PDF. ### get_no_ligature_expansion ```cpp bool datalogics_interface::WordFinderConfig::get_no_ligature_expansion() const ``` **Returns:** `bool` When true, disables default ligature expansion. ### get_no_skewed_quads ```cpp bool datalogics_interface::WordFinderConfig::get_no_skewed_quads() const ``` **Returns:** `bool` When true, disables quad-per-character for skewed words. ### get_no_style_info ```cpp bool datalogics_interface::WordFinderConfig::get_no_style_info() const ``` **Returns:** `bool` When true, disables character style information generation. ### get_no_text_render_mode_3 ```cpp bool datalogics_interface::WordFinderConfig::get_no_text_render_mode_3() const ``` **Returns:** `bool` When true, disables extracting invisible text (render mode 3). ### get_no_xy_sort ```cpp bool datalogics_interface::WordFinderConfig::get_no_xy_sort() const ``` **Returns:** `bool` When true, disables generating an XY-ordered word list. ### get_precise_quad ```cpp bool datalogics_interface::WordFinderConfig::get_precise_quad() const ``` **Returns:** `bool` When true, bounding boxes are based on actual glyph bounding boxes. ### get_preserve_redundant_chars ```cpp bool datalogics_interface::WordFinderConfig::get_preserve_redundant_chars() const ``` **Returns:** `bool` When true, preserves redundant (overlapping) characters. ### get_preserve_spaces ```cpp bool datalogics_interface::WordFinderConfig::get_preserve_spaces() const ``` **Returns:** `bool` When true, preserves space characters during word breaking. ### get_trust_nb_space ```cpp bool datalogics_interface::WordFinderConfig::get_trust_nb_space() const ``` **Returns:** `bool` When true, treats non-breaking spaces as regular spaces. ### get_unknown_to_std_enc ```cpp bool datalogics_interface::WordFinderConfig::get_unknown_to_std_enc() const ``` **Returns:** `bool` When true, assumes unknown encoding fonts are Standard Roman. ### operator= ```cpp WordFinderConfig & datalogics_interface::WordFinderConfig::operator=(WordFinderConfig &&) noexcept ``` **Parameters** - (unnamed) ([`WordFinderConfig &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WordFinderConfig.md)) **Returns:** [`WordFinderConfig &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/WordFinderConfig.md) ### set_disable_char_reordering ```cpp void datalogics_interface::WordFinderConfig::set_disable_char_reordering(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, disables character reordering. ### set_disable_tagged_pdf ```cpp void datalogics_interface::WordFinderConfig::set_disable_tagged_pdf(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, disables tagged PDF support. ### set_ignore_char_gaps ```cpp void datalogics_interface::WordFinderConfig::set_ignore_char_gaps(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, disables converting large character gaps to spaces. ### set_ignore_line_gaps ```cpp void datalogics_interface::WordFinderConfig::set_ignore_line_gaps(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, disables treating vertical movements as line breaks. ### set_no_annotations ```cpp void datalogics_interface::WordFinderConfig::set_no_annotations(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, disables extracting text from annotations. ### set_no_encoding_guess ```cpp void datalogics_interface::WordFinderConfig::set_no_encoding_guess(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, disables guessing encoding of fonts with unknown encoding. ### set_no_ext_char_offset ```cpp void datalogics_interface::WordFinderConfig::set_no_ext_char_offset(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, disables extended character offset generation. ### set_no_hyphen_detection ```cpp void datalogics_interface::WordFinderConfig::set_no_hyphen_detection(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, disables soft hyphen detection in non-tagged PDF. ### set_no_ligature_expansion ```cpp void datalogics_interface::WordFinderConfig::set_no_ligature_expansion(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, disables default ligature expansion. ### set_no_skewed_quads ```cpp void datalogics_interface::WordFinderConfig::set_no_skewed_quads(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, disables quad-per-character for skewed words. ### set_no_style_info ```cpp void datalogics_interface::WordFinderConfig::set_no_style_info(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, disables character style information generation. ### set_no_text_render_mode_3 ```cpp void datalogics_interface::WordFinderConfig::set_no_text_render_mode_3(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, disables extracting invisible text (render mode 3). ### set_no_xy_sort ```cpp void datalogics_interface::WordFinderConfig::set_no_xy_sort(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, disables generating an XY-ordered word list. ### set_precise_quad ```cpp void datalogics_interface::WordFinderConfig::set_precise_quad(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, bounding boxes are based on actual glyph bounding boxes. ### set_preserve_redundant_chars ```cpp void datalogics_interface::WordFinderConfig::set_preserve_redundant_chars(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, preserves redundant (overlapping) characters. ### set_preserve_spaces ```cpp void datalogics_interface::WordFinderConfig::set_preserve_spaces(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, preserves space characters during word breaking. ### set_trust_nb_space ```cpp void datalogics_interface::WordFinderConfig::set_trust_nb_space(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, treats non-breaking spaces as regular spaces. ### set_unknown_to_std_enc ```cpp void datalogics_interface::WordFinderConfig::set_unknown_to_std_enc(bool value) ``` **Parameters** - `value` (`bool`) **Returns:** `void` When true, assumes unknown encoding fonts are Standard Roman. --- # WordFinderVersion Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WordFinderVersion **Namespace:** `datalogics_interface` ## Description This refers to versions of the WordFinder algorithm. WordFinder extracts words from a PDF file and enumerates the words on a single page or on all of the pages in the document. ## Values - `Latest = 0`: Use the latest available version. - `Version2 = 2`: The version used for Acrobat 3.x and 4.x. - `Version3 = 3`: For Acrobat 5.0 with accessibility disabled. - `Version4 = 4`: For Acrobat 5.0 with accessibility enabled. --- # WritingMode Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/WritingMode **Namespace:** `datalogics_interface` ## Description Writing direction for text. ## Values - `Horizontal = 0`: Text is written horizontally. - `Vertical = 1`: Text is written vertically. --- # XFAFormExportType Enum Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/XFAFormExportType **Namespace:** `datalogics_interface` ## Description XFA Form Data Export types. ## Values - `XML = 1`: XML (Extensible Markup Language) representing form field data. - `XFD = 2`: XFD (Extensible Forms Description language) representing form field data. - `XDP = 3`: XDP (XML Data Package) representing form field data. --- # XPSConvertParams Class Source: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/XPSConvertParams ```cpp class XPSConvertParams ``` **Namespace:** `datalogics_interface` ## Description Class that works with XPS conversion parameters. The XML Paper Specification (XPS) is a standard document format that Microsoft created in 2006 as an alternative to the PDF format. The XPS format is intended to be a simple but secure file format, without embedded images or video clips, and easy to share and print. NOTE: This class is only available on Windows or Linux. ## Constructors ### XPSConvertParams ```cpp datalogics_interface::XPSConvertParams::XPSConvertParams() ``` *constructor* Set up default parameters for XPS conversion. ### XPSConvertParams ```cpp datalogics_interface::XPSConvertParams::XPSConvertParams(const std::string &settings_file) ``` *constructor* **Parameters** - `settings_file` (`const std::string &`) Set up default parameters for XPS conversion. ### XPSConvertParams ```cpp datalogics_interface::XPSConvertParams::XPSConvertParams(const XPSConvertParams &other) ``` *constructor* **Parameters** - `other` ([`const XPSConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/XPSConvertParams.md)) Copy constructor. ### XPSConvertParams ```cpp datalogics_interface::XPSConvertParams::XPSConvertParams(XPSConvertParams &&) noexcept ``` *constructor* **Parameters** - (unnamed) ([`XPSConvertParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/XPSConvertParams.md)) ### ~XPSConvertParams ```cpp datalogics_interface::XPSConvertParams::~XPSConvertParams() ``` *destructor* ## Methods ### get_settings_file ```cpp std::string datalogics_interface::XPSConvertParams::get_settings_file() const ``` **Returns:** `std::string` The file system path to the .joboptions file. Gets the path to the .joboptions settings file used for XPS conversion. By default, the Standard.joboptions file located in the Resources directory is used. ### operator= ```cpp XPSConvertParams & datalogics_interface::XPSConvertParams::operator=(const XPSConvertParams &other) ``` **Parameters** - `other` ([`const XPSConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/XPSConvertParams.md)) **Returns:** [`XPSConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/XPSConvertParams.md) Copy assignment. ### operator= ```cpp XPSConvertParams & datalogics_interface::XPSConvertParams::operator=(XPSConvertParams &&) noexcept ``` **Parameters** - (unnamed) ([`XPSConvertParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/XPSConvertParams.md)) **Returns:** [`XPSConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/XPSConvertParams.md) ### set_settings_file ```cpp void datalogics_interface::XPSConvertParams::set_settings_file(const std::string &path) ``` **Parameters** - `path` (`const std::string &`): The file system path to the .joboptions file. **Returns:** `void` Sets the path to the .joboptions settings file used for XPS conversion. By default, the Standard.joboptions file located in the Resources directory is used. The default file will be used if the specified file is not found.