CFx SDK Documentation  2022 SP0
Public Member Functions | List of all members
OdPdfPublish::OdDocument Class Reference

#include <PdfPublishDocument.h>

Inheritance diagram for OdPdfPublish::OdDocument:
OdPdfPublish::OdObject OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdDocument)
 
 ODRX_HEAP_OPERATORS ()
 
 OdDocument ()
 
virtual ~OdDocument ()
 
void setInformation (const OdString &title, const OdString &author, const OdString &subject, const OdString &creator)
 
void addJavaScript (const OdString &name, const OdString &source)
 
void addIconImage (const OdString &name, const OdImagePtr &image)
 
void addPage (const OdPagePtr &page)
 
void getInformation (OdString &title, OdString &author, OdString &subject, OdString &creator) const
 
void getJavaScripts (OdStringArray &names, OdStringArray &sources) const
 
void getIconImages (OdStringArray &names, OdImagePtrArray &images) const
 
void getPages (OdPagePtrArray &pages) const
 
void setHostServices (OdDbBaseHostAppServices *pHostApp)
 
OdDbBaseHostAppServicesappServices () 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 OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () 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
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 
- Protected Member Functions inherited from OdPdfPublish::OdObject
 OdObject (OdPublishObjectImpl *pImpl)
 

Detailed Description

This class implements working with a .pdf document created with Teigha Publish. Document is a container for other elements and controls (such as <link OdPdfPublish::OdPage, pages>, <link OdPdfPublish::OdImage, images>, <link OdPdfPublish::OdLink, links>, <link OdPdfPublish::OdAnnotation, annotations> and so on).

Definition at line 50 of file PdfPublishDocument.h.

Constructor & Destructor Documentation

◆ OdDocument()

OdPdfPublish::OdDocument::OdDocument ( )

Creates a Teigha Publish document.

◆ ~OdDocument()

virtual OdPdfPublish::OdDocument::~OdDocument ( )
virtual

Destroys the Teigha Publish document.

Member Function Documentation

◆ addIconImage()

void OdPdfPublish::OdDocument::addIconImage ( const OdString name,
const OdImagePtr &  image 
)

Adds a new icon <link OdPdfPublish::OdImage, image> to the Teigha Publish document.

Parameters
name[in] A name of an icon image.
image[in] An image object.
See also
<link OdPdfPublish::OdImage, OdImage class>.

◆ addJavaScript()

void OdPdfPublish::OdDocument::addJavaScript ( const OdString name,
const OdString source 
)

Adds a new JavaScript scenario to the Teigha Publish document.

Parameters
name[in] A name of a JavaScript scenario.
source[in] A source code text of a JavaScript scenario.

◆ addPage()

void OdPdfPublish::OdDocument::addPage ( const OdPagePtr &  page)

Adds a new <link OdPdfPublish::OdPage, page> to the Teigha Publish document.

Parameters
page[in] A smart pointer to an OdPage object that should be added.
See also
<link OdPdfPublish::OdPage, OdPage class>.

◆ appServices()

OdDbBaseHostAppServices* OdPdfPublish::OdDocument::appServices ( ) const

◆ getIconImages()

void OdPdfPublish::OdDocument::getIconImages ( OdStringArray names,
OdImagePtrArray &  images 
) const

Returns a collection of icon <link OdPdfPublish::OdImage, images> from the Teigha Publish document. This method fills passed string array and smart pointer array with image names and pointers to image objects, then returns them to a calling subroutine.

Parameters
names[out] A placeholder for icon images names.
images[out] A placeholder for an array of smart pointers, which point to the document icon images.
See also
<link OdPdfPublish::OdImage, OdImage class>.

◆ getInformation()

void OdPdfPublish::OdDocument::getInformation ( OdString title,
OdString author,
OdString subject,
OdString creator 
) const

Returns current common information about the Teigha Publish document. This method fills passed strings and returns them to a calling subroutine.

Parameters
title[out] A placeholder for the document title.
author[out] A placeholder for the document author.
subject[out] A placeholder for the document subject.
creator[out] A A placeholder for the information about the document creator.

◆ getJavaScripts()

void OdPdfPublish::OdDocument::getJavaScripts ( OdStringArray names,
OdStringArray sources 
) const

Returns the collection of JavaScript scenarios encapsulated in the Teigha Publish document. This method fills passed string arrays with names and source code texts, then returns them to a calling subroutine.

Parameters
names[out] A placeholder for JavaScript scenario names.
sources[out] A placeholder for JavaScript scenario source code texts.

◆ getPages()

void OdPdfPublish::OdDocument::getPages ( OdPagePtrArray &  pages) const

Returns the array of <link OdPdfPublish::OdPage, pages>, which the Teigha Publish document contains. This method fills a passed array with OdPage object, which represent document pages and returns it to a calling subroutine.

Parameters
pages[out] A placeholder for the document pages array.
See also
<link OdPdfPublish::OdPage, OdPage class>.

◆ ODRX_DECLARE_MEMBERS()

OdPdfPublish::OdDocument::ODRX_DECLARE_MEMBERS ( OdDocument  )

◆ ODRX_HEAP_OPERATORS()

OdPdfPublish::OdDocument::ODRX_HEAP_OPERATORS ( )

◆ setHostServices()

void OdPdfPublish::OdDocument::setHostServices ( OdDbBaseHostAppServices pHostApp)

◆ setInformation()

void OdPdfPublish::OdDocument::setInformation ( const OdString title,
const OdString author,
const OdString subject,
const OdString creator 
)

Sets common information about the Teigha Publish document.

Parameters
title[in] A string that contains the document title.
author[in] A string that contains the document author.
subject[in] A string that contains the document subject.
creator[in] A string that contains the information about the document creator.

The documentation for this class was generated from the following file: