zeba_academy_smart_pdf 0.0.1
zeba_academy_smart_pdf: ^0.0.1 copied to clipboard
Advanced PDF intelligence layer for Flutter.
π zeba_academy_smart_pdf #
Advanced PDF Intelligence Layer for Flutter applications.
zeba_academy_smart_pdf provides powerful tools to extract, analyze, and intelligently process PDF documents for educational, enterprise, and AIβready applications.
β¨ Features #
β Text Extraction from PDFs β Smart Keyword Search Engine β Highlight Matching Support β Chapter AutoβDetection β AI Summary Integration Ready β Clean Modular Architecture β Lightweight & Fast Processing
π Installation #
Add dependency to your pubspec.yaml:
dependencies:
zeba_academy_smart_pdf: ^1.0.0
Then run:
flutter pub get
π¦ Import #
import 'package:zeba_academy_smart_pdf/zeba_academy_smart_pdf.dart';
π§ Quick Start #
1οΈβ£ Create Controller #
final controller = SmartPdfController();
2οΈβ£ Load PDF #
await controller.loadPdf("assets/sample.pdf");
3οΈβ£ Search Keyword #
final results = controller.search("flutter");
4οΈβ£ Detect Chapters #
final chapters = controller.detectChapters();
5οΈβ£ Access Full Extracted Text #
print(controller.fullText);
π Smart Keyword Search #
Search is caseβinsensitive and scans across all pages.
final matches = controller.search("education");
Each result contains:
- Page number
- Matched text
- Text index position
π Chapter Auto Detection #
Automatically detects headings like:
- Chapter 1
- Chapter 2
- Unit 1
- Unit 2
final chapters = controller.detectChapters();
π― Highlight Matching #
Utility helper for UI highlighting:
String highlightText(String text, String keyword) {
return text.replaceAllMapped(
RegExp(keyword, caseSensitive: false),
(match) => "[[${match.group(0)}]]",
);
}
UI layers can style highlighted tokens visually.
π€ AI Summary Integration (Ready) #
The package includes an adapter interface for future AI integrations.
abstract class AISummaryAdapter {
Future<String> summarize(String text);
}
You can plug in:
- OpenAI
- Gemini
- Local LLMs
- Custom APIs
without modifying core logic.
π Architecture #
PDF β Loader β Text Extractor β Intelligence Layer β AI Adapter
Modules #
lib/
βββ src/
βββ controller/
βββ models/
βββ services/
- Controller β Public API
- Services β Processing engines
- Models β Data structures
π± Example #
final controller = SmartPdfController();
await controller.loadPdf("assets/book.pdf");
final results = controller.search("flutter");
final chapters = controller.detectChapters();
print(results.length);
print(chapters);
π§ͺ Testing #
Run tests using:
flutter test
Tests include:
- Controller initialization
- Keyword search validation
- Chapter detection logic
β‘ Use Cases #
- Educational apps
- Ebook readers
- Smart study platforms
- AI document assistants
- Notes extraction systems
- Knowledge indexing apps
π£ Roadmap #
- Semantic search (vector indexing)
- Offline caching
- Auto notes generation
- Question generation
- AI summarization plugins
- PDF annotation layer
π€ Contributing #
Contributions are welcome!
- Fork repository
- Create feature branch
- Commit changes
- Submit pull request
π License #
GPLβ3.0 License
π¨βπ» Author #
Zeba Academy
Built with β€οΈ using Flutter.