The string used to separate all the names of the custom information keys in the resulting string.
Example





In This Topic
GdPicture14 Namespace / GdPicturePDF Class / GetCustomPDFInformationKeys Method

GetCustomPDFInformationKeys Method (GdPicturePDF)

In This Topic
Returns a string composed from the names of the custom information keys (custom metadata fields) of the currently loaded PDF document. The included names of the custom information keys are separated with the specified separator.
Syntax
'Declaration
 
Public Function GetCustomPDFInformationKeys( _
   ByVal Separator As String _
) As String
public string GetCustomPDFInformationKeys( 
   string Separator
)
public function GetCustomPDFInformationKeys( 
    Separator: String
): String; 
public function GetCustomPDFInformationKeys( 
   Separator : String
) : String;
public: string* GetCustomPDFInformationKeys( 
   string* Separator
) 
public:
String^ GetCustomPDFInformationKeys( 
   String^ Separator
) 

Parameters

Separator
The string used to separate all the names of the custom information keys in the resulting string.

Return Value

The names of the custom information keys separated with the specified separator as a string. The GetStat method can be subsequently used to determine if this method has been successful.
Remarks
This method is only allowed for use with non-encrypted documents.

It is recommend to use the GetStat method to identify the specific reason for the method's failure, if any.

Example
How to find out the names of the custom metadata fields if they are specified in the PDF document.
Dim gdpicturePDF As New GdPicturePDF()
Dim status As GdPictureStatus = gdpicturePDF.LoadFromFile("test.pdf", False)
If status = GdPictureStatus.OK Then
    Dim keys As String = gdpicturePDF.GetCustomPDFInformationKeys(vbCrLf)
    status = gdpicturePDF.GetStat()
    If status = GdPictureStatus.OK Then
        If keys.Equals("") Then
            MessageBox.Show("Your PDF document does not contain any custom keys.", "Example: GetCustomPDFInformationKeys")
        Else
            MessageBox.Show("All custom keys are:" + vbCrLf + keys, "Example: GetCustomPDFInformationKeys")
        End If
    Else
        MessageBox.Show("The GetCustomPDFInformationKeys() method has failed with the status: " + status.ToString(), "Example: GetCustomPDFInformationKeys")
    End If
Else
    MessageBox.Show("The file can't be loaded.", "Example: GetCustomPDFInformationKeys")
End If
gdpicturePDF.Dispose()
GdPicturePDF gdpicturePDF = new GdPicturePDF();
GdPictureStatus status = gdpicturePDF.LoadFromFile("test.pdf", false);
if (status == GdPictureStatus.OK)
{
    string keys = gdpicturePDF.GetCustomPDFInformationKeys("\n");
    status = gdpicturePDF.GetStat();
    if (status == GdPictureStatus.OK)
    {
        if (keys.Equals(""))
        {
            MessageBox.Show("Your PDF document does not contain any custom keys.", "Example: GetCustomPDFInformationKeys");
        }
        else
        {
            MessageBox.Show("All custom keys are:\n" + keys, "Example: GetCustomPDFInformationKeys");
        }
    }
    else
    {
        MessageBox.Show("The GetCustomPDFInformationKeys() method has failed with the status: " + status.ToString(), "Example: GetCustomPDFInformationKeys");
    }
}
else
{
    MessageBox.Show("The file can't be loaded.", "Example: GetCustomPDFInformationKeys");
}
gdpicturePDF.Dispose();
See Also