EditorGetDocumentInfo Method
Returns metadata about the document, that was loaded to this 'Editor' instance

Namespace: GroupDocs.Editor
Assembly: GroupDocs.Editor (in GroupDocs.Editor.dll) Version: 21.6.0.0
Syntax
public IDocumentInfo GetDocumentInfo(
	string password
)

Parameters

password
Type: SystemString
User can specify a password for a document, if this document is encrypted with the password. May be NULL or empty string, that is equivalent to the absent password. For those document formats, which do not have a password protection feature, this argument will be ignored.

Return Value

Type: IDocumentInfo
Format-specific inheritor of IDocumentInfo interface, that indicates detected format with format-specific metadata, or NULL, if document was not recognized as supportable or is corrupted.
Exceptions
ExceptionCondition
ObjectDisposedExceptionIs thrown when Editor instance was already disposed when "GetDocumentInfo" is invoked
PasswordRequiredExceptionIs thrown when loaded document is password protected, but the password was not specified in the parameter "password"
IncorrectPasswordExceptionIs thrown when loaded document is password protected, password is specified, but is incorrect
InvalidOperationExceptionIs thrown when unexpected error of unknown nature has occured
Remarks

GetDocumentInfo method is useful when it is unclear of which format is the input document, is it password-protected and/or how many pages/worksheets/slides it contains. Based on this metadata, returned by GetDocumentInfo, it is possible to correctly adjust the load and edit options for the main processing pipeline.

GetDocumentInfo method always returns full data, it is not affected by the trial mode, its usage doesn't write off the consumed bytes or credits.

Learn more
See Also