private static void SkipEmbeddedArialAndTimesRomanFonts(Document doc, string dataDir)
{
// ExStart:SkipEmbeddedArialAndTimesRomanFonts
// To subset fonts in the output PDF document, simply create new PdfSaveOptions and set EmbedFullFonts to false.
// To disable embedding standard windows font use the PdfSaveOptions and set the EmbedStandardWindowsFonts property to false.
PdfSaveOptions options = new PdfSaveOptions();
options.FontEmbeddingMode = PdfFontEmbeddingMode.EmbedAll;
dataDir = dataDir + "Rendering.DisableEmbedWindowsFonts_out.pdf";
// The output PDF will be saved without embedding standard windows fonts.
doc.Save(dataDir);
// ExEnd:SkipEmbeddedArialAndTimesRomanFonts
Console.WriteLine("\nEmbedded arial and times new roman fonts are skipped successfully.\nFile saved at " + dataDir);
}
}