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
00012 NOPage lPage = lPackage->getDocument(0).getPage(0);
00013
00014 NOPage lNewPage = lPackageNew->getDocument(0).insertPage(lPage,0);
00015
00016
00017 lPackageNew->writePackageToFile("CoreProperty2-replaced.xps");
00018
00019 NOPackage::destroyPackage(lPackageNew);
00020 NOPackage::destroyPackage(lPackage);
00021 }