Skip to main content

bengali_pdf 0.1.0 copy "bengali_pdf: ^0.1.0" to clipboard
bengali_pdf: ^0.1.0 copied to clipboard

HarfBuzz-shaped, searchable Bengali PDF text for native Flutter platforms, with bundled Noto Sans Bengali and custom font providers.

example/lib/main.dart

// Flutter 3.50 deprecates package:flutter/material.dart in favour of
// package:material_ui. Keep the example on the framework import until the
// package raises its minimum Flutter version.
// ignore: deprecated_member_use
import 'package:flutter/material.dart';
import 'package:printing/printing.dart';

import 'services/demo_pdf.dart';

void main() => runApp(const BengaliPdfExampleApp());

/// Interactive cross-platform package demonstration.
class BengaliPdfExampleApp extends StatelessWidget {
  /// Creates the example app.
  const BengaliPdfExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'bengali_pdf example',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: const Color(0xff006a60)),
        useMaterial3: true,
      ),
      home: const BengaliPdfPreviewScreen(),
    );
  }
}

/// Live PDF preview with native print, share, and download actions.
class BengaliPdfPreviewScreen extends StatelessWidget {
  /// Creates the preview screen.
  const BengaliPdfPreviewScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('bengali_pdf — JehadurRE'),
      ),
      body: PdfPreview(
        build: buildBengaliPdf,
        canChangeOrientation: true,
        canChangePageFormat: true,
        canDebug: false,
        pdfFileName: 'bengali-pdf-example.pdf',
      ),
    );
  }
}
0
likes
150
points
32
downloads
screenshot

Documentation

Documentation
API reference

Publisher

verified publisherjehadurre.me

Weekly Downloads

HarfBuzz-shaped, searchable Bengali PDF text for native Flutter platforms, with bundled Noto Sans Bengali and custom font providers.

Repository (GitHub)
View/report issues
Contributing

Topics

#flutter #pdf #bangla #fonts #pdf-generation

License

BSD-3-Clause (license)

Dependencies

ffi, flutter, harfbuzz_ffi, pdf

More

Packages that depend on bengali_pdf