CFx SDK Documentation 2024 SP0
|
#include <PdfPublishPage.h>
Public Member Functions | |
ODRX_DECLARE_MEMBERS (OdPage) | |
ODRX_HEAP_OPERATORS () | |
virtual | ~OdPage () |
void | setFormat (Page::Format format) |
void | setOrientation (Page::Orientation orientation) |
void | setPaperSize (const Page::PaperUnits units, const double width, const double height) |
void | addAnnotation (const OdAnnotationPtr &annotation, const OdRect &location) |
void | addText (const OdTextPtr &text, const OdRect &location) |
void | addImage (const OdImagePtr &image, const OdRect &location) |
void | addTable (const OdTablePtr &table, const OdRect &location) |
void | addLink (const OdLinkPtr &link, const OdRect &location) |
void | addButton (const OdButtonPtr &button, const OdRect &location) |
void | addTextField (const OdTextFieldPtr &text_field, const OdRect &location) |
void | addSlideTable (const OdSlideTablePtr &slide_table, const OdRect &location) |
void | addCheckBox (const OdCheckBoxPtr &check_box, const OdRect &location) |
void | addRadioButton (const OdRadioButtonPtr &radio_button, const OdRect &location) |
void | addListBox (const OdListBoxPtr &list_box, const OdRect &location) |
void | addDropDownList (const OdDropDownListPtr &drop_down_list, const OdRect &location) |
void | addSignatureField (const OdSignatureFieldPtr &signature_field, const OdRect &location) |
void | add2dGeometry (const Od2dGeometryReferencePtr &geom, const OdRect &location) |
void | add2dGeometry (const Od2dGeometryReferencePtr &geom) |
void | addCADReference (const OdCADReferencePtr &CADreferense, const OdRect &location) |
void | addCADReference (const OdCADReferencePtr &CADreferense) |
void | addJavaScriptActionByField (const OdString &field_name, const OdString &source, const Action::Type action_type, const Source::Type source_type=Source::kCode) |
void | getFormat (Page::Format &format) const |
void | getOrientation (Page::Orientation &orientation) const |
void | getPaperSize (const Page::PaperUnits units, double &width, double &height) const |
void | getAnnotations (OdAnnotationPtrArray &annotations, OdRectArray &locations) const |
void | getTexts (OdTextPtrArray &texts, OdRectArray &locations) const |
void | getImages (OdImagePtrArray &images, OdRectArray &locations) const |
void | getTables (OdTablePtrArray &tables, OdRectArray &locations) const |
void | getLinks (OdLinkPtrArray &links, OdRectArray &locations) const |
void | getButtons (OdButtonPtrArray &buttons, OdRectArray &locations) const |
void | getCheckBoxes (OdCheckBoxPtrArray &check_boxes, OdRectArray &locations) const |
void | getRadioButtons (OdRadioButtonPtrArray &radio_buttons, OdRectArray &locations) const |
void | getListBoxes (OdListBoxPtrArray &list_boxes, OdRectArray &locations) const |
void | getDropDownLists (OdDropDownListPtrArray &drop_down_lists, OdRectArray &locations) const |
void | getSignatureFields (OdSignatureFieldPtrArray &signature_fields, OdRectArray &locations) const |
void | getTextFields (OdTextFieldPtrArray &text_fields, OdRectArray &locations) const |
void | getSlideTables (OdSlideTablePtrArray &slide_tables, OdRectArray &locations) const |
void | getJavaScriptActionsByField (const OdString &field_name, OdStringArray &sources, OdActionTypeArray &action_types, OdSourceTypeArray &source_types) const |
void | get2dGeoms (Od2dGeometryReferencePtrArray &geoms, OdRectArray &locations) const |
void | getCADReferences (OdCADReferencePtrArray &CADreferenses, OdRectArray &locations) const |
Public Member Functions inherited from OdPdfPublish::OdObject | |
ODRX_DECLARE_MEMBERS (OdObject) | |
ODRX_HEAP_OPERATORS () | |
virtual | ~OdObject () |
virtual bool | isEmpty () const |
virtual bool | isValid () const |
virtual void | clear () |
Public Member Functions inherited from OdRxObject | |
ODRX_HEAP_OPERATORS () | |
OdRxObject () | |
virtual | ~OdRxObject () |
virtual OdRxObject * | queryX (const OdRxClass *pClass) const |
virtual OdRxObject * | x (const OdRxClass *pClass) const |
virtual OdRxClass * | isA () const |
virtual void | addRef ()=0 |
virtual void | release ()=0 |
virtual long | numRefs () const |
bool | isKindOf (const OdRxClass *pClass) const |
virtual OdRxObjectPtr | clone () const |
virtual void | copyFrom (const OdRxObject *pSource) |
virtual OdRx::Ordering | comparedTo (const OdRxObject *pOther) const |
virtual bool | isEqualTo (const OdRxObject *pOther) const |
Protected Member Functions | |
OdPage () | |
Protected Member Functions inherited from OdPdfPublish::OdObject | |
OdObject (OdPublishObjectImpl *pImpl) | |
Additional Inherited Members | |
Static Public Member Functions inherited from OdRxObject | |
static OdRxObjectPtr | cast (const OdRxObject *pointer) |
static OdRxClass * | desc () |
This class implements a page object for a .pdf document created with Publish SDK. A page is determined by two properties: format (size of its sides) and orientation (which side aligns horizontally) and can contain a set of different controls and fields (such as <link OdPdfPublish::OdText, text labels>, <link OdPdfPublish::OdAnnotation, annotations>, <link OdPdfPublish::OdTextField, text fields>, <link OdPdfPublish::OdButton, buttons>, <link OdPdfPublish::OdLink, links>, etc.).
Definition at line 65 of file PdfPublishPage.h.
|
protected |
|
virtual |
Destroys a page object.
void OdPdfPublish::OdPage::add2dGeometry | ( | const Od2dGeometryReferencePtr & | geom | ) |
Adds a two-dimensional geometry reference to the page.
geom | [in] A smart pointer to the 2D geometry reference to be added. |
void OdPdfPublish::OdPage::add2dGeometry | ( | const Od2dGeometryReferencePtr & | geom, |
const OdRect & | location | ||
) |
Adds a two-dimensional geometry reference to the page.
geom | [in] A smart pointer to the 2D geometry reference to be added. |
location | [in] A location where to place the geometry. |
void OdPdfPublish::OdPage::addAnnotation | ( | const OdAnnotationPtr & | annotation, |
const OdRect & | location | ||
) |
Adds a new <link OdPdfPublish::OdAnnotation, annotation> to the page.
annotation | [in] A smart pointer to an annotation object that should be added. |
location | [in] A rectangle that specifies the location of an added annotation within the page. It determines where the annotation will be placed on the page. |
Adds a <link OdPdfPublish::OdButton, button control> to the page.
button | [in] A smart pointer to a button control that should be added. |
location | [in] A rectangle that specifies the location of an added button control within the page. It determines where the button control will be placed on the page. |
void OdPdfPublish::OdPage::addCADReference | ( | const OdCADReferencePtr & | CADreferense | ) |
Adds a CAD reference object to the page.
CADreferense | [in] A smart pointer to a CAD reference object. |
void OdPdfPublish::OdPage::addCADReference | ( | const OdCADReferencePtr & | CADreferense, |
const OdRect & | location | ||
) |
Adds a CAD reference object to the page.
CADreferense | [in] A smart pointer to a CAD reference object. |
location | [in] A rectangle that specifies the page area where the CAD reference should be added. |
Adds a <link OdPdfPublish::OdCheckBox, checkbox> to the page.
check_box | [in] A smart pointer to a checkbox object that should be added. |
location | [in] A rectangle that specifies the location of an added checkbox within the page. It determines where the checkbox is placed on the page. |
void OdPdfPublish::OdPage::addDropDownList | ( | const OdDropDownListPtr & | drop_down_list, |
const OdRect & | location | ||
) |
Adds a <link OdPdfPublish::OdDropDownList, drop-down list> (combo box) to the page.
drop_down_list | [in] A smart pointer to a drop-down list object that should be added. |
location | [in] A rectangle that specifies the location of an added drop-down list within the page. It determines where the drop-down list is placed on the page. |
Adds an <link OdPdfPublish::OdImage, image> to the page.
image | [in] A smart pointer to an image object that should be added. |
location | [in] A rectangle that specifies the location of an added image within the page. It determines where the image will be placed on the page. |
void OdPdfPublish::OdPage::addJavaScriptActionByField | ( | const OdString & | field_name, |
const OdString & | source, | ||
const Action::Type | action_type, | ||
const Source::Type | source_type = Source::kCode |
||
) |
Adds a JavaScript scenario for a specified field on the page.
field_name | [in] A field name to add JavaScript scenario. |
source | [in] JavaScript scenario source text. |
action_type | [in] An action type that triggers the JavaScript scenario. |
source_type | [in] A JavaScript scenario source type. |
Adds a <link OdPdfPublish::OdLink, link> to the page.
link | [in] A smart pointer to a link object that should be added. |
location | [in] A rectangle that specifies the location of an added link within the page. It determines where the link will be placed on the page. |
Adds a <link OdPdfPublish::OdListBox, list box> to the page.
list_box | [in] A smart pointer to a list box object that should be added. |
location | [in] A rectangle that specifies the location of an added list box within the page. It determines where the list box is placed on the page. |
void OdPdfPublish::OdPage::addRadioButton | ( | const OdRadioButtonPtr & | radio_button, |
const OdRect & | location | ||
) |
Adds a <link OdPdfPublish::OdRadioButton, radio button> to the page.
radio_button | [in] A smart pointer to a radio button object that should be added. |
location | [in] A rectangle that specifies the location of an added radio button within the page. It determines where the radio button is placed on the page. |
void OdPdfPublish::OdPage::addSignatureField | ( | const OdSignatureFieldPtr & | signature_field, |
const OdRect & | location | ||
) |
Adds a <link OdPdfPublish::OdSignatureField, signature field> to the page.
signature_field | [in] A smart pointer to a signature field object that should be added. |
location | [in] A rectangle that specifies the location of an added signature field within the page. It determines where the signature field is placed on the page. |
void OdPdfPublish::OdPage::addSlideTable | ( | const OdSlideTablePtr & | slide_table, |
const OdRect & | location | ||
) |
Adds a <link OdPdfPublish::OdSlideTable, table with slides> to the page.
slide_table | [in] A smart pointer to a slide table object that should be added. |
location | [in] A rectangle that specifies the location of an added slide table within the page. It determines where the slide table is placed on the page. |
Adds a <link OdPdfPublish::OdTable, table> to the page.
table | [in] A smart pointer to a table object that should be added. |
location | [in] A rectangle that specifies the location of an added table within the page. It determines where the table will be placed on the page. |
Adds a <link OdPdfPublish::OdText, text> label to the page.
text | [in] A smart pointer to a text label that should be added. |
location | [in] A rectangle that specifies the location of an added text label within the page. It determines where the text will be placed on the page. |
void OdPdfPublish::OdPage::addTextField | ( | const OdTextFieldPtr & | text_field, |
const OdRect & | location | ||
) |
Adds a <link OdPdfPublish::OdTextField, text field> to the page.
text_field | [in] A smart pointer to a text field object that should be added. |
location | [in] A rectangle that specifies the location of an added text field within the page. It determines where the text field will be placed on the page. |
void OdPdfPublish::OdPage::get2dGeoms | ( | Od2dGeometryReferencePtrArray & | geoms, |
OdRectArray & | locations | ||
) | const |
Returns two-dimensional geometry references previously added to the page. The method fills two passed arrays with geometry references and their locations, then returns these arrays to a calling subroutine.
geoms | [in] A placeholder for geometry references array. |
locations | [in] A placeholder for geometry locations array. |
void OdPdfPublish::OdPage::getAnnotations | ( | OdAnnotationPtrArray & | annotations, |
OdRectArray & | locations | ||
) | const |
Returns all <link OdPdfPublish::OdAnnotation, annotations> that the page contains and their locations. The method fills two passed arrays with annotation objects and their locations, then returns these arrays to a calling subroutine.
annotations | [out] A placeholder for the page annotations array. |
locations | [out] A placeholder for the annotation locations array. |
void OdPdfPublish::OdPage::getButtons | ( | OdButtonPtrArray & | buttons, |
OdRectArray & | locations | ||
) | const |
Returns all <link OdPdfPublish::OdButton, buttons> that the page contains and their locations. The method fills two passed arrays with button objects and their locations, then returns these arrays to a calling subroutine.
buttons | [out] A placeholder for the page buttons array. |
locations | [out] A placeholder for the link locations array. |
void OdPdfPublish::OdPage::getCADReferences | ( | OdCADReferencePtrArray & | CADreferenses, |
OdRectArray & | locations | ||
) | const |
Returns all CAD references previously added to the page. The method fills two passed arrays with CAD references and their locations, then returns these arrays to a calling subroutine.
CADreferenses | [in] A placeholder for CAD references array. |
locations | [in] A placeholder for geometry locations array. |
void OdPdfPublish::OdPage::getCheckBoxes | ( | OdCheckBoxPtrArray & | check_boxes, |
OdRectArray & | locations | ||
) | const |
Returns all <link OdPdfPublish::OdCheckBox, checkboxes> that the page contains and their locations. The method fills two passed arrays with checkbox objects and their locations, then returns these arrays to a calling subroutine.
check_boxes | [out] A placeholder for the page checkboxes array. |
locations | [out] A placeholder for the checkbox locations array. |
void OdPdfPublish::OdPage::getDropDownLists | ( | OdDropDownListPtrArray & | drop_down_lists, |
OdRectArray & | locations | ||
) | const |
Returns all <link OdPdfPublish::OdDropDownList, drop-down lists> that the page contains and their locations. The method fills two passed arrays with drop-down list objects and their locations, then returns these arrays to a calling subroutine.
drop_down_lists | [out] A placeholder for the page drop-down lists array. |
locations | [out] A placeholder for the drop-down list locations array. |
<link OdPdfPublish::OdDropDownList, OdDropDownList class>.
void OdPdfPublish::OdPage::getFormat | ( | Page::Format & | format | ) | const |
Returns the current page format value.
format | [out] A placeholder for the format value. The format value is stored here to be returned to the calling subroutine. |
void OdPdfPublish::OdPage::getImages | ( | OdImagePtrArray & | images, |
OdRectArray & | locations | ||
) | const |
Returns all <link OdPdfPublish::OdImage, images> that the page contains and their locations. The method fills two passed arrays with image objects and their locations, then returns these arrays to a calling subroutine.
images | [out] A placeholder for the page images array. |
locations | [out] A placeholder for the image locations array. |
void OdPdfPublish::OdPage::getJavaScriptActionsByField | ( | const OdString & | field_name, |
OdStringArray & | sources, | ||
OdActionTypeArray & | action_types, | ||
OdSourceTypeArray & | source_types | ||
) | const |
Returns all JavaScript scenarios previously added to the page's field. The method fills passed arrays with scenario source text, action types and source types, then returns these arrays to a calling subroutine.
field_name | [in] A field name. |
sources | [in] A placeholder for JavaScript scenario source text. |
action_types | [in] An placeholder for action types. |
source_types | [in] An placeholder for source types. |
void OdPdfPublish::OdPage::getLinks | ( | OdLinkPtrArray & | links, |
OdRectArray & | locations | ||
) | const |
Returns all <link OdPdfPublish::OdLink, links> that the page contains and their locations. The method fills two passed arrays with link objects and their locations, then returns these arrays to a calling subroutine.
links | [out] A placeholder for the page links array. |
locations | [out] A placeholder for the link locations array. |
void OdPdfPublish::OdPage::getListBoxes | ( | OdListBoxPtrArray & | list_boxes, |
OdRectArray & | locations | ||
) | const |
Returns all <link OdPdfPublish::OdListBox, list boxes> that the page contains and their locations. The method fills two passed arrays with list box objects and their locations, then returns these arrays to a calling subroutine.
list_boxes | [out] A placeholder for the page list boxes array. |
locations | [out] A placeholder for the list box locations array. |
void OdPdfPublish::OdPage::getOrientation | ( | Page::Orientation & | orientation | ) | const |
Returns the current page orientation value.
orientation | [out] A placeholder for the orientation value. The orientation value is stored here to be returned to the calling subroutine. |
void OdPdfPublish::OdPage::getPaperSize | ( | const Page::PaperUnits | units, |
double & | width, | ||
double & | height | ||
) | const |
Returns the current page size.
units | [in] Paper size units. |
width | [out] A placeholder for the paper width value. |
height | [out] A placeholder for the paper height value. |
void OdPdfPublish::OdPage::getRadioButtons | ( | OdRadioButtonPtrArray & | radio_buttons, |
OdRectArray & | locations | ||
) | const |
Returns all <link OdPdfPublish::OdRadioButton, radio buttons> that the page contains and their locations. The method fills two passed arrays with radio button objects and their locations, then returns these arrays to a calling subroutine.
radio_buttons | [out] A placeholder for the page radio buttons array. |
locations | [out] A placeholder for the radio button locations array. |
void OdPdfPublish::OdPage::getSignatureFields | ( | OdSignatureFieldPtrArray & | signature_fields, |
OdRectArray & | locations | ||
) | const |
Returns all <link OdPdfPublish::OdSignatureField, signature fields> that the page contains and their locations. The method fills two passed arrays with signature field objects and their locations, then returns these arrays to a calling subroutine.
signature_fields | [out] A placeholder for the page signature fields array. |
locations | [out] A placeholder for the signature field locations array. |
void OdPdfPublish::OdPage::getSlideTables | ( | OdSlideTablePtrArray & | slide_tables, |
OdRectArray & | locations | ||
) | const |
Returns all <link OdPdfPublish::OdSlideTable, slide tables>, which the page contains, and their locations. The method fills two passed arrays with slide table objects and their locations, then returns these arrays to a calling subroutine.
slide_tables | [out] A placeholder for the page slide tables array. |
locations | [out] A placeholder for the slide table locations array. |
void OdPdfPublish::OdPage::getTables | ( | OdTablePtrArray & | tables, |
OdRectArray & | locations | ||
) | const |
Returns all <link OdPdfPublish::OdTable, tables> that the page contains and their locations. The method fills two passed arrays with table objects and their locations, then returns these arrays to a calling subroutine.
tables | [out] A placeholder for the page tables array. |
locations | [out] A placeholder for the table locations array. |
<link OdPdfPublish::OdTable, OdTable class>.
void OdPdfPublish::OdPage::getTextFields | ( | OdTextFieldPtrArray & | text_fields, |
OdRectArray & | locations | ||
) | const |
Returns all <link OdPdfPublish::OdTextField, text fields>, which the page contains, and their locations. The method fills two passed arrays with text field objects and their locations, then returns these arrays to a calling subroutine.
text_fields | [out] A placeholder for the page text fields array. |
locations | [out] A placeholder for the text field locations array. |
void OdPdfPublish::OdPage::getTexts | ( | OdTextPtrArray & | texts, |
OdRectArray & | locations | ||
) | const |
Returns all <link OdPdfPublish::OdText, text labels> that the page contains and their locations. The method fills two passed arrays with text label objects and their locations, then returns these arrays to a calling subroutine.
texts | [out] A placeholder for the page text labels array. |
locations | [out] A placeholder for the text label locations array. |
OdPdfPublish::OdPage::ODRX_DECLARE_MEMBERS | ( | OdPage | ) |
OdPdfPublish::OdPage::ODRX_HEAP_OPERATORS | ( | ) |
void OdPdfPublish::OdPage::setFormat | ( | Page::Format | format | ) |
Sets the page format.
format | [in] A new page format value. |
void OdPdfPublish::OdPage::setOrientation | ( | Page::Orientation | orientation | ) |
Sets the page orientation.
orientation | [in] A new page orientation value. |
void OdPdfPublish::OdPage::setPaperSize | ( | const Page::PaperUnits | units, |
const double | width, | ||
const double | height | ||
) |
Sets a new page size.
units | [in] Paper size units. |
width | [out] A paper width value. |
height | [out] A paper height value. |