Nglindhungi dokumen saka distribusi ora sah lan nambah watermark online. Kanggo nindakake iki, mung mbukak PDF, Word utawa format dokumen liyane lan tambahake teks utawa watermark gambar nggunakake Dart. Banjur simpen PDF dokumen utawa Word sing ditandhani banyu ing format sing trep kayata DOC, DOCX, PDF, HTML, RTF, XPS lan liya-liyane. Sampeyan uga bisa mbusak tandha banyu saka dokumen supaya luwih gampang diproses kajaba nglanggar hak sapa wae.
Kanthi API Dart/Flutter iki, pangembang bisa nambah tandha banyu menyang PDF, Word, utawa dokumen liyane kanthi online. Sampeyan bisa nggawe tandha banyu nggunakake teks utawa gambar banjur lebokake tandha banyu kasebut menyang PDF dokumen utawa Word kanthi nyetel sudut overlay ing Dart.
Cathetan: ora perlu nginstal aplikasi utawa perpustakaan pihak katelu. Mulane, solusi piranti lunak Dart/Flutter kita gampang banget digunakake.
SDK Dart/Flutter sing diwenehake uga mbantu mbusak tandha banyu. Contone, mbusak watermark ing Word tegese sampeyan bisa mbukak Word dokumen sing dipengini kanthi prangko teks utawa watermark gambar, mbusak tandha banyu iki saka dokumen nggunakake Dart, banjur nyimpen file output ing format sing trep.
Kanggo ngevaluasi API Dart/Flutter kita, muat dokumen sing pengin ditambahake watermark lan watermark minangka gambar utawa teks. Banjur pilih format file ekspor sing trep - DOCX, PDF, MD, HTML, TXT, DOC, RTF, EPUB, XPS lan liya-liyane.
Gunakake conto ing ngisor iki kanggo ndeleng cara kerjane:
import 'package:aspose_words_cloud/aspose_words_cloud.dart';
final config = Configuration("####-####-####-####-####", "##################");
final wordsApi = WordsApi(config);
final requestDocument = (await File('Input1.docx').readAsBytes()).buffer.asByteData();
final requestImageStream = (await File('Input2.jpg').readAsBytes()).buffer.asByteData();
final requestWatermarkData = WatermarkDataImage();
requestWatermarkData.image = FileReference.fromLocalFile(requestImageStream);
final insertWatermarkRequest = InsertWatermarkOnlineRequest(
requestDocument, requestWatermarkData);
final insertWatermarkResult = await wordsApi.InsertWatermarkOnline(
insertWatermarkRequest);
final convertRequest = ConvertDocumentRequest(
insertWatermarkResult.document.values.first, 'docx');
await wordsApi.convertDocument(convertRequest);
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 requestWatermarkData = WatermarkDataText();
requestWatermarkData.text = 'This is the watermark text';
requestWatermarkData.layout = WatermarkDataText_LayoutEnum.diagonal;
final insertWatermarkRequest = InsertWatermarkOnlineRequest(
requestDocument, requestWatermarkData);
final insertWatermarkResult =
await wordsApi.InsertWatermarkOnline(insertWatermarkRequest);
final convertRequest = ConvertDocumentRequest(
insertWatermarkResult.document.values.first, 'docx');
await wordsApi.convertDocument(convertRequest);
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 deleteWatermarkOnline = DeleteWatermarkOnlineRequest(requestDocument);
final deletedWatermark = await wordsApi.deleteWatermarkOnline(deleteWatermarkOnline);
final convertDocument = ConvertDocumentRequest(deletedWatermark.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.