Dim caption As String = "Example: HasJavaScript"
Dim gdpicturePDF As GdPicturePDF = New GdPicturePDF()
If gdpicturePDF.LoadFromFile("sample.pdf", False) = GdPictureStatus.OK Then
Dim hasJS As Boolean = gdpicturePDF.HasJavaScript()
If gdpicturePDF.GetStat() = GdPictureStatus.OK Then
If hasJS Then
MessageBox.Show("This PDF document contains JavaScript.", caption)
Else
MessageBox.Show("This PDF document contains NO JavaScript.", caption)
End If
Else
MessageBox.Show("The HasJavaScript() method has failed with the status: " + gdpicturePDF.GetStat().ToString(), caption)
End If
Else
MessageBox.Show("The file can't be loaded. Status: " + gdpicturePDF.GetStat().ToString(), caption)
End If
gdpicturePDF.Dispose()
string caption = "Example: HasJavaScript";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
if (gdpicturePDF.LoadFromFile("sample.pdf", false) == GdPictureStatus.OK)
{
bool hasJS = gdpicturePDF.HasJavaScript();
if (gdpicturePDF.GetStat() == GdPictureStatus.OK)
{
if (hasJS)
MessageBox.Show("This PDF document contains JavaScript.", caption);
else
MessageBox.Show("This PDF document contains NO JavaScript.", caption);
}
else
MessageBox.Show("The HasJavaScript() method has failed with the status: " + gdpicturePDF.GetStat().ToString(), caption);
}
else
MessageBox.Show("The file can't be loaded. Status: " + gdpicturePDF.GetStat().ToString(), caption);
gdpicturePDF.Dispose();