docx_mailmerge 2.0.0 copy "docx_mailmerge: ^2.0.0" to clipboard
docx_mailmerge: ^2.0.0 copied to clipboard

Package for performing a mailmerge operation on merge fields within a DOCX document

example/docx_mailmerge_example.dart

import 'dart:io';

import 'package:docx_mailmerge/docx_mailmerge.dart';

void main() {
  //Read a docx file as bytes and pass it to the constructor
  final merge =
      DocxMailMerge(File('test/files/original1.docx').readAsBytesSync());
  //This is just to ensure the output directory exists
  Directory('test/tmp').createSync();
  //Writes the generated merge information(bytes) to the output file
  File('test/tmp/example.docx').writeAsBytesSync(
      merge.merge({'First_Name': 'hello world'}, removeEmpty: false));
}
6
likes
160
points
151
downloads

Publisher

unverified uploader

Weekly Downloads

Package for performing a mailmerge operation on merge fields within a DOCX document

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

archive, shlex, xml

More

Packages that depend on docx_mailmerge