Our powerful Dart SDK allows you to find the difference between DOC documents and save the results to a convenient format for viewing. To verify our product capabilities, compare DOC files using this Dart library and see the differences.
Our Dart/Flutter SDK is designed to give you the most accurate result, even though comparison is a complex function itself.
Sometimes you need to be sure that the document in the DOC format has not been changed, and if it has, you need to find out what the difference is. Just use our Dart/Flutter diff tool to compare two DOC files and find differences in whole words or single characters. Moreover, if only one character in a word has changed, this word will be marked as changed entirely.
Now you no longer need to spend time manually comparing DOC documents, and you can quickly find even small changes and export such diffs to a document in a convenient format.
Check out how our solution to compare DOC files using Dart/Flutter SDK works. To achieve this, load the DOC files you want to compare and select the export file format – it will be automatically loaded after comparing.
Note that you need to accept all revisions in compared documents before calling the comparison method, as shown in our example:
import 'package:aspose_words_cloud/aspose_words_cloud.dart';
final config = Configuration("####-####-####-####-####", "##################");
final wordsApi = WordsApi(config);
final fileName1 = 'Input1.doc';
final fileName2 = 'Input2.doc';
final fileResult = 'Output.doc';
// Upload documents to cloud storage.
final firstDocumentContent = (await File(fileName1).readAsBytes()).buffer.asByteData();
final uploadFirstFileRequest = UploadFileRequest(firstDocumentContent, fileName1);
await wordsApi.uploadFile(uploadFirstFileRequest);
final secondDocumentContent = (await File(fileName2).readAsBytes()).buffer.asByteData();
final uploadSecondFileRequest = UploadFileRequest(secondDocumentContent, fileName2);
await wordsApi.uploadFile(uploadSecondFileRequest);
// Compare documents in cloud.
final compareDataOptions = CompareData();
compareDataOptions.author = 'author';
compareDataOptions.fileReference = FileReference.fromRemoteFile(fileName2);
final compareDocumentRequest =
CompareDocumentRequest(fileName1, compareDataOptions, destFileName: fileResult);
await wordsApi.compareDocument(compareDocumentRequest);
// Download result document from cloud storage.
final downloadFileRequest = DownloadFileRequest(fileResult);
final downloadFileResult = await wordsApi.downloadFile(downloadFileRequest);
await File('compareResult.pdf').writeAsBytes(
downloadFileResult.buffer.asUint8List(
downloadFileResult.offsetInBytes, downloadFileResult.lengthInBytes)
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.
You can perform compare operation for other file formats: