NiXPSObjects::NOPackage Class Reference
#include "NOPackage.h"
Inherits NiXPSObjects::NOPartWithResources.
List of all members.
Public Member Functions |
void | writePackageToFile (const UTF8Char *pFilename) |
void | writePackageToFile () |
UInt32 | writePackageToBuffer (UInt8 *pBuffer, const UInt32 pBufSize, UInt32 &pFileSize) |
UInt32 | exportToPDF (const UTF8Char *pPDFFileName, NOProgressReporter &pProgressReporter) |
UInt32 | exportToPDFWithOptions (const UTF8Char *pPDFFileName, NOProgressReporter &pProgressReporter, NOOptions &pOptions) |
UInt32 | NOPackage::exportToPDFWithOptions (UInt8 *pBuffer, const UInt32 pBufSize, UInt32 &pPDFSize, NOProgressReporter &pProgressReporter, NOOptions &pOptions) |
bool | getDirty () |
void | setDirty (bool pDirty) |
bool | hasCoreProperties () |
NOCoreProperties | getCoreProperties () |
|
|
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 |
|
|
static NOPackage * | readPackageFromFile (const UTF8Char *pFilename) |
static NOPackage * | createFromImage (const UTF8Char *pFilename) |
static NOPackage * | readPackageFromBuffer (const UTF8Char *pFilename, const UInt8 *pBuffer, const UInt32 pSize) |
static NOPackage * | createPackage (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.
Member Function Documentation
NOPackage * NiXPSObjects::NOPackage::createFromImage |
( |
const UTF8Char * |
pFilename |
) |
[static] |
Create an XPS package from an image
- Parameters:
-
| pFilename | Full path to the image to create the file from |
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 |
UInt32 NiXPSObjects::NOPackage::exportToPDF |
( |
const UTF8Char * |
pPDFFileName, |
|
|
NOProgressReporter & |
pProgressReporter | |
|
) |
| | |
Exports the package to a PDF file. All pages from all documents will be put into one document
- Parameters:
-
| pPDFFileName | the path of the file to write |
| pProgressReporter | This progress reporter object gets polled regularly with % update of the export process |
UInt32 NiXPSObjects::NOPackage::exportToPDFWithOptions |
( |
const UTF8Char * |
pPDFFileName, |
|
|
NOProgressReporter & |
pProgressReporter, |
|
|
NOOptions & |
pOptions | |
|
) |
| | |
Exports the package to a PDF file. All pages from all documents will be put into one document
- Parameters:
-
| pPDFFileName | the path of the file to write |
| pProgressReporter | This progress reporter object gets polled regularly with % update of the export process |
| pOptions | These are the options. Currently the following opsions are supported: |
"Author": The Author that gets stored in the PDF metadata "Title": The Title that gets stored in the PDF metadata "Subject": The Subject that gets stored in the PDF metadata "Keywords": The Keywords that gets stored in the PDF metadata "Creator": The Creator that gets stored in the PDF metadata "Producer": The Producer that gets stored in the PDF metadata "PDF Conformance": PDF conformance level, only valid value is "PDF/A-1B" for PDF/A output "Base14FontEmbedding": "Embed"(default) or "DoNotEmbed" the base 14 font files "Base14SimilarFonts": "Embed"(default) or "DoNotEmbed" fonts that look similar to base 14 fonts (if not embedded, they are replaced by their similar base 14 counterpart) "CropImages": "false"(default) or "true"; if the image is bigger than the box used on the page, this option will crop the image data "Outline": "No"(default) or "Yes"; include the XPS document outline in the PDF
Returns the NODocument at postion pNum.
- Parameters:
-
| pNum | The document position |
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. |
UInt32 NiXPSObjects::NOPackage::NOPackage::exportToPDFWithOptions |
( |
UInt8 * |
pBuffer, |
|
|
const UInt32 |
pBufSize, |
|
|
UInt32 & |
pPDFSize, |
|
|
NOProgressReporter & |
pProgressReporter, |
|
|
NOOptions & |
pOptions | |
|
) |
| | |
Exports the package to a PDF file. All pages from all documents will be put into one document. This version saves the resulting PDF to a memory buffer
NOPackage * NiXPSObjects::NOPackage::readPackageFromBuffer |
( |
const UTF8Char * |
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::readPackageFromFile |
( |
const UTF8Char * |
pFilename |
) |
[static] |
Reads a package from a file.
- Parameters:
-
| pFilename | Full path to the XPS-file to read. |
void NiXPSObjects::NOPackage::writePackageToFile |
( |
const UTF8Char * |
pFilename |
) |
|
Writes the package to a file
- Parameters:
-
| pFilename | Full path to the XPS-file to write. |
The documentation for this class was generated from the following files: