'''' This code is part of Document Solutions for PDF .NET demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsSystem.DrawingImportsGrapeCity.Documents.PdfImportsGrapeCity.Documents.Pdf.TextMap PublicClassChangeTextAttrsPublicFunctionCreatePDF(ByVal stream AsStream) AsIntegerDim doc = NewGcPdfDocument()Using fs = File.OpenRead(Path.Combine("Resources", "PDFs", "TimeSheet.pdf")) doc.Load(fs)Dim pageCount = doc.Pages.Count' Duplicate the PDF: doc.MergeWithDocument(doc)' Modify text on the first copy:For i = 0To pageCount - 1Dim ftps = NewFindTextParams("\d+/\d+/\d+|\d+:\d+| am| pm", False, False, 72, 72, False, True)' TextRenderingAttrs allows you to specify the following text rendering attributes:' - RenderingMode' - FillAlpha' - FillColor' - StrokeAlpha' - StrokePen doc.Pages(i).SetTextRenderingAttrs(ftps, NewTextRenderingAttrs() With { .RenderingMode = TextRenderingMode.FillStroke, .FillColor = Color.Red, .FillAlpha = 0.5F, .StrokeAlpha = 1.0F, .StrokePen = NewGrapeCity.Documents.Drawing.Pen(Color.Blue, 1)})Next'' Done: doc.Save(stream)Return doc.Pages.CountEndUsingEndFunctionEndClass