tree: 578325fde45b782a6c21829cc6a56903daeefaf3 [path history] [tgz]
  1. android/
  2. lib/
  3. linux/
  4. windows/
  5. .gitignore
  6. analysis_options.yaml
  7. pubspec.yaml
  8. README.md
pkgs/jnigen/example/pdfbox_plugin/example/README.md

pdfbox_plugin_example

Demonstrates how to use the PDFBox bindings generated using jnigen. This is a Linux Flutter application. The sample application lists the PDF files in a directory with number of pages and title, also allowing to navigate between directories.

First, it's required to have generated the dart and C bindings in the plugin directory, which also downloads the required JARs using maven. The bindings are not committed because generated code is several thousands of lines.

On a Linux machine, following commands can be used to run the example application.

cd .. ## From this folder
dart run jnigen --config jnigen.yaml ## Downloads PDFBox JARs and generates bindings.
cd example/
flutter run --release ## Opens the files list from home directory

It may take some time for PDFBox to process all PDFs in a directory. In the interest of simplicity, this example application displays the list after all PDFs are processed.

Follow along the code in lib/main.dart to see how generated bindings are used.