GdPicture.NET.14.API
GdPicture14 Namespace / GdPicturePDF Class / ApplyRedaction Method / ApplyRedaction(Boolean) Method
Example





In This Topic
ApplyRedaction(Boolean) Method
In This Topic
Applies redactions based on regions added using the AddRedactionRegion method.
Syntax
'Declaration
 
Public Overloads Function ApplyRedaction( _
   ByVal IgnoreGdPictureAnnotations As Boolean _
) As GdPictureStatus
public GdPictureStatus ApplyRedaction( 
   bool IgnoreGdPictureAnnotations
)
public function ApplyRedaction( 
    IgnoreGdPictureAnnotations: Boolean
): GdPictureStatus; 
public function ApplyRedaction( 
   IgnoreGdPictureAnnotations : boolean
) : GdPictureStatus;
public: GdPictureStatus ApplyRedaction( 
   bool IgnoreGdPictureAnnotations
) 
public:
GdPictureStatus ApplyRedaction( 
   bool IgnoreGdPictureAnnotations
) 

Parameters

IgnoreGdPictureAnnotations

Return Value

A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.

We strongly recommend always checking this status first.

Remarks

This method requires the Redaction component to run.

Example
How to redact regions on pages in PDF document.
Using gdpicturePDF As New GdPicturePDF
    gdpicturePDF.LoadFromFile("input.pdf")
    gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft)
    gdpicturePDF.SelectPage(1)
    gdpicturePDF.AddRedactionRegion(120, 300, 140, 20)
    gdpicturePDF.SelectPage(2)
    gdpicturePDF.AddRedactionRegion(100, 280, 70, 15)
    gdpicturePDF.AddRedactionRegion(100, 310, 70, 15)
    gdpicturePDF.ApplyRedaction()
    gdpicturePDF.SaveToFile("output.pdf")
End Using
using (GdPicturePDF gdpicturePDF = new GdPicturePDF())
{
    gdpicturePDF.LoadFromFile("input.pdf");
    gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft);
    gdpicturePDF.SelectPage(1);
    gdpicturePDF.AddRedactionRegion(120, 300, 140, 20);
    gdpicturePDF.SelectPage(2);
    gdpicturePDF.AddRedactionRegion(100, 280, 70, 15);
    gdpicturePDF.AddRedactionRegion(100, 310, 70, 15);
    gdpicturePDF.ApplyRedaction();
    gdpicturePDF.SaveToFile("output.pdf");
}
See Also