tree: 4421e9d69c22d93df95d1405c8fd4e0c5b8355ca
  1. android/
  2. lib/
  3. linux/
  4. windows/
  5. .gitignore
  6. analysis_options.yaml
  7. pubspec.yaml
  8. README.md
pkgs/jnigen/examples/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.