GetDocumentFormat(String) Method
In This Topic
Determines the document format in accordance with the specified file path of that document.
Be aware that this method uses the file itself to obtain the known document format either from the file extension or the document content. If the file does not exist on the specified file path, the returned format is unknown.
Please refer to the GdPictureDocumentUtilities.GetDocumentFormatFromFileName method to obtain the document format based only on the file name.
Syntax
'Declaration
Public Overloads Shared Function GetDocumentFormat( _
ByVal As String _
) As DocumentFormat
public static DocumentFormat GetDocumentFormat(
string
)
public function GetDocumentFormat(
: String
): DocumentFormat; static;
public static function GetDocumentFormat(
: String
) : DocumentFormat;
public: static DocumentFormat GetDocumentFormat(
string*
)
public:
static DocumentFormat GetDocumentFormat(
String^
)
Parameters
- FilePath
- The full file path of the specified document. If the specified file does not exist, the returned format is unknown.
Return Value
A member of the DocumentFormat enumeration. The format of the specified document.
Example
How to properly retrieve the document format of a specified file.
Dim documentFormat As GdPicture14.DocumentFormat = GdPictureDocumentUtilities.GetDocumentFormat("d:\\documents\\document.docx")
GdPicture14.DocumentFormat documentFormat = GdPictureDocumentUtilities.GetDocumentFormat("d:\\documents\\document.docx");
Example
How to properly retrieve the document format of a specified file.
Dim documentFormat As GdPicture14.DocumentFormat = GdPictureDocumentUtilities.GetDocumentFormat("d:\\documents\\document.docx")
GdPicture14.DocumentFormat documentFormat = GdPictureDocumentUtilities.GetDocumentFormat("d:\\documents\\document.docx");
See Also