'''' This code is part of Document Solutions for PDF .NET demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsGrapeCity.Documents.Pdf PublicClassDeleteTextPublicFunctionCreatePDF(ByVal stream AsStream) AsIntegerDim doc = NewGcPdfDocument()Using fs = File.OpenRead(Path.Combine("Resources", "PDFs", "TimeSheet.pdf")) doc.Load(fs) ' Delete dates and times using regex pattern:Dim ftps = NewFindTextParams("\d+/\d+/\d+|\d+:\d+| am| pm", False, False, 72, 72, False, True) doc.DeleteText(ftps, GrapeCity.Documents.Pdf.TextMap.DeleteTextMode.PreserveSpace) ' For reference, append the original PDF:Util.AddNote("For reference, the following page contains 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