docs_gee
1.5.1, released 5 weeks ago by codigee.com
Generate Microsoft Word DOCX and PDF documents in pure Dart.
What it does
A pure Dart library for generating and reading DOCX and PDF documents from a single document model. It supports rich text formatting, tables, lists, images, headers, and footers across all platforms without native dependencies.
AI-written summary of version 1.5.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to generate Microsoft Word or PDF files programmatically from Dart or Flutter.
- You require cross-platform document generation without relying on native platform SDKs.
- You want to share the same document model for both DOCX and PDF output formats.
Skip it when
- You need complex PDF features like bidirectional text shaping, which are not supported for PDFs.
- You require advanced layout rendering not expressible via the provided paragraph and table models.
Strengths
- Pure Dart with no native dependencies, making it work on iOS, Android, Web, macOS, Windows, and Linux.
- Dual format generation (DOCX and PDF) from a single document model.
- Lightweight with only a single dependency on the archive package.
Weaknesses
- PDF generator lacks support for certain DOCX-only features like headers, footers, right-to-left text, and images.
- PDF support for Polish characters is partial due to font encoding limitations.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
import 'dart:io';
import 'package:docs_gee/docs_gee.dart';
void main() {
final doc = Document(title: 'My Report', author: 'John Doe');
doc.addParagraph(Paragraph.heading('Quarterly Report', level: 1));
doc.addParagraph(Paragraph.text('This report summarizes Q4 performance.'));
File('report.docx').writeAsBytesSync(DocxGenerator().generate(doc));
File('report.pdf').writeAsBytesSync(PdfGenerator().generate(doc));
}Alternatives
Packages that do the same job and could replace docs_gee.
- syncfusion_flutter_pdfviewer
Flutter PDF Viewer library to display PDF documents seamlessly and efficiently.
86Compare - flutter_html_to_pdf_plus
Flutter plugin for generating PDF documents from HTML code templates.
65Compare - syncfusion_flutter_pdf
Native Dart library for creating, reading, editing, and securing PDF files.
89Compare - htmltopdfwidgets
Converts HTML and Markdown content into high-quality PDF widgets.
81Compare
Works with
Packages commonly used together with docs_gee: ones it builds on, ones built on it, and its own family.