Skip to main content

emon_core 0.3.0-preview.7 copy "emon_core: ^0.3.0-preview.7" to clipboard
emon_core: ^0.3.0-preview.7 copied to clipboard

Dart API over the emon C library (PDF and image to semantic HTML/JSON), with engine adapters, model packs and build hooks.

example/main.dart

// Convert a PDF or image to HTML with no OCR engine (born-digital PDFs and images with text).
//
//   dart run example/main.dart INPUT OUTPUT.html
import 'dart:io';

import 'package:emon_core/emon_core.dart';

Future<void> main(List<String> args) async {
  if (args.length != 2) {
    stderr.writeln('usage: dart run example/main.dart INPUT OUTPUT.html');
    exit(2);
  }
  final emon = await Emon.open();
  try {
    final model = await emon.convert(EmonInput.file(args[0]));
    File(args[1]).writeAsStringSync(await model.html());
    await model.dispose();
  } finally {
    await emon.close();
  }
}
0
likes
0
points
346
downloads

Publisher

verified publisher3sln.com

Weekly Downloads

Dart API over the emon C library (PDF and image to semantic HTML/JSON), with engine adapters, model packs and build hooks.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

archive, code_assets, crypto, ffi, hooks, path

More

Packages that depend on emon_core