Dim caption As String = "Example: RemoveJavaScript"
Dim gdpicturePDF As GdPicturePDF = New GdPicturePDF()
If gdpicturePDF.LoadFromFile("javascript.pdf", False) = GdPictureStatus.OK Then
If gdpicturePDF.RemoveJavaScript(PdfRemoveJavaScriptOptions.RemoveAllJavaScript) = GdPictureStatus.OK Then
If gdpicturePDF.SaveToFile("javascript_removed.pdf") = GdPictureStatus.OK Then
MessageBox.Show("The example has been followed successfully and the file has been saved.", caption)
Else
MessageBox.Show("The file can't be saved. Status: " + gdpicturePDF.GetStat().ToString(), caption)
End If
Else
MessageBox.Show("The RemoveJavaScript() 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: RemoveJavaScript";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
if (gdpicturePDF.LoadFromFile("javascript.pdf", false) == GdPictureStatus.OK)
{
if (gdpicturePDF.RemoveJavaScript(PdfRemoveJavaScriptOptions.RemoveAllJavaScript) == GdPictureStatus.OK)
{
if (gdpicturePDF.SaveToFile("javascript_removed.pdf") == GdPictureStatus.OK)
MessageBox.Show("The example has been followed successfully and the file has been saved.", caption);
else
MessageBox.Show("The file can't be saved. Status: " + gdpicturePDF.GetStat().ToString(), caption);
}
else
MessageBox.Show("The RemoveJavaScript() 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();