pdf_text 0.0.1 copy "pdf_text: ^0.0.1" to clipboard
pdf_text: ^0.0.1 copied to clipboard

outdated

A Flutter plugin used to extract text from PDF documents.

PDF Text Plugin #

This plugin for Flutter allows you to read the text content of PDF documents and convert it into strings. The plugin works on iOS and Android. On iOS it uses Apple's PDFKit. On Android it uses Apache's PdfBox Android porting.

Getting Started #

Add this to your package's pubspec.yaml file:

dependencies:
  pdf_text: ^0.0.1

Usage #

Import the package with:

import 'package:pdf_text/pdf_text.dart';

Create a PDF document instance using a File object:

PDFDoc doc = await PDFDoc.fromFile(file);

or using a path string:

PDFDoc doc = await PDFDoc.fromPath(path);

Read the text of the entire document:

String docText = await doc.text;

Retrieve the number of pages of the document:

int numPages = doc.length;

Access a page of the document:

PDFPage page = doc.pageAt(pageNumber);

Read the text of a page of the document:

String pageText = await page.text;

Contribute #

If you have any suggestions, improvements or issues, feel free to contribute to this project.

88
likes
0
pub points
91%
popularity

Publisher

verified publisheraluc.dev

A Flutter plugin used to extract text from PDF documents.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on pdf_text