'''' This code is part of Document Solutions for PDF .NET demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsSystem.DrawingImportsSystem.TextImportsGrapeCity.Documents.PdfImportsGrapeCity.Documents.DrawingImports GCDRAW = GrapeCity.Documents.Drawing PublicClassOutputIntentsPublicFunctionCreatePDF(ByVal stream AsStream) AsInteger' The different versions of the ICC Probe profile:Dim profiles = New (String, String)() { ("Probev2_ICCv4.icc", "https://www.color.org/probeprofile.xalter"), ("Probev1_ICCv4.icc", "https://www.color.org/probeprofile.xalter"), ("Probev1_ICCv2.icc", "https://www.color.org/probeprofile.xalter") }'Dim doc = NewGcPdfDocument()Dim page = doc.NewPage()Dim g = page.GraphicsDim sb = NewStringBuilder()Dim bullet = ChrW(&H2022) & ChrW(&H2003) sb.AppendLine("This document contains the following output intents (first one is the default):")Dim i = 0ForEach profile In profiles sb.AppendLine($"{bullet}{profile.Item1}, source: {profile.Item2}")Using fs = File.OpenRead(Path.Combine("Resources", "Misc", profile.Item1))Dim oi = OutputIntent.Create($"Output intent testing {i}", "", "http://www.color.org", profile.Item1, fs) doc.OutputIntents.Add(oi) i += 1EndUsingNext sb.AppendLine("Colors processed via the ICC Probe Profile are deliberately distorted, " &"so that it is easy to visually confirm that a profile is being used. " &"To see the effect in this PDF, you may open it in Adobe Acrobat Reader DC and make sure that " &"Edit | Preferences | Page Display | Show Overprint Preview is set to 'Always', " &"then the deliberate color distortion will be obvious.")Dim rc = Util.AddNote(sb.ToString(), page) g.DrawImage(GCDRAW.Image.FromFile(Path.Combine("Resources", "Images", "roofs.jpg")),NewRectangleF(rc.Left, rc.Bottom + 24, rc.Width, rc.Width), Nothing, ImageAlign.StretchImage)' doc.Save(stream)Return doc.Pages.CountEndFunctionEndClass