Dim caption As String = "Example: PortFolioDelete"
Dim gdpicturePDF As New GdPicturePDF()
If gdpicturePDF.LoadFromFile("gdpicturepdf_portfolio.pdf", False) = GdPictureStatus.OK Then
Dim status As GdPictureStatus = gdpicturePDF.PortFolioDelete()
If status = GdPictureStatus.OK Then
Dim count As Integer = gdpicturePDF.GetEmbeddedFileCount()
status = gdpicturePDF.GetStat()
If status = GdPictureStatus.OK Then
MessageBox.Show("The PDF Portfolio has been successfully deteted." + vbCrLf + "This common PDF document contains " + count.ToString() + " embedded files.", caption)
gdpicturePDF.SaveToFile("gdpicturepdf_commonpdf.pdf")
Else
MessageBox.Show("The PDF Portfolio has been successfully deteted." + vbCrLf + "This error occurs when finding the number of embedded files: " + status.ToString(), caption)
End If
Else
MessageBox.Show("The PortFolioDelete() method has failed with the status: " + status.ToString(), caption)
End If
Else
MessageBox.Show("The file can't be loaded.", caption)
End If
gdpicturePDF.Dispose()
string caption = "Example: PortFolioDelete";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
if (gdpicturePDF.LoadFromFile("gdpicturepdf_portfolio.pdf", false) == GdPictureStatus.OK)
{
GdPictureStatus status = gdpicturePDF.PortFolioDelete();
if (status == GdPictureStatus.OK)
{
int count = gdpicturePDF.GetEmbeddedFileCount();
status = gdpicturePDF.GetStat();
if (status == GdPictureStatus.OK)
{
MessageBox.Show("The PDF Portfolio has been successfully deteted.\nThis common PDF document contains " + count.ToString() + " embedded files.", caption);
gdpicturePDF.SaveToFile("gdpicturepdf_commonpdf.pdf");
}
else
{
MessageBox.Show("The PDF Portfolio has been successfully deteted.\nThis error occurs when finding the number of embedded files: " + status.ToString(), caption);
}
}
else
{
MessageBox.Show("The PortFolioDelete() method has failed with the status: " + status.ToString(), caption);
}
}
else
{
MessageBox.Show("The file can't be loaded.", caption);
}
gdpicturePDF.Dispose();