docexample_createpackage.cpp

00001 #include "NOPage.h"
00002 #include "NOPackage.h"
00003 
00004 using namespace NiXPSObjects;
00005 
00006 void createPackage()
00007 {
00008         NOPackage *lPackage = NOPackage::readPackageFromFile("CoreProperty2.xps");
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("CoreProperty2-replaced.xps");
00018 
00019         NOPackage::destroyPackage(lPackageNew);
00020         NOPackage::destroyPackage(lPackage);
00021 }

Generated on Thu Jul 19 09:33:08 2007 for NiXPS Library by  doxygen 1.5.2