GroupDocs.Conversion Cloud REST APIs support document conversion tools to convert files from 65+ supported formats to get high-quality output in quickly and reliably. To get a Metadata of supported formats, You can use the below API.
Resource
The following GroupDocs.Conversion Cloud REST API resource has been used in the Document Metadata example.
The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.
usingSystem;usingGroupDocs.Conversion.Cloud.Sdk.Api;usingGroupDocs.Conversion.Cloud.Sdk.Client;usingGroupDocs.Conversion.Cloud.Sdk.Model.Requests;namespaceGroupDocs.Conversion.Cloud.Examples.CSharp{// Get Document Information / Docuement MetadaclassGet_Document_Information{publicstaticvoidRun(){varconfiguration=newConfiguration(Common.MyAppSid,Common.MyAppKey);varapiInstance=newInfoApi(configuration);try{// get document info/metadata requestvarrequest=newGetDocumentMetadataRequest{StorageName=Common.MyStorage,FilePath="conversions/password-protected.docx"};// Execute api method to get response.varresponse=apiInstance.GetDocumentMetadata(request);Console.WriteLine("Expected response type is DocumentMetadata: "+response.ToString());}catch(Exceptione){Console.WriteLine("Exception when calling InfoApi: "+e.Message);}}}}
<?phpinclude(dirname(__DIR__).'\CommonUtils.php');try{$infoApi=CommonUtils::GetInfoApiInstance();$request=newGroupDocs\Conversion\Model\Requests\GetDocumentMetadataRequest();$request->setStorageName(CommonUtils::$MyStorage);$request->setFilePath("conversions\\sample.docx");$response=$infoApi->getDocumentMetadata($request);echo"Expected response type is DocumentMetadata: ",$response[0]->getPageCount();}catch(Exception$e){echo"Something went wrong: ",$e->getMessage(),"\n";}
packageexamples.Supported_File_Formats;importcom.groupdocs.cloud.conversion.client.*;importcom.groupdocs.cloud.conversion.model.*;importcom.groupdocs.cloud.conversion.model.requests.*;importjava.util.List;importcom.groupdocs.cloud.conversion.api.*;importexamples.Utils;publicclassConversion_Java_Get_Document_Information{publicstaticvoidmain(String[]args){InfoApiapiInstance=newInfoApi(Utils.AppSID,Utils.AppKey);try{GetDocumentMetadataRequestrequest=newGetDocumentMetadataRequest();request.setStorageName(Utils.MYStorage);request.setFilePath("conversions\\sample.docx");DocumentMetadataresponse=apiInstance.getDocumentMetadata(request);System.out.println("Expected response type is DocumentMetadata: "+response.getPageCount());}catch(ApiExceptione){System.err.println("Exception while calling InfoApi:");e.printStackTrace();}}}
# Load the gemrequire'groupdocs_conversion_cloud'require'common_utilities/Utils.rb'classDocument_Informationdefself.Conversion_Ruby_Get_Document_Information()# Getting instance of the APIapi=Common_Utilities.Get_InfoApi_Instance()$request=GroupDocsConversionCloud::GetDocumentMetadataRequest.new()$request.storage_name=$myStorage;$request.file_path="conversions/sample.docx"$response=api.get_document_metadata($request)puts("Expected response type is DocumentMetadata: "+($response).to_s)endend
"use strict";classConversion_Node_Get_Document_Information{staticRun(){varrequest=newgroupdocs_conversion_cloud_1.GetDocumentMetadataRequest();request.storageName=myStorage;request.filePath="conversions/password-protected.docx";infoApi.getDocumentMetadata(request).then(function(response){console.log("Expected response type is DocumentMetadata: : "+response);}).catch(function(error){console.log("Error: "+error.message);});}}module.exports=Conversion_Node_Get_Document_Information;
# Import modulesimportgroupdocs_conversion_cloudfromCommon_Utilities.UtilsimportCommon_UtilitiesclassConversion_Python_Get_Document_Information:@classmethoddefRun(self):# Create instance of the APIapi=Common_Utilities.Get_InfoApi_Instance()try:request=groupdocs_conversion_cloud.GetDocumentMetadataRequest()request.storage_name=Common_Utilities.myStorage;request.file_path="conversions\\password-protected.docx"response=api.get_document_metadata(request)print("Expected response type is DocumentMetadata: "+str(len(response)))exceptgroupdocs_conversion_cloud.ApiExceptionase:print("Exception while calling API: {0}".format(e.message))
// For complete examples and data files, please go to https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-go-samples
packageinfoimport("fmt""github.com/antihax/optional"conversion"github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-go""github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-go-samples/config")funcGetDocumentInformation(){opts:=&conversion.InfoApiGetDocumentMetadataOpts{FilePath:optional.NewString("WordProcessing/four-pages.docx"),}info,_,err:=config.Client.InfoApi.GetDocumentMetadata(config.Ctx,opts)iferr!=nil{fmt.Printf("GetDocumentInformation error: %v\n",err)return}fmt.Printf("InfoResult.Pages.Count: %v\n",info.PageCount)}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.