Easily open DOCX documents with just a few lines of Dart code. Our Dart/Flutter library will provide you with everything you need to access DOCX document content programmatically.
The task of reading DOCX documents is the task of reading hierarchical data structures within the DOM model. This implies knowing the format of each individual DOCX data element, including all of its possible child elements and attributes.
Our Dart library is a cloud-based solution that will allow you to open DOCX files for reading and writing easily. This distributed approach gives you flexibility in software development using Dart language, as all resource-intensive DOCX document processing will take place on Aspose servers. All you need is to get private keys to access Cloud API in Dart code.
You can iterate over all elements of a DOCX document or you can search for specific elements in a DOM tree. We provide a wide range of Dart functions both for working with the structure of the DOCX file and with the data contained in the document nodes.
The following code example will help you quickly figure out how to load a DOCX file using Dart and perform some actions on it.
import 'package:aspose_words_cloud/aspose_words_cloud.dart';
final config = Configuration("####-####-####-####-####", "##################");
final wordsApi = WordsApi(config);
final fileName = 'Input.docx';
final requestFileContent = (await File(
await context.loadTextFile(fileName)).readAsBytes()).buffer.asByteData();
final uploadDocumentRequest = UploadFileRequest(requestFileContent, fileName);
await wordsApi.uploadFile(uploadDocumentRequest);
final requestParagraph = ParagraphInsert();
requestParagraph.text = 'Reading and writing to the file in the cloud occurs automatically.';
final insertParagraphRequest = InsertParagraphRequest(fileName, requestParagraph);
await wordsApi.insertParagraph(insertParagraphRequest);
final downloadDocumentRequest = DownloadFileRequest(fileName);
await wordsApi.downloadFile(downloadDocumentRequest);
Clone Aspose.Words Cloud SDK for Dart source code from GitHub and use it in your project. Add this dependency to your pubspec.yaml: dependencies: aspose_words_cloud: 22.4.0
Please follow these Instructions to quickly get the necessary security credentials and access our REST API.
Refer to the Repository Documentation to see the details.