Nggunakake REST API ing Dart, pangembang bisa ngompres dokumen ing DOC, DOCX, RTF, PDF, lan format liyane. Kanthi solusi sing diwenehake, output bakal dadi file berkualitas tinggi sawise kompresi.
Nggunakake Dart API sing kuat, pangembang bisa ngompres file kanggo ngoptimalake konten lan ukuran file output. Ngurangi ukuran file dumadi kanthi ngresiki data lan sumber daya sing ora digunakake. Sampeyan uga bisa compress gambar kanggo nggawe ukuran file output malah luwih cilik.
Asil optimasi lan kompresi isi bisa disimpen ing format file asli utawa format nyimpen sing kasedhiya - DOCX, DOC, RTF, PDF, HTML lan liya-liyane.
Kaya sing wis kasebut, SDK Dart/Flutter kita ngidini sampeyan nyuda ukuran dokumen kanthi program ing format apa wae sing didhukung. Contone, sampeyan bisa nyuda ukuran PDF file, DOCX, DOC, RTF, ODT, EPUB, HTML lan format liyane. Lan saiki sampeyan bisa nyoba fungsi sing kuat lan ngevaluasi cara ngompres dokumen ing Dart kanthi conto ing ngisor iki:
import 'package:aspose_words_cloud/aspose_words_cloud.dart';
final config = Configuration("####-####-####-####-####", "##################");
final wordsApi = WordsApi(config);
final requestDocument = (await File('Input.docx').readAsBytes()).buffer.asByteData();
final requestCompressOptions = CompressOptions();
requestCompressOptions.imagesQuality = 75;
requestCompressOptions.imagesReduceSizeFactor = 1;
final compressDocumentRequest = CompressDocumentOnlineRequest(
requestDocument, requestCompressOptions);
final compressDocument = await wordsApi.compressDocumentOnline(compressDocumentRequest);
final convertDocument = ConvertDocumentRequest(compressDocument.document.values.first, 'docx');
await wordsApi.convertDocument(convertDocument);
Klone Aspose.Words Cloud SDK for Dart saka GitHub lan gunakake ing proyek sampeyan. Tambah dependensi iki menyang pubspec.yaml: dependencies: aspose_words_cloud: 22.4.0
Tututi Instructions iki supaya cepet entuk kredensial keamanan sing dibutuhake lan ngakses REST API kita.
Deleng Repository Documentation kanggo ndeleng rincian.