'''' This code is part of Document Solutions for PDF .NET demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsGrapeCity.Documents.Pdf PublicClassReplaceText2PublicFunctionCreatePDF(ByVal stream AsStream) AsIntegerDim doc = NewGcPdfDocument()Using fs = File.OpenRead(Path.Combine("Resources", "PDFs", "gc-docs-data-sheet.pdf")) doc.Load(fs) ' Replace: doc.ReplaceText(NewFindTextParams(".NET Standard 2.0", False, True), ".NET 6") ' For reference, append the original PDF:Util.AddNote("For reference, the following pages contain a copy of the original unmodified PDF.", doc.NewPage())Dim docOrig = NewGcPdfDocument() docOrig.Load(fs) doc.MergeWithDocument(docOrig) '' Done: doc.Save(stream)Return doc.Pages.CountEndUsingEndFunctionEndClass