Dim caption As String = "Example: GetEmbeddedFileDescription"
Dim gdpicturePDF As New GdPicturePDF()
If gdpicturePDF.LoadFromFile("TestPDFWithAttachment.pdf", False) = GdPictureStatus.OK Then
Dim embeddedFileCount As Integer = gdpicturePDF.GetEmbeddedFileCount()
If gdpicturePDF.GetStat() = GdPictureStatus.OK Then
If embeddedFileCount = 0 Then
MessageBox.Show("This PDF file does not contain embedded files.", caption)
Else
Dim description As String = gdpicturePDF.GetEmbeddedFileDescription(0)
Dim status As GdPictureStatus = gdpicturePDF.GetStat()
If status = GdPictureStatus.OK Then
MessageBox.Show("The description of the first embedded file is: " + description, caption)
Else
MessageBox.Show("The GetEmbeddedFileDescription() method has failed with the status: " + status.ToString(), caption)
End If
End If
End If
Else
MessageBox.Show("The file can't be loaded.", caption)
End If
gdpicturePDF.Dispose()
string caption = "Example: GetEmbeddedFileDescription";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
if (gdpicturePDF.LoadFromFile("TestPDFWithAttachment.pdf", false) == GdPictureStatus.OK)
{
int embeddedFileCount = gdpicturePDF.GetEmbeddedFileCount();
if (gdpicturePDF.GetStat() == GdPictureStatus.OK)
{
if (embeddedFileCount == 0)
{
MessageBox.Show("This PDF file does not contain embedded files.", caption);
}
else
{
string description = gdpicturePDF.GetEmbeddedFileDescription(0);
GdPictureStatus status = gdpicturePDF.GetStat();
if (status == GdPictureStatus.OK)
{
MessageBox.Show("The description of the first embedded file is: " + description, caption);
}
else
{
MessageBox.Show("The GetEmbeddedFileDescription() method has failed with the status: " + status.ToString(), caption);
}
}
}
}
else
{
MessageBox.Show("The file can't be loaded.", caption);
}
gdpicturePDF.Dispose();