docx_filler 1.0.3 copy "docx_filler: ^1.0.3" to clipboard
docx_filler: ^1.0.3 copied to clipboard

docx filler

docx_filler #

docx_filler — это библиотека для заполнения DOCX-шаблонов на Dart.

Она позволяет заменять метки (placeholders) в файле .docx на реальные данные, создавая готовые документы без необходимости использовать Microsoft Word или другие внешние программы.

🚀 Возможности #

  • Поддержка заполнения шаблонов DOCX с произвольными метками
  • Гибкая обработка текста, таблиц и картинок
  • Простая интеграция с Flutter-приложением
  • Работает полностью на Dart

📦 Пример использования #

import 'dart:io';

import 'package:docx_filler/docx_filler.dart';
import 'package:path/path.dart' as p;

void main() async {
  final scriptDir = File(Platform.script.toFilePath()).parent.path;

  final imageData = <String, String>{'cat': 'cat.jpg', 'dog': 'dog.jpg'};
  final textData = <String, Object>{
    'checklist.name': 'Checklist #1',
    'points': [
      {'name': 'point #1', 'result': 'success'},
      {'name': 'point #2', 'result': 'fail'},
    ],
  };

  final inputDocx = p.join(scriptDir, 'template.docx');
  final outputDocx = p.join(scriptDir, 'filled_template.docx');

  await DocxFiller.fill(
    inputDocx: inputDocx,
    outputDocx: outputDocx,
    textData: textData,
    imageData: imageData,
  );
}
0
likes
110
points
40
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

docx filler

Repository (GitHub)

License

MIT (license)

Dependencies

archive, intl, path, path_provider, xml

More

Packages that depend on docx_filler