IsTagged Method (GdPicturePDF)
Checks whether the currently loaded PDF document conforms to Tagged PDF conventions.
public function IsTagged(): Boolean;
public function IsTagged() : boolean;
'Declaration
Public Function IsTagged() As Boolean
Return Value
true if the current PDF conforms to Tagged PDF conventions based on the information in MarkInfo dictionary, otherwise false. The
GdPicturePDF.GetStat method can be subsequently used to determine if this method has been successful.
How to determine if the PDF document is a tagged PDF file.
Dim gdpicturePDF As New GdPicturePDF()
Dim status As GdPictureStatus = gdpicturePDF.LoadFromFile("test.pdf", False)
If status = GdPictureStatus.OK Then
Dim isTagged As Boolean = gdpicturePDF.IsTagged()
status = gdpicturePDF.GetStat()
If status = GdPictureStatus.OK Then
If isTagged Then
MessageBox.Show("Your PDF document is tagged.", "Example: IsTagged")
Else
MessageBox.Show("Your PDF document is not tagged.", "Example: IsTagged")
End If
Else
MessageBox.Show("The IsTagged() method has failed with the status: " + status.ToString(), "Example: IsTagged")
End If
Else
MessageBox.Show("The file can't be loaded.", "Example: IsTagged")
End If
gdpicturePDF.Dispose()
GdPicturePDF gdpicturePDF = new GdPicturePDF();
GdPictureStatus status = gdpicturePDF.LoadFromFile("test.pdf", false);
if (status == GdPictureStatus.OK)
{
bool isTagged = gdpicturePDF.IsTagged();
status = gdpicturePDF.GetStat();
if (status == GdPictureStatus.OK)
{
if (isTagged)
{
MessageBox.Show("Your PDF document is tagged.", "Example: IsTagged");
}
else
{
MessageBox.Show("Your PDF document is not tagged.", "Example: IsTagged");
}
}
else
{
MessageBox.Show("The IsTagged() method has failed with the status: " + status.ToString(), "Example: IsTagged");
}
}
else
{
MessageBox.Show("The file can't be loaded.", "Example: IsTagged");
}
gdpicturePDF.Dispose();