GdPicture.NET.14 (COM - ActiveX)~GdPicture14_namespace / GdPicture.NET.14 (COM - ActiveX)~GdPicture14.GdPicturePDF / AddRedactionRegion Method
The horizontal (X) coordinate of the closest point to the currently defined origin, where the redaction bounding box is to be located. The value is expressed in the current units specified by the SetMeasurementUnit method .
The vertical (Y) coordinate of the closest point to the currently defined origin, where the redaction bounding box is to be located. The value is expressed in the current units specified by the SetMeasurementUnit method and it is related to the current page.
The width of the redaction bounding box, expressed in the current units specified by the SetMeasurementUnit method.
The height of the redaction bounding box, expressed in the current units specified by the SetMeasurementUnit method.
Example





In This Topic
    AddRedactionRegion Method (GdPicturePDF)
    In This Topic
    Adds redaction region on the selected page of the loaded PDF document.
    Syntax
    'Declaration
     
    
    Public Function AddRedactionRegion( _
       ByVal Left As Single, _
       ByVal Top As Single, _
       ByVal Width As Single, _
       ByVal Height As Single _
    ) As GdPictureStatus
    public GdPictureStatus AddRedactionRegion( 
       float Left,
       float Top,
       float Width,
       float Height
    )
    public function AddRedactionRegion( 
        Left: Single;
        Top: Single;
        Width: Single;
        Height: Single
    ): GdPictureStatus; 
    public function AddRedactionRegion( 
       Left : float,
       Top : float,
       Width : float,
       Height : float
    ) : GdPictureStatus;
    public: GdPictureStatus AddRedactionRegion( 
       float Left,
       float Top,
       float Width,
       float Height
    ) 
    public:
    GdPictureStatus AddRedactionRegion( 
       float Left,
       float Top,
       float Width,
       float Height
    ) 

    Parameters

    Left
    The horizontal (X) coordinate of the closest point to the currently defined origin, where the redaction bounding box is to be located. The value is expressed in the current units specified by the SetMeasurementUnit method .
    Top
    The vertical (Y) coordinate of the closest point to the currently defined origin, where the redaction bounding box is to be located. The value is expressed in the current units specified by the SetMeasurementUnit method and it is related to the current page.
    Width
    The width of the redaction bounding box, expressed in the current units specified by the SetMeasurementUnit method.
    Height
    The height of the redaction bounding box, expressed in the current units specified by the SetMeasurementUnit method.

    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
    Please note that this method is only allowed for use with non-encrypted documents.
    Example
    How to redact regions on pages in PDF document.
    Using oGdPicturePDF As New GdPicturePDF
        oGdPicturePDF.LoadFromFile("input.pdf")
        oGdPicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft)
        oGdPicturePDF.SelectPage(1)
        oGdPicturePDF.AddRedactionRegion(120, 300, 140, 20)
        oGdPicturePDF.SelectPage(2)
        oGdPicturePDF.AddRedactionRegion(100, 280, 70, 15)
        oGdPicturePDF.AddRedactionRegion(100, 310, 70, 15)
        oGdPicturePDF.ApplyRedaction()
        oGdPicturePDF.SaveToFile("output.pdf")
    End Using
    using (GdPicturePDF oGdPicturePDF = new GdPicturePDF())
    {
        oGdPicturePDF.LoadFromFile("input.pdf");
        oGdPicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft);
        oGdPicturePDF.SelectPage(1);
        oGdPicturePDF.AddRedactionRegion(120, 300, 140, 20);
        oGdPicturePDF.SelectPage(2);
        oGdPicturePDF.AddRedactionRegion(100, 280, 70, 15);
        oGdPicturePDF.AddRedactionRegion(100, 310, 70, 15);
        oGdPicturePDF.ApplyRedaction();
        oGdPicturePDF.SaveToFile("output.pdf");
    }
    See Also

    Reference

    GdPicture.NET.14 (COM - ActiveX)~GdPicture14.GdPicturePDF
    GdPicturePDF Members
    ApplyRedaction Method
    ClearRedactionRegions Method