'''' This code is part of Document Solutions for PDF .NET demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsGrapeCity.Documents.Pdf PublicClassAddEmbeddedFontsPublicFunctionCreatePDF(ByVal stream AsStream) AsInteger' Load a PDF that does not have embedded fonts:Using fs = File.OpenRead(Path.Combine("Resources", "PDFs", "CompleteJavaScriptBook-nofonts.pdf"))Dim docSrc = NewGcPdfDocument() docSrc.Load(fs) ' Create a new document and draw each page of the original PDF into it:Dim doc = NewGcPdfDocument()' Not really needed as EmbedSubset is the default for new GcPdfDocument:' doc.FontEmbedMode = FontEmbedMode.EmbedSubset;ForEach p In docSrc.PagesDim pNew = doc.NewPage() pNew.Size = p.Size pNew.Graphics.DrawPdfPage(p, p.Bounds)Next '' Done: doc.Save(stream)Return doc.Pages.CountEndUsingEndFunctionEndClass