Dim gdpicturePDF As New GdPicturePDF()
Dim status As GdPictureStatus = gdpicturePDF.LoadFromFile("test.pdf", False)
If status = GdPictureStatus.OK Then
Dim isLinearized As Boolean = gdpicturePDF.IsLinearized()
status = gdpicturePDF.GetStat()
If status = GdPictureStatus.OK Then
If isLinearized Then
MessageBox.Show("Your PDF document is linearized.", "Example: IsLinearized")
Else
MessageBox.Show("Your PDF document is not linearized.", "Example: IsLinearized")
End If
Else
MessageBox.Show("The IsLinearized() method has failed with the status: " + status.ToString(), "Example: IsLinearized")
End If
Else
MessageBox.Show("The file can't be loaded.", "Example: IsLinearized")
End If
gdpicturePDF.Dispose()
GdPicturePDF gdpicturePDF = new GdPicturePDF();
GdPictureStatus status = gdpicturePDF.LoadFromFile("test.pdf", false);
if (status == GdPictureStatus.OK)
{
bool isLinearized = gdpicturePDF.IsLinearized();
status = gdpicturePDF.GetStat();
if (status == GdPictureStatus.OK)
{
if (isLinearized)
{
MessageBox.Show("Your PDF document is linearized.", "Example: IsLinearized");
}
else
{
MessageBox.Show("Your PDF document is not linearized.", "Example: IsLinearized");
}
}
else
{
MessageBox.Show("The IsLinearized() method has failed with the status: " + status.ToString(), "Example: IsLinearized");
}
}
else
{
MessageBox.Show("The file can't be loaded.", "Example: IsLinearized");
}
gdpicturePDF.Dispose();