IXpsOMObjectFactory1::GetDocumentTypeFromFile method (xpsobjectmodel_1.h)
Detects the type of XPS document that is stored in the specified file.
Syntax
HRESULT GetDocumentTypeFromFile(
LPCWSTR filename,
XPS_DOCUMENT_TYPE *documentType
);
Parameters
filename
[in] The name of the XPS file from which to get the type.
documentType
[out, retval] The document type.
Return value
Possible values include, but are not limited to, the following. For information about XPS document API return values that are not listed here, see XPS Document Errors.
S_OK: The document type is XPS_DOCUMENT_TYPE_ XPS or XPS_DOCUMENT_TYPE_ OPENXPS.
Remarks
This method only parses the data enough to detect the document type. It does not validate the content. A return value of S_OK does not, therefore, imply that the file contains a valid document.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | xpsobjectmodel_1.h |
Library | None |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for