{"id":17350308,"url":"https://github.com/buehler/flutter_pdfium","last_synced_at":"2026-02-25T07:41:07.855Z","repository":{"id":243227734,"uuid":"806104377","full_name":"buehler/flutter_pdfium","owner":"buehler","description":"Native library bindings for the PDFium library to be used in Flutter.","archived":false,"fork":false,"pushed_at":"2024-06-25T09:11:23.000Z","size":1518,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-17T17:15:51.972Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_pdfium","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buehler.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-26T11:44:24.000Z","updated_at":"2024-12-30T08:44:43.000Z","dependencies_parsed_at":"2024-06-10T08:17:08.366Z","dependency_job_id":"8afa088a-5491-42b3-afcc-11b8aceb15f1","html_url":"https://github.com/buehler/flutter_pdfium","commit_stats":null,"previous_names":["buehler/flutter_pdfium"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/buehler/flutter_pdfium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buehler%2Fflutter_pdfium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buehler%2Fflutter_pdfium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buehler%2Fflutter_pdfium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buehler%2Fflutter_pdfium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buehler","download_url":"https://codeload.github.com/buehler/flutter_pdfium/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buehler%2Fflutter_pdfium/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267184145,"owners_count":24049127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T17:06:27.865Z","updated_at":"2026-02-25T07:41:02.834Z","avatar_url":"https://github.com/buehler.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter PDFium Bindings\n\nThis project is a Flutter plugin that provides bindings for the [PDFium](https://pdfium.googlesource.com/pdfium/) library. PDFium is an open-source PDF rendering engine that is used by the Chromium web browser. This FFI plugin delivers the native bindings for the library to Flutter and enables dynamic loading of the library for each platform. Further, the lib is not included in the package, but downloaded during the build process.\n\n\u003e Note: MacOS and iOS will download the library files upon `pod install`, while the other platforms will download the respective libraries during the build process with `cmake`.\n\nAll public functions of the PDFium headers are remapped in this library. This allows the library to only bind the required structs and elements that are really needed by the library.\n\n## Usage\n\nFirst of all, you need to install the package in your flutter project: `flutter pub add flutter_pdfium`. After that, you can use the library in your project. The binary will be\ndownloaded during the build process (can be reviewed in the respective CMakeList.txt or podspec files).\n\nTo use the library, either use the `Pdfium` class directly (if you want to load the lib by yourself), or use the provided `createInitializedLibrary()` function, that determines the correct libname for the platform and loads the respective library. The library is then initialized and ready to use.\n\nPlease note that the library must be disposed after usage to free the resources.\n\n```dart\nimport 'dart:ffi' as ffi;\n\nimport 'package:flutter_pdfium/flutter_pdfium.dart';\n\nfinal pdfium = createInitializedLibrary();\n\nfinal doc = pdfium.LoadDocument(\n    'file_path'.toNativeUtf8().cast\u003cffi.Char\u003e(),\n    'password'.toNativeUtf8().cast\u003cffi.Char\u003e(),\n)\n\nif (doc == ffi.nullptr) {\n    print('Failed to load document');\n    return;\n}\n\nfinal pageCount = pdfium.GetPageCount(doc);\n\npdfium.CloseDocument(doc);\npdfium.DestroyLibrary();\n```\n\n## Development\n\nTo clone and build this repository (and the example that it contains), the headers and sources must be generated locally. For the deployed package, the headers are already generated and included in the package (during the github actions step).\n\nYou need the following tools:\n\n- clang\n- [just](https://just.systems)\n- python 3 (at least 3.12)\n- curl\n\nWhen the repository is cloned, you can just run `just configure`. This will download the PDFium version, creates the AST for the bindings and then generates the respective headers that are required. Then, FFIGEN will run to generate the dart bindings. After this step is done, you can run the example project with `flutter run`. As with the deployed package, the effective library will be downloaded during the build process.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuehler%2Fflutter_pdfium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuehler%2Fflutter_pdfium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuehler%2Fflutter_pdfium/lists"}