GdPicture.NET.14
GdPicture14 Namespace / GdPicturePDF Class / RemoveHiddenText Method
Example





In This Topic
RemoveHiddenText Method (GdPicturePDF)
In This Topic
Removes all hidden text on currently selected page of the loaded PDF document.
Syntax
'Declaration
 
Public Function RemoveHiddenText() As GdPictureStatus
public GdPictureStatus RemoveHiddenText()
public function RemoveHiddenText(): GdPictureStatus; 
public function RemoveHiddenText() : GdPictureStatus;
public: GdPictureStatus RemoveHiddenText(); 
public:
GdPictureStatus RemoveHiddenText(); 

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.

Example
How to remove hidden text from the document.
Using gdpicturePDF As New GdPicturePDF
    gdpicturePDF.LoadFromFile("input.pdf")
    Dim pageCount As Integer = gdpicturePDF.GetPageCount()
    For i As Integer = 1 To pageCount
        gdpicturePDF.RemoveHiddenText()
    Next
    gdpicturePDF.SaveToFile("output.pdf")
End Using
using (GdPicturePDF gdpicturePDF = new GdPicturePDF())
{
    gdpicturePDF.LoadFromFile("input.pdf");
    int pageCount = gdpicturePDF.GetPageCount();
    for(int page = 1; page <= pageCount; i++)
    {
        gdpicturePDF.RemoveHiddenText();
    }
    gdpicturePDF.SaveToFile("output.pdf");
}
See Also