HasInvisibleText Method (GdPicturePDF)
Checks if the currently selected page of the loaded PDF document contains any invisible text.
public bool HasInvisibleText()
public function HasInvisibleText(): Boolean;
public function HasInvisibleText() : boolean;
public: bool HasInvisibleText();
public:
bool HasInvisibleText();
'Declaration
Public Function HasInvisibleText() As Boolean
Return Value
true if the selected page of the loaded PDF document contains any invisible text, otherwise returns false. The
GdPicturePDF.GetStat method can be subsequently used to determine if this method has been successful.
How to check of the document contains any invisible text.
Using gdpicturePDF As New GdPicturePDF
gdpicturePDF.LoadFromFile("input.pdf")
Dim pageCount As Integer = gdpicturePDF.GetPageCount()
Dim hasInvisibleText as Bool = False
For i As Integer = 1 To pageCount
hasInvisibleText = hasInvisibleText Or gdpicturePDF.HasInvisibleText()
Next
If hasInvisibleText Then
MessageBox.Show("The document contains invisible text.", "GdPicturePDF")
End If
End Using
using (GdPicturePDF gdpicturePDF = new GdPicturePDF())
{
gdpicturePDF.LoadFromFile("input.pdf");
int pageCount = gdpicturePDF.GetPageCount();
bool hasInvisibleText = false;
for(int page = 1; page <= pageCount; i++)
{
hasInvisibleText = hasInvisibleText || gdpicturePDF.HasInvisibleText();
}
if(hasInvisibleText)
{
MessageBox.Show("The document contains invisible text.", "GdPicturePDF");
}
}