zeba_academy_smart_pdf 0.0.1 copy "zeba_academy_smart_pdf: ^0.0.1" to clipboard
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);

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!

  1. Fork repository
  2. Create feature branch
  3. Commit changes
  4. Submit pull request

πŸ“„ License #

GPL‑3.0 License


πŸ‘¨β€πŸ’» Author #

Zeba Academy

Built with ❀️ using Flutter.

0
likes
120
points
106
downloads

Documentation

API reference

Publisher

verified publisherzeba.academy

Weekly Downloads

Advanced PDF intelligence layer for Flutter.

Homepage

License

unknown (license)

Dependencies

collection, flutter, intl, pdf_text

More

Packages that depend on zeba_academy_smart_pdf