00001 #include "NOPackage.h"
00002 #include "NOFontVector.h"
00003 #include "NOPage.h"
00004
00005 using namespace NiXPSObjects;
00006
00007 void replaceFont(const UTF8Char *pXPSIn, const UTF8Char *pFontIn, const UTF8Char *pXPSOut)
00008 {
00009 NOPackage *lPackage=NOPackage::readPackageFromFile(pXPSIn);
00010
00011 NOFontVector lFonts(*lPackage);
00012 lPackage->getDocument(0).getPage(0).getFonts(lFonts);
00013
00014 if (!lFonts[0].replaceWithFile(pFontIn))
00015 {
00016
00017 }
00018
00019
00020 lPackage->writePackageToFile(pXPSOut);
00021
00022 NOPackage::destroyPackage(lPackage);
00023 }