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