'''' This code is part of Document Solutions for PDF .NET demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsSystem.DrawingImportsGrapeCity.Documents.Pdf PublicClassType1FontsDemoPublicFunctionCreatePDF(ByVal stream AsStream) AsIntegerDim doc = NewGcPdfDocument()' We load a PDF that uses PDF Type 1 fonts, add some text to it,' and save it to PDF and images (JPEG and TIFF) as in all other samples.' The original text in the loaded PDF is rendered using Adobe Type 1 fonts,' so if using DsPdf v4.0 or earlier, the generated images would contain' garbled text. Starting with v4.1, Type 1 fonts are rendered correctly.Using fs = File.OpenRead(Path.Combine("Resources", "PDFs", "Type1FontSample.pdf")) doc.Load(fs)'' Add note to the (only) page in the doc:Dim page = doc.Pages.LastUtil.AddNote("This sample demonstrates rendering Adobe Type 1 fonts when a PDF is saved as image by DsPdf. " &"This is supported starting with DsPdf v4.1. To see the result, open the generated PDF " &"saved as image (e.g. TIFF). Using the same code with an earlier version of DsPdf produces " &"garbled text in the saved image.", page,NewRectangleF(12, 12, 72 * 5, 0))'' Done: doc.Save(stream)Return doc.Pages.CountEndUsingEndFunctionEndClass