NiXPSObjects::NOPackage Class Reference

#include "NOPackage.h"

Inheritance diagram for NiXPSObjects::NOPackage:

Inheritance graph
[legend]
Collaboration diagram for NiXPSObjects::NOPackage:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void writePackageToFile (const UTF8String &pFilename)
void writePackageToFile ()
bool getDirty ()
void setDirty (bool pDirty)
bool hasCoreProperties ()
NOCoreProperties getCoreProperties ()
Manipulating documents in a package
NCommon::UInt32 getNumberOfDocuments ()
NCommon::UInt32 getDocumentNumberOf (const NODocument &pDoc)
NODocument getDocument (const NCommon::UInt32 &pNum)
void addDocument (const NODocument &pDoc, NOProgressReporter &pReporter)
virtual bool hasThumbnail ()
NOThumbnail getThumbnail ()
NCommon::UInt32 getNumberOfPages ()
NCommon::UInt32 getFonts (NOFontVector &pFonts)
NCommon::UInt32 getImages (NOImageVector &pImages)
NCommon::UInt32 getParts (NOVector &pParts)

Static Public Member Functions

Constructing and destructing an NOPackage
static NOPackagereadPackageFromFile (const UTF8String &pFilename)
static NOPackagereadPackageFromBuffer (const UTF8String &pFilename, const UInt8 *pBuffer, const UInt32 pSize)
static NOPackagecreatePackage (bool pCreateEmptyDoc, const UTF8Char *pName=0)
static void destroyPackage (NOPackage *pXPSPackage)


Detailed Description

Use an NOPackage to read an XPS-file from disk and access or manipulate the content of the package.
Examples:

docexample_createpackage.cpp, docexample_createpage.cpp, docexample_extractimage.cpp, docexample_getthumbnail.cpp, docexample_nocontentstream.cpp, docexample_render.cpp, and docexample_replacefont.cpp.


Member Function Documentation

NOPackage * NiXPSObjects::NOPackage::readPackageFromFile ( const UTF8String &  pFilename  )  [static]

Reads a package from a file.

Parameters:
pFilename Full path to the XPS-file to read.

NOPackage * NiXPSObjects::NOPackage::readPackageFromBuffer ( const UTF8String &  pFilename,
const UInt8 *  pBuffer,
const UInt32  pSize 
) [static]

Reads a package from a file.

Parameters:
pFilename The name of the XPS-file.
pBuffer Memory buffer holding the XPS file. The library does not take ownership, so make sure the buffer is kept alive.
pSize Size of the file in memory.

NOPackage * NiXPSObjects::NOPackage::createPackage ( bool  pCreateEmptyDoc,
const UTF8Char *  pName = 0 
) [static]

Creates an empty package.

Parameters:
pCreateEmptyDoc Create an empty document in the package

void NiXPSObjects::NOPackage::destroyPackage ( NOPackage pXPSPackage  )  [static]

Destroy a package. You need to call this to dispose of a package and all the resources it keeps.

Parameters:
pXPSPackage Package to destroy

void NiXPSObjects::NOPackage::writePackageToFile ( const UTF8String &  pFilename  ) 

Writes the package to a file

Parameters:
pFilename Full path to the XPS-file to write.
Examples:
docexample_createpackage.cpp, docexample_createpage.cpp, docexample_nocontentstream.cpp, and docexample_replacefont.cpp.

void NiXPSObjects::NOPackage::writePackageToFile (  ) 

Writes the package to a file.

bool NiXPSObjects::NOPackage::getDirty (  ) 

Returns whether the package is dirty.

void NiXPSObjects::NOPackage::setDirty ( bool  pDirty  ) 

Set the package dirty state.

bool NiXPSObjects::NOPackage::hasCoreProperties (  ) 

Returns whether we have a core properties object.

NOCoreProperties NiXPSObjects::NOPackage::getCoreProperties (  ) 

Returns the NOCoreProperties object, an object represinting the Core Properties of the XPS Package.

NCommon::UInt32 NiXPSObjects::NOPackage::getNumberOfDocuments (  ) 

Returns the number of documents in this package.

NCommon::UInt32 NiXPSObjects::NOPackage::getDocumentNumberOf ( const NODocument pDoc  ) 

Returns the document number of a given NODocument in this xps package

Parameters:
pDoc The NODocument that the library needs to find the Document Number of.

NODocument NiXPSObjects::NOPackage::getDocument ( const NCommon::UInt32 pNum  ) 

Returns the NODocument at postion pNum.

Parameters:
pNum The document position
Examples:
docexample_createpackage.cpp, docexample_createpage.cpp, docexample_extractimage.cpp, docexample_nocontentstream.cpp, docexample_render.cpp, and docexample_replacefont.cpp.

void NiXPSObjects::NOPackage::addDocument ( const NODocument pDoc,
NOProgressReporter pReporter 
)

Add a document to the package.

bool NiXPSObjects::NOPackage::hasThumbnail (  )  [virtual]

Returns whether we have a thumbnail.

Reimplemented from NiXPSObjects::NOPartWithResources.

Examples:
docexample_getthumbnail.cpp.

NOThumbnail NiXPSObjects::NOPackage::getThumbnail (  ) 

Returns the thumbnail represented by a NOThumbnail object.

Reimplemented from NiXPSObjects::NOPartWithResources.

Examples:
docexample_getthumbnail.cpp.

NCommon::UInt32 NiXPSObjects::NOPackage::getNumberOfPages (  ) 

Returns the total number of pages in all documents.

NCommon::UInt32 NiXPSObjects::NOPackage::getFonts ( NOFontVector pFonts  ) 

Returns the total number of fonts in all documents and a font vector containing all those fonts.

NCommon::UInt32 NiXPSObjects::NOPackage::getImages ( NOImageVector pImages  ) 

Returns the total number of images in all documents and an image vector containing all those images.

NCommon::UInt32 NiXPSObjects::NOPackage::getParts ( NOVector pParts  ) 

Returns the total number of images in all documents and an image vector containing all those images.


The documentation for this class was generated from the following files:
Generated on Thu Jul 3 15:30:45 2008 for NiXPS Library SDK by  doxygen 1.5.3