pdf_bitmaps 0.2.5 copy "pdf_bitmaps: ^0.2.5" to clipboard
pdf_bitmaps: ^0.2.5 copied to clipboard

outdated

A Flutter pdf bitmaps generator and page counter using Android native pdfRenderer.

pub package wakatime

Package description #

A pdf pages bitmaps genrator and page counter which uses Android PdfRenderer.

Note: This package currently supports only Android native URIs of files not absolute file paths and to get the Android native URIs of files you can use pick_or_save plugin. Why this behaviour? Well because I needed a plugin which can give me pdf bitmaps using a URI so that I can avoid copying the whole pdf into device cache just to generate bitmaps like other plugins do.

Features #

  • Generates bitmaps on the fly using Android native URI.
  • Gets pdf page count using Android native URI.

Getting started #

  • In pubspec.yaml, add this dependency:
pdf_bitmaps: 
  • Add this package to your project:
import 'package:pdf_bitmaps/pdf_bitmaps.dart';

Basic Usage #

Getting the page count #

int? pageCount = await PdfBitmaps().pdfPageCount(pdfPath: pdfPath)

Getting a pdf page bitmap #

Uint8List? bytes = await PdfBitmaps().pdfBitmap(params: PDFBitmapParams(pdfPath: pdfPath, pageInfo: PageInfo(pageNumber: 5, rotationAngle: 153, scale: 1.6, backgroundColor: Colors.red)));

Note: pageIndex starts from 0 to (PdfPageCount - 1) and quality can be from 1 to 100.

See Example
Reference_to_S_from_DC_28-09-2022
12
likes
0
pub points
62%
popularity

Publisher

verified publisherdeepanshuchaudhary.com

A Flutter pdf bitmaps generator and page counter using Android native pdfRenderer.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on pdf_bitmaps