docexample_createpackage.cpp

00001 #include "NOPage.h"
00002 #include "NOPackage.h"
00003 
00004 using namespace NiXPSObjects;
00005 
00006 void createPackage(const UTF8Char *pXPSIn, const UTF8Char *pXPSOut)
00007 {
00008         NOPackage *lPackage = NOPackage::readPackageFromFile(pXPSIn);
00009         NOPackage *lPackageNew = NOPackage::createPackage(true);
00010         
00011         // get a handler to the first page of the first out source package
00012         NOPage lPage = lPackage->getDocument(0).getPage(0);             
00013 
00014         NOPage lNewPage = lPackageNew->getDocument(0).insertPage(lPage,0);
00015         
00016         // write the modified package out
00017         lPackageNew->writePackageToFile(pXPSOut);
00018 
00019         NOPackage::destroyPackage(lPackageNew);
00020         NOPackage::destroyPackage(lPackage);
00021 }

Generated on Thu Jul 3 15:30:32 2008 for NiXPS Library SDK by  doxygen 1.5.3