Thanks for contacting support.
As per my understanding, you need to replace the font in existing PDF file. If so is the case, then please try following the instructions specified over Replace fonts in existing PDF file.
Besides above mentioned approach, if you need to trim down fonts used by PDF document to subsets, this functionality to control font subsetting is declared in interface Document.IDocumentFontUtilities. Every object of type Aspose.Pdf.Document has property FontUtilities of type IDocumentFontUtilities. This interface includes method SubsetFonts(FontSubsetStrategy subsetStrategy).
Parameter subsetStrategy helps to tune subset strategy. Two variants of font subsetting are supported. It is possible to subset all fonts used by document(strategy SubsetAllFonts) or to subset only fully embedded fonts(or font subsets which are larger than it required by current document). In case 1(SubsetAllFonts) all fonts will be embedded into document. Font subset is embedded into PDF document by definition, but in case 2(SubsetEmbeddedFontsOnly) process will not affect fonts which are not embedded into document.
Specified below is the code snippet to reduce fully embedded font sets to only those subsets:
load existing PDF file<o:p></o:p>
Document doc = new Document(“doc.pdf”);<o:p></o:p>
embed font subset only<o:p></o:p>
save PDF document<o:p></o:p>