Skip to main content

dox_pdf_me 0.0.2 copy "dox_pdf_me: ^0.0.2" to clipboard
dox_pdf_me: ^0.0.2 copied to clipboard

Make PDF files from pdfme templates in Dart. A port of the pdfme generator on top of dox_pdf_lib.

example/main.dart

// The quick start of the README. Run: dart run example/main.dart
import 'dart:io';
import 'dart:typed_data';

import 'package:dox_pdf_me/dox_pdf_me.dart';

Future<void> main() async {
  // An A4 page. Sizes and positions are in millimetres.
  Template template = Template(
    basePdf: const BlankPdf(),
    schemas: <List<Schema>>[
      <Schema>[
        const TextSchema(
          name: 'title',
          position: Position(20, 20),
          width: 170,
          height: 15,
          fontSize: 24,
        ),
        BarcodeSchema(
          name: 'link',
          barcodeType: BarcodeType.qrcode,
          position: const Position(20, 40),
        ),
      ],
    ],
  );

  Uint8List pdf = await generate(
    template: template,
    inputs: <Map<String, String>>[
      <String, String>{'title': 'Hello, pdfme!', 'link': 'https://pdfme.com'},
    ],
    plugins: builtInPlugins,
  );
  File('hello.pdf').writeAsBytesSync(pdf);
}
0
likes
160
points
--
downloads

Documentation

API reference

Publisher

verified publisherdartondox.dev

Weekly Downloads

Make PDF files from pdfme templates in Dart. A port of the pdfme generator on top of dox_pdf_lib.

Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

barcode, characters, dox_pdf_lib, xml

More

Packages that depend on dox_pdf_me