Dim caption As String = "Example: GetEmbeddedFileCount"
Dim gdpicturePDF As New GdPicturePDF()
If gdpicturePDF.LoadFromFile("TestPDFWithAttachment.pdf", False) = GdPictureStatus.OK Then
Dim embeddedFileCount As Integer = gdpicturePDF.GetEmbeddedFileCount()
Dim status As GdPictureStatus = gdpicturePDF.GetStat()
If status = GdPictureStatus.OK Then
MessageBox.Show("This PDF document contains " + embeddedFileCount.ToString() + " embedded files.", caption)
Else
MessageBox.Show("The GetEmbeddedFileCount() 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: GetEmbeddedFileCount";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
if (gdpicturePDF.LoadFromFile("TestPDFWithAttachment.pdf", false) == GdPictureStatus.OK)
{
int embeddedFileCount = gdpicturePDF.GetEmbeddedFileCount();
GdPictureStatus status = gdpicturePDF.GetStat();
if (status == GdPictureStatus.OK)
{
MessageBox.Show("This PDF document contains " + embeddedFileCount.ToString() + " embedded files.", caption);
}
else
{
MessageBox.Show("The GetEmbeddedFileCount() method has failed with the status: " + status.ToString(), caption);
}
}
else
{
MessageBox.Show("The file can't be loaded.", caption);
}
gdpicturePDF.Dispose();