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, bool bWithoutObjNum=false)
 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 (PdfDocument *pDoc, int nPage, 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


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,
bool  bWithoutObjNum = false 
)

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

Parameters:
rRect the size of the XObject
pParent the parent document of the XObject
pszPrefix optional prefix for XObject-name
bWithoutObjNum do not create an object identifier 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:
rRect the size of the XObject
pParent the parent vector of the XObject
pszPrefix optional 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:
rSourceDoc the document to create the XObject from
nPage the page-number in rDoc to create the XObject from
pParent the parent document of the XObject
pszPrefix optional prefix for XObject-name
bUseTrimBox if true try to use trimbox for size of xobject

PoDoFo::PdfXObject::PdfXObject ( PdfDocument pDoc,
int  nPage,
const char *  pszPrefix = NULL,
bool  bUseTrimBox = false 
)

Create a new XObject from an existing page

Parameters:
pDoc the document to create the XObject at
nPage the page-number in pDoc to create the XObject from
pszPrefix optional prefix for XObject-name
bUseTrimBox if true try to use trimbox for size of xobject

PoDoFo::PdfXObject::PdfXObject ( PdfObject pObject  ) 

Create a XObject from an existing PdfObject

Parameters:
pObject an existing object which has to be a XObject


Member Function Documentation

PdfObject * PoDoFo::PdfXObject::GetContents (  )  const [inline, virtual]

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 [inline, virtual]

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.

PdfObject * PoDoFo::PdfXObject::GetResources (  )  const [inline, virtual]

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

Returns:
a resources object

Implements PoDoFo::PdfCanvas.

const PdfRect PoDoFo::PdfXObject::GetPageSize (  )  const [inline, virtual]

Get the current page size in PDF Units

Returns:
a PdfRect containing the page size available for drawing

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


Generated on Tue Nov 29 09:28:35 2016 for PoDoFo by  doxygen 1.5.6