{"id":19760414,"url":"https://github.com/refactory-id/flutter_plugin_pdf_viewer","last_synced_at":"2025-07-29T05:04:12.951Z","repository":{"id":68432218,"uuid":"345515382","full_name":"refactory-id/flutter_plugin_pdf_viewer","owner":"refactory-id","description":"PDF Plugin For Flutter","archived":false,"fork":false,"pushed_at":"2021-03-08T03:10:06.000Z","size":597,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T09:50:29.813Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/refactory-id.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}},"created_at":"2021-03-08T03:09:33.000Z","updated_at":"2021-03-08T03:20:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab5c9714-e309-4044-ac63-12863aa07801","html_url":"https://github.com/refactory-id/flutter_plugin_pdf_viewer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/refactory-id/flutter_plugin_pdf_viewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refactory-id%2Fflutter_plugin_pdf_viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refactory-id%2Fflutter_plugin_pdf_viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refactory-id%2Fflutter_plugin_pdf_viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refactory-id%2Fflutter_plugin_pdf_viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refactory-id","download_url":"https://codeload.github.com/refactory-id/flutter_plugin_pdf_viewer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refactory-id%2Fflutter_plugin_pdf_viewer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267632858,"owners_count":24118748,"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-29T02:00:12.549Z","response_time":2574,"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-11-12T03:37:10.927Z","updated_at":"2025-07-29T05:04:12.928Z","avatar_url":"https://github.com/refactory-id.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flutter_plugin_pdf_viewer\n\nA flutter plugin for handling PDF files. Works on both Android \u0026 iOS\n\n## Installation\n\nAdd  *flutter_plugin_pdf_viewer*  as a dependency in [your pubspec.yaml file](https://flutter.io/platform-plugins/).\n```\nflutter_plugin_pdf_viewer: any\n```\n\n---\n\n## Android\nNo permissions required. Uses application cache directory.\n\n## iOS\nNo permissions required.\n\n## How-to:\n\n#### Load PDF\n```\n// Load from assets\nPDFDocument doc = await PDFDocument.fromAsset('assets/test.pdf');\n \n// Load from URL\nPDFDocument doc = await PDFDocument.fromURL('http://www.africau.edu/images/default/sample.pdf');\n\n// Load from file\nFile file  = File('...');\nPDFDocument doc = await PDFDocument.fromFile(file);\n```\n\n#### Load pages\n```\n// Load specific page\nPDFPage pageOne = await doc.get(page: _number);\n```\n\n#### Pre-built viewer\nUse the pre-built PDF Viewer\n```\n@override\n  Widget build(BuildContext context) {\n    Scaffold(\n        appBar: AppBar(\n          title: Text('Example'),\n        ),\n        body: Center(\n        child: _isLoading\n            ? Center(child: CircularProgressIndicator())\n            : PDFViewer(document: document)),\n    );\n  }\n```\n\nThis code produces the following view:\n\n\u003cimg height=\"500px\" src=\"https://raw.githubusercontent.com/CrossPT/flutter_pdf_viewer/master/demo.png\" alt=\"Demo Screenshot 1\"/\u003e\n\n---\n\n## TODO\n\n* Allow password-protected files\n* ~~Refactor PDFDocument.getAll() method~~\n* ~~Increase page resolution~~\n* Add swipe to change page\n\n---\n\n#### Third-party packages used\n\n| Name | Description  |\n|-|-|\n| [path_provider](https://pub.dartlang.org/packages/path_provider)               | A Flutter plugin for finding commonly used locations on the filesystem. Supports iOS and Android.            |\n| [flutter_cache_manager](https://pub.dartlang.org/packages/flutter_cache_manager)       | A CacheManager to download and cache files in the cache directory of the app. Various settings on how long to keep a file can be changed. |\n| [numberpicker](https://pub.dartlang.org/packages/numberpicker)                | NumberPicker is a custom widget designed for choosing an integer or decimal number by scrolling spinners. |\n| [flutter_advanced_networkimage](https://pub.dartlang.org/packages/flutter_advanced_networkimage) | An advanced image provider provides caching and retrying for flutter app. Now with zoomable widget and transition to image widget. |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefactory-id%2Fflutter_plugin_pdf_viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefactory-id%2Fflutter_plugin_pdf_viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefactory-id%2Fflutter_plugin_pdf_viewer/lists"}