'''' This code is part of Document Solutions for PDF .NET demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsGrapeCity.Documents.Pdf '' This sample demonstrates the use of GcPdfDocument.Redact() method.'' It loads the PDF generated by the FindAndRedact sample, in which'' certain areas are marked for redaction, and applies those redacts.'' The original PDF without redact annotations is created by TimeSheet.PublicClassApplyRedactFunctionCreatePDF(ByVal stream AsStream) AsIntegerDim doc = NewGcPdfDocument()Using fs = NewFileStream(Path.Combine("Resources", "PDFs", "find-and-redact.pdf"), FileMode.Open, FileAccess.Read)'' Load the PDF containing redact annotations (areas marked for redaction): doc.Load(fs) '' Apply the redacts: doc.Redact() '' Done doc.Save(stream)Return doc.Pages.CountEndUsingEndFunctionEndClass