### Get Document Element Style - C# SDK Example Source: https://docs.aspose.cloud/words/styles/get Example of how to get the style of a document element using the Aspose.Words Cloud SDK for C#. Ensure you have the SDK installed and your credentials configured. ```csharp using Aspose.Words.Cloud.Sdk; using Aspose.Words.Cloud.Sdk.Model.Requests; // Initialize WordsApi var wordsApi = new WordsApi("YOUR_APP_SID", "YOUR_APP_KEY"); // Define the path to the styled node string styledNodePath = "document.body[0]/paragraphformat"; // Create a request to get the style var request = new CreateDocumentRequest { StyledNodePath = styledNodePath }; // Call the API to get the style var response = wordsApi.GetStyledNodeInline(request); // Process the response (e.g., print the style information) Console.WriteLine(response); ``` -------------------------------- ### Get Document Element Style - JavaScript SDK Example Source: https://docs.aspose.cloud/words/styles/get Example of how to get the style of a document element using the Aspose.Words Cloud SDK for JavaScript. Ensure you have the SDK installed and your credentials configured. ```javascript const WordsApi = require('aspose-words-cloud').WordsApi; // Initialize WordsApi const wordsApi = new WordsApi('YOUR_APP_SID', 'YOUR_APP_KEY'); // Define the path to the styled node const styledNodePath = 'document.body[0]/paragraphformat'; // Create a request to get the style const request = { styledNodePath: styledNodePath }; // Call the API to get the style wordsApi.getStyledNodeInline(request) .then(response => { // Process the response (e.g., print the style information) console.log(response); }) .catch(error => { console.error(error); }); ``` -------------------------------- ### Get Document Element Style - Python SDK Example Source: https://docs.aspose.cloud/words/styles/get Example of how to get the style of a document element using the Aspose.Words Cloud SDK for Python. Ensure you have the SDK installed and your credentials configured. ```python from asposewordscloud.WordsApi import WordsApi from asposewordscloud.models.requests import CreateDocumentRequest # Initialize WordsApi words_api = WordsApi(app_key='YOUR_APP_KEY', app_sid='YOUR_APP_SID') # Define the path to the styled node styled_node_path = 'document.body[0]/paragraphformat' # Create a request to get the style request = CreateDocumentRequest(styled_node_path=styled_node_path) # Call the API to get the style response = words_api.get_styled_node_inline(request) # Process the response (e.g., print the style information) print(response) ``` -------------------------------- ### Get Section Page Setup Source: https://docs.aspose.cloud/words/spec/section Retrieves the page setup information for a specific section in a document. ```APIDOC ## GET /words/getSectionPageSetup ### Description Returns the page setup of a section. This operation can be performed online or on a document stored in the cloud. ### Method GET ### Endpoint /words/getSectionPageSetup ### Parameters #### Query Parameters - **name** (string) - Required - The name of the file to process. - **sectionIndex** (integer) - Required - The index of the section. - **folder** (string) - Optional - The source folder. - **storage** (string) - Optional - Cloud storage name. - **loadEncoding** (string) - Optional - Encoding that will be used to read an HTML document. - **password** (string) - Optional - Password for opening an encrypted document. ### Response #### Success Response (200) - **SectionPageSetupResponse** (object) - The response containing the page setup details. - **PageSetup** (object) - The page setup object. - **SectionStart** (string) - The type of section start. - **LeftMargin** (number) - The left margin. - **RightMargin** (number) - The right margin. - **TopMargin** (number) - The top margin. - **BottomMargin** (number) - The bottom margin. - **Orientation** (string) - The page orientation. - **RequestedUrl** (string) - The URL that was requested. #### Response Example ```json { "SectionPageSetupResponse": { "PageSetup": { "SectionStart": "NewPage", "LeftMargin": 50, "RightMargin": 50, "TopMargin": 70, "BottomMargin": 70, "Orientation": "Portrait" }, "RequestedUrl": "/words/getSectionPageSetup?name=document.docx§ionIndex=0" } } ``` ``` -------------------------------- ### Get Document Element Style - Java SDK Example Source: https://docs.aspose.cloud/words/styles/get Example of how to get the style of a document element using the Aspose.Words Cloud SDK for Java. Ensure you have the SDK installed and your credentials configured. ```java import com.aspose.words.cloud.WordsApi; import com.aspose.words.cloud.model.requests.CreateDocumentRequest; // Initialize WordsApi WordsApi wordsApi = new WordsApi("YOUR_APP_SID", "YOUR_APP_KEY"); // Define the path to the styled node String styledNodePath = "document.body[0]/paragraphformat"; // Create a request to get the style CreateDocumentRequest request = new CreateDocumentRequest().styledNodePath(styledNodePath); // Call the API to get the style StyleResponse response = wordsApi.getStyledNodeInline(request); // Process the response (e.g., print the style information) System.out.println(response); ``` -------------------------------- ### Get all sections in a Word document using Python Source: https://docs.aspose.cloud/words/sections/get-all This Python example shows how to use the Aspose.Words Cloud SDK to retrieve all sections from a Word document. You need to install the SDK and provide your API credentials. ```python from aspose_words_cloud.api import WordsApi from aspose_words_cloud.models.requests import DocumentGetSectionsRequest # Initialize the API with your client ID and client secret words_api = WordsApi(app_sid='YOUR_APP_SID', app_key='YOUR_APP_KEY') # Define the path to your document document_path = 'document.docx' # Create a request object request = DocumentGetSectionsRequest(document=document_path) # Call the API to get all sections response = words_api.document_get_sections(request) # Process the response (e.g., print the number of sections) print(f"Number of sections: {len(response.sections)}") ``` -------------------------------- ### Get all sections in a Word document using JavaScript Source: https://docs.aspose.cloud/words/sections/get-all This JavaScript example demonstrates how to use the Aspose.Words Cloud SDK to get all sections from a Word document. Ensure the SDK is installed and your API credentials are provided. ```javascript const { WordsApi } = require('aspose-words-cloud'); // Initialize the API with your client ID and client secret const wordsApi = new WordsApi('YOUR_APP_SID', 'YOUR_APP_KEY'); // Define the path to your document const documentPath = 'document.docx'; // Create a request object const request = { document: documentPath }; // Call the API to get all sections wordsApi.documentGetSections(request) .then(response => { // Process the response (e.g., print the number of sections) console.log(`Number of sections: ${response.sections.length}`); }) .catch(error => { console.error(error); }); ``` -------------------------------- ### Upload File to Cloud Storage in Python Source: https://docs.aspose.cloud/words/files-and-storage/upload-file This Python example demonstrates how to upload a file to Cloud Storage using the Aspose.Words Cloud SDK. Ensure you have the SDK installed and your credentials configured. ```python import aspose.words.cloud # Initialize the WordsApi words_api = aspose.words.cloud.WordsApi(app_sid='YOUR_APP_SID', app_key='YOUR_APP_KEY') # Set the file path and storage name file_path = "/path/to/your/file.ext" storage_name = "" # Optional, use default storage if empty # Upload the file response = words_api.upload_file(file_path, storage_name=storage_name) print(f"File uploaded successfully: {response}") ``` -------------------------------- ### Get all sections in a Word document using C# Source: https://docs.aspose.cloud/words/sections/get-all This C# example shows how to use the Aspose.Words Cloud SDK to retrieve all sections from a Word document. Make sure to install the SDK and set up your API credentials. ```csharp using Aspose.Words.Cloud.Sdk; using Aspose.Words.Cloud.Sdk.Model.Requests; public class GetSectionsExample { public static void Main(string[] args) { // Initialize the API with your client ID and client secret var wordsApi = new WordsApi("YOUR_APP_SID", "YOUR_APP_KEY"); // Define the path to your document string documentPath = "document.docx"; // Create a request object var request = new DocumentGetSectionsRequest { Document = documentPath }; try { // Call the API to get all sections var response = wordsApi.DocumentGetSections(request); // Process the response (e.g., print the number of sections) Console.WriteLine($"Number of sections: {response.Sections.Count}"); } catch (ApiException e) { Console.WriteLine(e.Message); } } } ``` -------------------------------- ### GET /words/online/sections/{sectionIndex}/pageSetup Source: https://docs.aspose.cloud/words/spec/section Retrieves the page setup properties of a section from a document provided as a stream. ```APIDOC ## GET /words/online/sections/{sectionIndex}/pageSetup ### Description Retrieves the page setup configuration for a specific section of a document provided as a stream. ### Method GET ### Endpoint /words/online/sections/{sectionIndex}/pageSetup ### Parameters #### Path Parameters - **sectionIndex** (int) - Required - The index of the section. #### Request Body - **document** (Stream) - Required - The document stream. - **loadEncoding** (string) - Optional - Encoding for HTML/TXT documents. - **password** (string) - Optional - Password for protected documents. - **encryptedPassword** (string) - Optional - Encrypted password for protected documents. ``` -------------------------------- ### Upload File to Cloud Storage in JavaScript Source: https://docs.aspose.cloud/words/files-and-storage/upload-file This JavaScript example demonstrates how to upload a file to Cloud Storage using the Aspose.Words Cloud SDK. Ensure the SDK is installed and your credentials are set. ```javascript const AsposeWordsCloud = require("aspose-words-cloud"); // Initialize the WordsApi const wordsApi = new AsposeWordsCloud.WordsApi("YOUR_APP_SID", "YOUR_APP_KEY"); // Set the file path and storage name const filePath = "/path/to/your/file.ext"; const storageName = ""; // Optional, use default storage if empty // Upload the file wordsApi.uploadFile(filePath, storageName).then(response => { console.log(`File uploaded successfully: ${response.status}`); }).catch(error => { console.error(error); }); ``` -------------------------------- ### GET /words/{name}/sections/{sectionIndex}/pageSetup Source: https://docs.aspose.cloud/words/spec/section Retrieves the page setup properties of a section from a document stored in cloud storage. ```APIDOC ## GET /words/{name}/sections/{sectionIndex}/pageSetup ### Description Retrieves the page setup configuration for a specific section of a document stored in the cloud. ### Method GET ### Endpoint /words/{name}/sections/{sectionIndex}/pageSetup ### Parameters #### Path Parameters - **name** (string) - Required - The filename of the input document. - **sectionIndex** (int) - Required - The index of the section. #### Query Parameters - **folder** (string) - Optional - Original document folder. - **storage** (string) - Optional - Original document storage. - **loadEncoding** (string) - Optional - Encoding for HTML/TXT documents. - **password** (string) - Optional - Password for protected documents. - **encryptedPassword** (string) - Optional - Encrypted password for protected documents. ``` -------------------------------- ### Get Document Element Style - cURL Example Source: https://docs.aspose.cloud/words/styles/get Example of how to get the style of a document element using cURL. Replace placeholders with your actual credentials and file path. ```bash curl -X PUT "https://api.aspose.cloud/v4.0/words/online/get/document.body[0]/style?loadEncoding=UTF-8&password=your_password" \ -H "accept: application/json" \ -H "Content-Type: multipart/form-data" \ -F "document=@/path/to/your/document.docx" ``` -------------------------------- ### Install mount-s3 utility and create directory Source: https://docs.aspose.cloud/words/getting-started/how-to-deploy-docker-container-with-amazon-s3 This Dockerfile command installs the mount-s3 utility from a remote URL and creates a directory for mounting. Ensure you have wget and alien installed in your Docker image. ```dockerfile RUN wget https://s3.amazonaws.com/mountpoint-s3-release/latest/x86_64/mount-s3.rpm && \ alien --install mount-s3.rpm && \ mkdir /data ``` -------------------------------- ### Get all sections in a Word document using Java Source: https://docs.aspose.cloud/words/sections/get-all This Java example demonstrates how to use the Aspose.Words Cloud SDK to get all sections from a Word document. Ensure you have the SDK added to your project and your API credentials configured. ```java import com.aspose.words.cloud.api.WordsApi; import com.aspose.words.cloud.models.requests.DocumentGetSectionsRequest; public class GetSections { public static void main(String[] args) { // Initialize the API with your client ID and client secret WordsApi wordsApi = new WordsApi("YOUR_APP_SID", "YOUR_APP_KEY"); // Define the path to your document String documentPath = "document.docx"; // Create a request object DocumentGetSectionsRequest request = new DocumentGetSectionsRequest(documentPath); try { // Call the API to get all sections com.aspose.words.cloud.models.responses.DocumentSectionsResponse response = wordsApi.documentGetSections(request); // Process the response (e.g., print the number of sections) System.out.println("Number of sections: " + response.getSections().size()); } catch (ApiException e) { e.printStackTrace(); } } } ``` -------------------------------- ### Server Response Example Source: https://docs.aspose.cloud/words/convert/conversion-settings This is an example of a successful server response when saving a document. It indicates the status code and details about the saved document. ```json { "SaveResult": { "SourceDocument": { "Href": "https://api.aspose.cloud/v4.0/words/test_multi_pages.docx", "Rel": "self", "Type": null, "Title": null }, "DestDocument": { "Href": "test_multi_pages.pdf", "Rel": "saved", "Type": null, "Title": null }, "AdditionalItems": [ ] }, "Code": 200, "Status": "OK" } ``` -------------------------------- ### Get all field names in a Word document using C# SDK Source: https://docs.aspose.cloud/words/mail-merge/read-field-names-online Illustrates how to use the Aspose.Words Cloud SDK for C# to fetch all field names from a Word document. Ensure the SDK is installed and configured with your credentials. ```csharp using Aspose.Words.Cloud.Sdk; using Aspose.Words.Cloud.Model.Requests; public class GetFieldNamesExample { public static void Main(string[] args) { // Initialize WordsApi with your client ID and client secret var wordsApi = new WordsApi("YOUR_APP_SID", "YOUR_APP_KEY"); // Prepare the request object var request = new GetMailMergeFieldNamesRequest { Template = "path/to/your/document.docx", LoadEncoding = "UTF8", Password = "your_password", UseNonMergeFields = true }; // Call the API to get field names var response = wordsApi.GetMailMergeFieldNames(request); // Process the response (response.FieldNames contains the list of field names) foreach (var fieldName in response.FieldNames) { Console.WriteLine(fieldName); } } } ``` -------------------------------- ### Upload and Get all FormFields in a Word document with C# SDK Source: https://docs.aspose.cloud/words/formfields/get-all This C# code snippet demonstrates how to upload a document and retrieve all its form fields using the Aspose.Words Cloud SDK. Ensure you have the SDK installed and your API credentials configured. ```csharp using Aspose.Words.Cloud.Sdk; var apiClient = new ApiClient("YOUR_SIGNATURE", "YOUR_APP_SID"); var wordsApi = new WordsApi(apiClient); using (var file = File.OpenRead("sample.docx")) { var request = new GetFormFieldsRequest { Document = file }; var response = wordsApi.GetFormFields(request); Console.WriteLine(response); } ``` -------------------------------- ### Update Section Page Setup Source: https://docs.aspose.cloud/words/spec/section Updates the page setup for a specific section in a document. Supports both online and file-based operations. ```APIDOC ## PUT /words/updateSectionPageSetup ### Description Updates the page setup of a section. This operation can be performed online or on a document stored in the cloud. ### Method PUT ### Endpoint /words/updateSectionPageSetup ### Parameters #### Query Parameters - **name** (string) - Required - The name of the file to process. - **sectionIndex** (integer) - Required - The index of the section. - **folder** (string) - Optional - The source folder. - **storage** (string) - Optional - Cloud storage name. - **loadEncoding** (string) - Optional - Encoding that will be used to read an HTML document. - **password** (string) - Optional - Password for opening an encrypted document. - **destFileName** (string) - Optional - The name of the destination file. ### Request Body - **UpdateSectionPageSetupOnlineRequest** (object) - Required - The request body containing the updated page setup information. - **PageSetup** (object) - Required - The page setup object with updated properties. - **SectionStart** (string) - The type of section start. - **LeftMargin** (number) - The left margin. - **RightMargin** (number) - The right margin. - **TopMargin** (number) - The top margin. - **BottomMargin** (number) - The bottom margin. - **Orientation** (string) - The page orientation. - **Document** (object) - Optional - Document object for online operations. - **Data** (string) - Base64 encoded document data. ### Response #### Success Response (200) - **UpdateSectionPageSetupOnlineResponse** (object) - The response containing the updated page setup details. - **PageSetup** (object) - The updated page setup object. - **SectionStart** (string) - The type of section start. - **LeftMargin** (number) - The left margin. - **RightMargin** (number) - The right margin. - **TopMargin** (number) - The top margin. - **BottomMargin** (number) - The bottom margin. - **Orientation** (string) - The page orientation. - **RequestedUrl** (string) - The URL that was requested. #### Response Example ```json { "UpdateSectionPageSetupOnlineResponse": { "PageSetup": { "SectionStart": "NewPage", "LeftMargin": 60, "RightMargin": 60, "TopMargin": 80, "BottomMargin": 80, "Orientation": "Landscape" }, "RequestedUrl": "/words/updateSectionPageSetup?name=document.docx§ionIndex=0" } } ``` ``` -------------------------------- ### Define Product Configuration Source: https://docs.aspose.cloud/words/plugins/salesforce Stores the base URI for Aspose Cloud products. ```Apex public with sharing class Product { public static String BaseProductUri { get; set; } } ``` -------------------------------- ### Upload File to Cloud Storage in C# Source: https://docs.aspose.cloud/words/files-and-storage/upload-file This C# example demonstrates uploading a file to Cloud Storage using the Aspose.Words Cloud SDK. Ensure the SDK is referenced and your API credentials are provided. ```csharp using Aspose.Words.Cloud.Sdk; public class UploadFile { public static void Main(string[] args) { // Initialize the WordsApi WordsApi wordsApi = new WordsApi("YOUR_APP_SID", "YOUR_APP_KEY"); // Set the file path and storage name string filePath = "/path/to/your/file.ext"; string storageName = ""; // Optional, use default storage if empty // Upload the file var response = wordsApi.UploadFile(filePath, storageName); Console.WriteLine($"File uploaded successfully: {response.Status}"); } } ``` -------------------------------- ### Upload File to Cloud Storage in C++ Source: https://docs.aspose.cloud/words/files-and-storage/upload-file This C++ example shows how to upload a file to Cloud Storage using the Aspose.Words Cloud SDK. Include the necessary headers and provide your API credentials. ```cpp #include int main() { // Initialize the WordsApi aspose_words_cloud::WordsApi wordsApi("YOUR_APP_SID", "YOUR_APP_KEY"); // Set the file path and storage name std::string filePath = "/path/to/your/file.ext"; std::string storageName = ""; // Optional, use default storage if empty // Upload the file auto response = wordsApi.uploadFile(filePath, storageName); std::cout << "File uploaded successfully: " << response.status << std::endl; return 0; } ``` -------------------------------- ### Define Docker entrypoint with S3 mount Source: https://docs.aspose.cloud/words/getting-started/how-to-deploy-docker-container-with-amazon-s3 This Dockerfile command sets the entrypoint for the container, mounting an S3 bucket to /data and then running the Aspose.Words Cloud Web Application. Replace $S3_BUCKET_NAME with your actual bucket name. ```dockerfile ENTRYPOINT mount-s3 $S3_BUCKET_NAME /data && dotnet Aspose.Words.Cloud.WebApp.dll ``` -------------------------------- ### Run Aspose.Words Cloud Container via Command Line Source: https://docs.aspose.cloud/words/getting-started/how-to-run-docker-container Executes the container with license keys and volume mounts for fonts and data storage. ```bash docker run -e "LicensePublicKey=public_key" -e "LicensePrivateKey=private_key" -v "/fonts:/fonts" -v "/data:/data" aspose/words.cloud ``` -------------------------------- ### Server Response Example Source: https://docs.aspose.cloud/words/fields/remove This is a sample server response indicating a successful operation with a 200 OK status. ```json { "Code": 200, "Status": "OK" } ``` -------------------------------- ### Get all field names in a Word document using C++ SDK Source: https://docs.aspose.cloud/words/mail-merge/read-field-names-online Example of using the Aspose.Words Cloud SDK for C++ to retrieve all field names from a Word document. Requires SDK setup and authentication. ```cpp #include "Api/WordsApi.h" #include "Model/Requests/GetMailMergeFieldNamesRequest.h" #include int main() { // Initialize WordsApi with your client ID and client secret aspose::words::cloud::WordsApi wordsApi("YOUR_APP_SID", "YOUR_APP_KEY"); // Prepare the request object aspose::words::cloud::model::requests::GetMailMergeFieldNamesRequest request; request.setTemplate("path/to/your/document.docx"); request.setLoadEncoding("UTF8"); request.setPassword("your_password"); request.setUseNonMergeFields(true); try { // Call the API to get field names auto response = wordsApi.getMailMergeFieldNames(request); // Process the response (response->getFieldNames() contains the list of field names) for (const auto& fieldName : response->getFieldNames()) { std::cout << fieldName << std::endl; } } catch (const aspose::words::cloud::ApiException& e) { std::cerr << "Error: " << e.what() << std::endl; } return 0; } ``` -------------------------------- ### Get all field names in a Word document using Java SDK Source: https://docs.aspose.cloud/words/mail-merge/read-field-names-online Example of using the Aspose.Words Cloud SDK for Java to retrieve all field names from a Word document. Requires SDK setup and authentication. ```java import com.aspose.words.cloud.ApiClient; import com.aspose.words.cloud.ApiException; import com.aspose.words.cloud.api.WordsApi; import com.aspose.words.cloud.model.requests.GetMailMergeFieldNamesRequest; public class GetFieldNames { public static void main(String[] args) { // Initialize ApiClient with your client ID and client secret ApiClient apiClient = new ApiClient("YOUR_APP_SID", "YOUR_APP_KEY"); WordsApi wordsApi = new WordsApi(apiClient); // Prepare the request object GetMailMergeFieldNamesRequest request = new GetMailMergeFieldNamesRequest() .template("path/to/your/document.docx") .loadEncoding("UTF8") .password("your_password") .useNonMergeFields(true); try { // Call the API to get field names com.aspose.words.cloud.model.GetMailMergeFieldNamesResponse response = words_api.getMailMergeFieldNames(request); // Process the response (response.getFieldNames() contains the list of field names) System.out.println(response.getFieldNames()); } catch (ApiException e) { e.printStackTrace(); } } } ``` -------------------------------- ### Upload File to Cloud Storage in Java Source: https://docs.aspose.cloud/words/files-and-storage/upload-file This Java example shows how to upload a file to Cloud Storage using the Aspose.Words Cloud SDK. Make sure the SDK is included in your project and your credentials are set. ```java import com.aspose.words.cloud.WordsApi; import com.aspose.words.cloud.ApiException; import com.aspose.words.cloud.model.ResponseMessage; public class UploadFile { public static void main(String[] args) { // Initialize the WordsApi WordsApi wordsApi = new WordsApi("YOUR_APP_SID", "YOUR_APP_KEY"); // Set the file path and storage name String filePath = "/path/to/your/file.ext"; String storageName = ""; // Optional, use default storage if empty try { // Upload the file ResponseMessage response = words_api.uploadFile(filePath, storageName); System.out.println("File uploaded successfully: " + response.getStatus()); } catch (ApiException e) { e.printStackTrace(); } } } ``` -------------------------------- ### Get a footnote from a Word document in C# Source: https://docs.aspose.cloud/words/footnotes/get This C# code example illustrates how to retrieve a footnote from a Word document using the Aspose.Words Cloud SDK. You need to have the SDK installed and your API credentials set up. ```csharp using Aspose.Words.Cloud.Sdk; using Aspose.Words.Cloud.Sdk.Model.Requests; // Configure Aspose.Words Cloud API var apiClient = new ApiClient("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET"); var wordsApi = new WordsApi(apiClient); // Define parameters string nodePath = "documentElements/paragraph"; int index = 0; string filePath = "/path/to/your/document.docx"; // Create request object var request = new GetFootnotesRequest(nodePath, index); // Call the API // Note: The actual method to pass the file might vary based on SDK version. // This is a conceptual representation. // var response = wordsApi.GetFootnotes(request, filePath); // Process the response (e.g., save the footnote) // Console.WriteLine($"Footnote retrieved successfully: {response}"); Console.WriteLine("C# example placeholder. Refer to SDK documentation for exact file handling."); ``` -------------------------------- ### Get all field names in a Word document using cURL Source: https://docs.aspose.cloud/words/mail-merge/read-field-names-online Example of how to call the REST API to get all field names from a Word document using cURL. ```bash curl -X PUT "https://api.aspose.cloud/v4.0/words/online/get/mailMerge/FieldNames?loadEncoding=UTF8&password=your_password&encryptedPassword=your_encrypted_password&useNonMergeFields=true" -F "template=@/path/to/your/document.docx" ``` -------------------------------- ### Get a footnote from a Word document using cURL Source: https://docs.aspose.cloud/words/footnotes/get This example demonstrates how to call the REST API to get a footnote from a Word document using cURL. Ensure you have your API credentials. ```bash curl -X PUT "https://api.aspose.cloud/v4.0/words/online/get/{nodePath}/footnotes/{index}?loadEncoding=utf-8&password=your_password&encryptedPassword=your_encrypted_password" -H "accept: application/json" -H "x-amz-content-sha256: UNSIGNED-PAYLOAD" -H "x-amz-date: 20230101T120000Z" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -F "document=@/path/to/your/document.docx" ``` -------------------------------- ### Run Aspose.Words Cloud Docker container with S3 Source: https://docs.aspose.cloud/words/getting-started/how-to-deploy-docker-container-with-amazon-s3 This command starts the Aspose.Words Cloud Docker container, mounting the S3 bucket and exposing port 80. It uses the Dockerenv file for environment variables and requires specific device and capability flags for S3 mounting. ```bash docker run --rm --env-file Dockerenv --device /dev/fuse --cap-add SYS_ADMIN -p 80:80 aspose-cloud-s3 ``` -------------------------------- ### Get a field in a Word document using C++ Source: https://docs.aspose.cloud/words/fields/get Example of how to get a field from a Word document using the Aspose.Words Cloud SDK for C++. This method simplifies interacting with the REST API. ```cpp #include "aspose_words_cloud/api/words_api.h" #include "aspose_words_cloud/client/api_client.h" #include int main() { // Configure Aspose.Words Cloud API aspose_words_cloud::ApiClient apiClient("YOUR_APP_SID", "YOUR_APP_KEY"); aspose_words_cloud::WordsApi wordsApi(&apiClient); // Define document path and field index std::string nodePath = "Document.docx"; int fieldIndex = 0; try { // Get the field auto response = wordsApi.getField(nodePath, fieldIndex); std::cout << "Field retrieved successfully: " << response.toString() << std::endl; } catch (const aspose_words_cloud::ApiException& e) { std::cerr << "Exception when calling WordsApi: " << e.what() << std::endl; } return 0; } ``` -------------------------------- ### WordsApi Constructor Source: https://docs.aspose.cloud/words/spec/wordsapi Details on how to instantiate the WordsApi class. ```APIDOC ## WordsApi Aspose.Words for Cloud API. An object of the **WordsApi** class is created by the following constructor methods: ### Constructor 1 `WordsApi(string _**clientId**_, string _**clientSecret**_)` #### Parameters | Argument | Type | Description | |------------------|--------|-------------------| | _**clientId**_ | string | The client id. | | _**clientSecret**_| string | The client secret.| ### Constructor 2 `WordsApi(Configuration _**configuration**_)` #### Parameters | Argument | Type | Description | |-----------------|---------------|-------------------| | _**configuration**_| Configuration | The configuration object. | ``` -------------------------------- ### Get a field in a Word document using JavaScript Source: https://docs.aspose.cloud/words/fields/get Example of how to get a field from a Word document using the Aspose.Words Cloud SDK for JavaScript. This method simplifies interacting with the REST API. ```javascript const AsposeWordsCloud = require("aspose-words-cloud"); // Configure Aspose.Words Cloud API const apiClient = new AsposeWordsCloud.ApiClient({ appSid: "YOUR_APP_SID", apiKey: "YOUR_APP_KEY" }); const wordsApi = new AsposeWordsCloud.WordsApi(apiClient); // Define document path and field index const nodePath = "Document.docx"; const fieldIndex = 0; wordsApi.getField(nodePath, fieldIndex) .then(response => { console.log("Field retrieved successfully:", response); }) .catch(error => { console.error("Exception when calling WordsApi:", error); }); ``` -------------------------------- ### Get a field in a Word document using C# Source: https://docs.aspose.cloud/words/fields/get Example of how to get a field from a Word document using the Aspose.Words Cloud SDK for C#. This method simplifies interacting with the REST API. ```csharp using Aspose.Words.Cloud.Sdk; using Aspose.Words.Cloud.Model; using System; public class GetFieldExample { public static void Main(string[] args) { // Configure Aspose.Words Cloud API var apiClient = new ApiClient("YOUR_APP_SID", "YOUR_APP_KEY"); var wordsApi = new WordsApi(apiClient); // Define document path and field index string nodePath = "Document.docx"; int fieldIndex = 0; try { // Get the field var response = wordsApi.GetField(nodePath, fieldIndex); Console.WriteLine($"Field retrieved successfully: {response}"); } catch (ApiException e) { Console.WriteLine($"Exception when calling WordsApi: {e.Message}"); } } } ``` -------------------------------- ### Get a field in a Word document using Java Source: https://docs.aspose.cloud/words/fields/get Example of how to get a field from a Word document using the Aspose.Words Cloud SDK for Java. This method simplifies interacting with the REST API. ```java import com.aspose.words.cloud.ApiClient; import com.aspose.words.cloud.ApiException; import com.aspose.words.cloud.api.WordsApi; public class GetFieldExample { public static void main(String[] args) { // Configure Aspose.Words Cloud API ApiClient apiClient = new ApiClient("YOUR_APP_SID", "YOUR_APP_KEY"); WordsApi wordsApi = new WordsApi(apiותר ``` -------------------------------- ### PageSetup Properties Source: https://docs.aspose.cloud/words/spec/section Details the properties available for configuring the page setup of a document section. ```APIDOC ## PageSetup Represents a page setup properties of a section. This class is inherited from LinkElement and used in SectionPageSetupResponse, UpdateSectionPageSetupOnlineRequest, UpdateSectionPageSetupRequest. ### Properties - **Link** (WordsApiLink) - Gets or sets the link to the document. - **Bidi** (bool) - Gets or sets a value indicating whether this section contains bidirectional (complex scripts) text. - **BorderAlwaysInFront** (bool) - Gets or sets a value indicating whether the page border is positioned relative to intersecting texts and objects. - **BorderAppliesTo** (BorderAppliesToEnum) - Gets or sets the option that controls which pages the page border is printed on. - **BorderDistanceFrom** (BorderDistanceFromEnum) - Gets or sets the value, that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds. - **BottomMargin** (double) - Gets or sets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text. - **DifferentFirstPageHeaderFooter** (bool) - Gets or sets a value indicating whether a different header or footer is used on the first page. - **FirstPageTray** (int) - Gets or sets the paper tray (bin) to use for the first page of a section. The value is implementation (printer) specific. - **FooterDistance** (double) - Gets or sets the distance (in points) between the footer and the bottom of the page. - **Gutter** (double) - Gets or sets the amount of extra space added to the margin for document binding. - **HeaderDistance** (double) - Gets or sets the distance (in points) between the header and the top of the page. - **LeftMargin** (double) - Gets or sets the distance (in points) between the left edge of the page and the left boundary of the body text. - **LineNumberCountBy** (int) - Gets or sets the numeric increment for line numbers. - **LineNumberDistanceFromText** (double) - Gets or sets the distance between the right edge of line numbers and the left edge of the document. - **LineNumberRestartMode** (LineNumberRestartModeEnum) - Gets or sets the way line numbering runs that is, whether it starts over at the beginning of a new page or section or runs continuously. - **LineStartingNumber** (int) - Gets or sets the starting line number. - **Orientation** (OrientationEnum) - Gets or sets the orientation of the page. - **OtherPagesTray** (int) - Gets or sets the paper tray (bin) to be used for all but the first page of a section. The value is implementation (printer) specific. - **PageHeight** (double) - Gets or sets the height of the page in points. - **PageNumberStyle** (PageNumberStyleEnum) - Gets or sets the page number format. - **PageStartingNumber** (int) - Gets or sets the starting page number of the section. - **PageWidth** (double) - Gets or sets the width of the page in points. - **PaperSize** (PaperSizeEnum) - Gets or sets the paper size. - **RestartPageNumbering** (bool) - Gets or sets a value indicating whether page numbering restarts at the beginning of the section. - **RightMargin** (double) - Gets or sets the distance (in points) between the right edge of the page and the right boundary of the body text. - **RtlGutter** (bool) - Gets or sets a value indicating whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language. - **SectionStart** (SectionStartEnum) - Gets or sets the type of section break for the specified object. - **SuppressEndnotes** (bool) - Gets or sets a value indicating whether endnotes are printed at the end of the next section that doesn’t suppress endnotes. Suppressed endnotes are printed before the endnotes in that section. - **TopMargin** (double) - Gets or sets the distance (in points) between the top edge of the page and the top boundary of the body text. - **VerticalAlignment** (VerticalAlignmentEnum) - Gets or sets the vertical alignment of text on each page in the document.or section. ``` -------------------------------- ### Get a field in a Word document using Python Source: https://docs.aspose.cloud/words/fields/get Example of how to get a field from a Word document using the Aspose.Words Cloud SDK for Python. This method simplifies interacting with the REST API. ```python import aspose.words.cloud from aspose_words_cloud.rest import ApiException # Configure Aspose.Words Cloud API api_client = aspose.words.cloud.ApiClient(app_sid='YOUR_APP_SID', app_key='YOUR_APP_KEY') words_api = aspose.words.cloud.WordsApi(api_client) # Define document path and field index node_path = "Document.docx" field_index = 0 try: # Get the field response = words_api.get_field(node_path=node_path, index=field_index) print(f"Field retrieved successfully: {response}") except ApiException as e: print(f"Exception when calling WordsApi: {e}") ``` -------------------------------- ### Get all sections in a Word document using cURL Source: https://docs.aspose.cloud/words/sections/get-all This example demonstrates how to call the Aspose.Words Cloud REST API to get all sections from a Word document using cURL. Ensure you have your API credentials. ```bash curl -X PUT "https://api.aspose.cloud/v4.0/words/online/get/sections?loadEncoding=UTF-8&password=your_password&encryptedPassword=your_encrypted_password" -H "accept: application/json" -H "Content-Disposition: form-data; name=\"document\"; filename=\"document.docx\"" -H "Content-Type: multipart/form-data" -F "document=@./document.docx" ``` -------------------------------- ### POST /CreateFolder Source: https://docs.aspose.cloud/words/spec/file Creates a new folder in the storage. Folders can be created recursively. ```APIDOC ## POST /CreateFolder ### Description Creates a new folder in the storage. The folders will be created recursively. ### Method POST ### Parameters #### Query Parameters - **path** (string) - Required - Target folder’s path e.g. Folder1/Folder2/. - **storageName** (string) - Optional - Storage name. ``` -------------------------------- ### Get all field names in a Word document using JavaScript SDK Source: https://docs.aspose.cloud/words/mail-merge/read-field-names-online Demonstrates how to use the Aspose.Words Cloud SDK for JavaScript to get all field names from a Word document. Ensure the SDK is installed and authenticated. ```javascript const { WordsApi } = require('aspose-words-cloud'); // Initialize WordsApi with your client ID and client secret const wordsApi = new WordsApi('YOUR_APP_SID', 'YOUR_APP_KEY'); // Prepare the request object const request = { template: 'path/to/your/document.docx', loadEncoding: 'UTF8', password: 'your_password', useNonMergeFields: true }; // Call the API to get field names wordsApi.getMailMergeFieldNames(request) .then(response => { // Process the response (response.body.fieldNames contains the list of field names) console.log(response.body.fieldNames); }) .catch(error => { console.error('Error:', error); }); ``` -------------------------------- ### Verify Aspose.Words Cloud Deployment with cURL Source: https://docs.aspose.cloud/words/getting-started/how-to-deploy-docker-container-with-azure Use this command to test the service by creating a document in the configured storage. Replace YOUR_IP with the actual IP address of your container instance. ```bash curl -v "http://YOUR_IP/v4.0/words/create?filename=Test.docx" -X PUT -d "" ``` -------------------------------- ### Get all field names in a Word document using Python SDK Source: https://docs.aspose.cloud/words/mail-merge/read-field-names-online Demonstrates how to use the Aspose.Words Cloud SDK for Python to get all field names from a Word document. Ensure you have the SDK installed and authenticated. ```python from aspose.words.cloud import WordsApi from aspose.words.cloud.models.requests import GetMailMergeFieldNamesRequest # Initialize WordsApi with your client ID and client secret words_api = WordsApi(app_sid='YOUR_APP_SID', app_key='YOUR_APP_KEY') # Prepare the request object request = GetMailMergeFieldNamesRequest( template='path/to/your/document.docx', load_encoding='UTF8', password='your_password', use_non_merge_fields=True ) # Call the API to get field names response = words_api.get_mail_merge_field_names(request) # Process the response (response.field_names contains the list of field names) print(response.field_names) ``` -------------------------------- ### GET /words/info Source: https://docs.aspose.cloud/words/info Retrieves information about the application, including the version number and build date, useful for troubleshooting and version tracking. ```APIDOC ## GET /words/info ### Description Retrieves information about the application, such as the version number and build date. This method is useful for troubleshooting and verifying that the application is up-to-date. ### Method GET ### Endpoint https://api.aspose.cloud/v4.0/words/info ### Response #### Success Response (200) - **version** (string) - The version number of the application. - **buildDate** (string) - The build date of the application. ``` -------------------------------- ### Get Section Page Settings using C# Source: https://docs.aspose.cloud/words/sections/read This C# example shows how to get the page settings for a section in a Word document using the Aspose.Words Cloud SDK. It requires your API credentials and the document details. ```csharp using System; using Aspose.Words.Cloud.Sdk; using Aspose.Words.Cloud.Model.Requests; public class GetSectionPageSetup { public static void Main(string[] args) { WordsApiClient apiClient = new WordsApiClient("YOUR_APP_SID", "YOUR_APP_KEY"); try { GetSectionPageSetupRequest request = new GetSectionPageSetupRequest("document.docx", 0); var response = apiClient.WordsApi.GetSectionPageSetup(request); Console.WriteLine(response.PageSetup.AnyPageNumber); } catch (ApiException e) { Console.WriteLine(e.Message); } } } ```