00001 #include "NOPackage.h" 00002 #include "NOFontVector.h" 00003 #include "NOPage.h" 00004 00005 using namespace NiXPSObjects; 00006 00007 void replaceFont() 00008 { 00009 NOPackage *lPackage=NOPackage::readPackageFromFile("vdp.xps"); 00010 00011 NOFontVector lFonts(*lPackage); 00012 lPackage->getDocument(0).getPage(0).getFonts(lFonts); 00013 00014 if (!lFonts[0].replaceWithFile("Arial")) 00015 { 00016 // error handling here 00017 } 00018 00019 NOPackage::destroyPackage(lPackage); 00020 }