←Select platform

Redact(Stream,string,IList<PDFRedact>) Method

Summary

Redacts a PDF document stored in a stream.

Syntax
C#
VB
C++
public static void Redact( 
   Stream stream, 
   string password, 
   IList<PDFRedact> redacts 
) 
Public Shared Sub Redact( 
   ByVal stream As Stream, 
   ByVal password As String, 
   ByVal redacts As IList(Of PDFRedact 
)) 
public:  
   static void Redact( 
      Stream^ stream, 
      String^ password, 
      IList<PDFRedact^>^ redacts 
   ) 

Parameters

stream

Stream containing an existing PDF document to be redacted.

password

The password to use if stream contains an encrypted PDF file.

redacts

One or more PDF redact objects.

Remarks

Redaction can be used to remove sensitive information from an existing PDF document.

This method quickly redacts an existing PDF document in place by removing any character, image, or shape that intersects with any of the PDFRedact.Bounds of redacts. The resulting PDF is not re-generated and therefore will maintain the same exact compression, metadata, fonts, and any other resources.

Use the following code to redact all data in a PDF page at location 0, 0 to 100,100:

C#
// Create a PDF redaction object 
var redact = new PDFRedact(0, 0, 100, 100); 
// Redact the file: 
PDFFile.Redact(pdfFileName, new List<PDFRedact> { redact }); 

Example

For an example, refer to Redact.

Requirements

Target Platforms

Help Version 20.0.2020.2.17
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Pdf Assembly