'''' This code is part of Document Solutions for PDF .NET demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsGrapeCity.Documents.Pdf '' This sample shows how to convert all text in an existing PDF to glyph outlines.'' The resulting PDF will look exactly Like the original, but all glyphs in it'' will be rendered as graphics paths. This can be used to manipulate the paths,'' Or to make sure it will be impossible to copy Or search the text.'' Note that the resulting documents will have no fonts (see for example '' the Document Properties | Fonts tab in DsPdfViewer).'' The original PDF used by this sample was generated by Wetlands.PublicClassTextToOutlinesFunctionCreatePDF(ByVal stream AsStream) AsIntegerDim doc = NewGcPdfDocument()Using fs = File.OpenRead(Path.Combine("Resources", "PDFs", "Wetlands.pdf"))'' Load the source PDF into a temp document:Dim srcDoc = NewGcPdfDocument() srcDoc.Load(fs)'' Draw all pages of the source document on pages of the New PDF:ForEach srcPage In srcDoc.PagesDim page = doc.Pages.Add(srcPage.Size)'' Setting Graphics.DrawTextAsPath to true makes all glyphs draw as graphics paths'' instead of rendering text using fonts: page.Graphics.DrawTextAsPath = True'' Draw the source page on the target: srcPage.Draw(page.Graphics, srcPage.Bounds)Next'' Done: doc.Save(stream)Return doc.Pages.CountEndUsingEndFunctionEndClass