PoDoFo  0.9.1
Public Member Functions
PoDoFo::PdfXObject Class Reference

#include <PdfXObject.h>

Inheritance diagram for PoDoFo::PdfXObject:
PoDoFo::PdfElement PoDoFo::PdfCanvas PoDoFo::PdfImage

List of all members.

Public Member Functions

 PdfXObject (const PdfRect &rRect, PdfDocument *pParent, const char *pszPrefix=NULL)
 PdfXObject (const PdfRect &rRect, PdfVecObjects *pParent, const char *pszPrefix=NULL)
 PdfXObject (const PdfMemDocument &rSourceDoc, int nPage, PdfDocument *pParent, const char *pszPrefix=NULL, bool bUseTrimBox=false)
 PdfXObject (PdfObject *pObject)
virtual PdfObjectGetContents () const
virtual PdfObjectGetContentsForAppending () const
virtual PdfObjectGetResources () const
virtual const PdfRect GetPageSize () const
const PdfNameGetIdentifier () const
const PdfReferenceGetObjectReference () const
- Public Member Functions inherited from PoDoFo::PdfElement
PdfObjectGetObject ()
const PdfObjectGetObject () const
- Public Member Functions inherited from PoDoFo::PdfCanvas
virtual ~PdfCanvas ()
void AddColorResource (const PdfColor &rColor)
void AddResource (const PdfName &rIdentifier, const PdfReference &rRef, const PdfName &rName)

Additional Inherited Members

- Static Public Member Functions inherited from PoDoFo::PdfCanvas
static const PdfArray & GetProcSet ()
- Protected Member Functions inherited from PoDoFo::PdfElement
 PdfElement (const char *pszType, PdfVecObjects *pParent)
 PdfElement (const char *pszType, PdfDocument *pParent)
 PdfElement (const char *pszType, PdfObject *pObject)
 PdfElement (EPdfDataType eExpectedDataType, PdfObject *pObject)
const char * TypeNameForIndex (int i, const char **ppTypes, long lLen) const
int TypeNameToIndex (const char *pszType, const char **ppTypes, long lLen, int nUnknownValue) const
PdfObjectCreateObject (const char *pszType=NULL)
PdfObjectGetNonConstObject () const

Detailed Description

A XObject is a content stream with several drawing commands and data which can be used throughout a PDF document.

You can draw on a XObject like you would draw onto a page and can draw this XObject later again using a PdfPainter.

See also:
PdfPainter

Constructor & Destructor Documentation

PoDoFo::PdfXObject::PdfXObject ( const PdfRect rRect,
PdfDocument pParent,
const char *  pszPrefix = NULL 
)

Create a new XObject with a specified dimension in a given document

Parameters:
rRectthe size of the XObject
pParentthe parent document of the XObject
pszPrefixoptional prefix for XObject-name
PoDoFo::PdfXObject::PdfXObject ( const PdfRect rRect,
PdfVecObjects pParent,
const char *  pszPrefix = NULL 
)

Create a new XObject with a specified dimension in a given vector of PdfObjects

Parameters:
rRectthe size of the XObject
pParentthe parent vector of the XObject
pszPrefixoptional prefix for XObject-name
PoDoFo::PdfXObject::PdfXObject ( const PdfMemDocument rSourceDoc,
int  nPage,
PdfDocument pParent,
const char *  pszPrefix = NULL,
bool  bUseTrimBox = false 
)

Create a new XObject from a page of another document in a given document

Parameters:
rSourceDocthe document to create the XObject from
nPagethe page-number in rDoc to create the XObject from
pParentthe parent document of the XObject
pszPrefixoptional prefix for XObject-name
bUseTrimBoxif true try to use trimbox for size of xobject
PoDoFo::PdfXObject::PdfXObject ( PdfObject pObject)

Create a XObject from an existing PdfObject

Parameters:
pObjectan existing object which has to be a XObject

Member Function Documentation

PdfObject * PoDoFo::PdfXObject::GetContents ( ) const
inlinevirtual

Get access to the contents object of this page. If you want to draw onto the page, you have to add drawing commands to the stream of the Contents object.

The contents object is a this pointer in this case.

Returns:
a contents object

Implements PoDoFo::PdfCanvas.

virtual PdfObject* PoDoFo::PdfXObject::GetContentsForAppending ( ) const
inlinevirtual

Get access to the contents object of this page. If you want to draw onto the page, you have to add drawing commands to the stream of the Contents object.

The contents object is a this pointer in this case.

Returns:
a contents object

Implements PoDoFo::PdfCanvas.

const PdfName & PoDoFo::PdfXObject::GetIdentifier ( ) const
inline

Get the identifier used for drawig this object

Returns:
identifier
const PdfReference & PoDoFo::PdfXObject::GetObjectReference ( ) const
inline

Get the reference to the XObject in the PDF file without having to access the PdfObject.

This allows to work with XObjects which have been written to disk already.

Returns:
the reference of the PdfObject for this XObject
const PdfRect PoDoFo::PdfXObject::GetPageSize ( ) const
inlinevirtual

Get the current page size in PDF Units

Returns:
a PdfRect containing the page size available for drawing

Implements PoDoFo::PdfCanvas.

PdfObject * PoDoFo::PdfXObject::GetResources ( ) const
inlinevirtual

Get access to the resources object of this page. This is most likely an internal object.

Returns:
a resources object

Implements PoDoFo::PdfCanvas.