GetSubject Method (GdPicturePDF)
Returns the subject of the currently loaded PDF document, if any is set in the document information dictionary.
public string GetSubject()
public function GetSubject(): String;
public function GetSubject() : String;
public: string* GetSubject();
public:
String^ GetSubject();
'Declaration
Public Function GetSubject() As String
Return Value
The value of the document's Subject property as a string. The
GdPicturePDF.GetStat method can be subsequently used to determine if this method has been successful.
How to find out the subject of the PDF document.
Using gdpicturePDF As New GdPicturePDF()
If gdpicturePDF.LoadFromFile("test.pdf", False) = GdPictureStatus.OK Then
Dim subject As String = gdpicturePDF.GetSubject()
Dim status As GdPictureStatus = gdpicturePDF.GetStat()
If status = GdPictureStatus.OK Then
MessageBox.Show("The subject of this PDF is: " + subject, "Example: GetSubject")
Else
MessageBox.Show("The GetSubject() method has failed with the status: " + status.ToString(), "Example: GetSubject")
End If
Else
MessageBox.Show("The file can't be loaded.", "Example: GetSubject")
End If
End Using
using (GdPicturePDF gdpicturePDF = new GdPicturePDF())
{
if (gdpicturePDF.LoadFromFile("test.pdf", false) == GdPictureStatus.OK)
{
string subject = gdpicturePDF.GetSubject();
GdPictureStatus status = gdpicturePDF.GetStat();
if (status == GdPictureStatus.OK)
{
MessageBox.Show("The subject of this PDF is: " + subject, "Example: GetSubject");
}
else
{
MessageBox.Show("The GetSubject() method has failed with the status: " + status.ToString(), "Example: GetSubject");
}
}
else
{
MessageBox.Show("The file can't be loaded.", "Example: GetSubject");
}
}