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

A Flutter package for viewing PDF and EPUB documents from various sources (assets, files, network).

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:mini_pdf_epub_viewer/mini_pdf_epub_viewer.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: DocumentViewer(
        thumbnailWidth: 150,
        source: DocumentSource.asset('assets/pdf/sample.pdf'),
        type: DocumentType.pdf,
      ),
      /// For file
      // home: DocumentViewer(
      //   source: DocumentSource.file('/path/to/file.pdf'),
      //   type: DocumentType.pdf,
      // )
      /// For network
      /// home: DocumentViewer(
      ///  source: DocumentSource.network(
      ///   'https://pdfobject.com/pdf/sample.pdf',
      ///  headers: {}, // Optional
      /// ),
    );
  }
}
6
likes
0
points
17
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for viewing PDF and EPUB documents from various sources (assets, files, network).

Homepage
Repository (GitHub)
View/report issues

Topics

#pdf #mini #epub #reader

Funding

Consider supporting this project:

buymeacoffee.com

License

unknown (license)

Dependencies

flutter, http, path_provider, pdfx

More

Packages that depend on mini_pdf_epub_viewer