pdfrx library

Classes

PdfDest
PDF Explicit Destination the page and inner-page location to jump to.
PdfDocument
Handles PDF document loaded on memory.
PdfDocumentFactory
For platform abstraction purpose; use PdfDocument instead.
PdfDocumentListenable
The class is used to load the referenced document and notify the listeners.
PdfDocumentRef
PdfDocumentRef controls loading of a PdfDocument and it also provide you with a way to use PdfDocument safely in your long running async operations.
PdfDocumentRefAsset
A PdfDocumentRef that loads the document from asset.
PdfDocumentRefCustom
A PdfDocumentRef that loads the document from custom source.
PdfDocumentRefData
A PdfDocumentRef that loads the document from data.
PdfDocumentRefDirect
A PdfDocumentRef that directly contains PdfDocument.
PdfDocumentRefFile
A PdfDocumentRef that loads the document from file.
PdfDocumentRefUri
A PdfDocumentRef that loads the document from network.
PdfDocumentViewBuilder
A widget that loads PDF document.
PdfDownloadReport
PdfFileCache
PDF file cache for downloading (Non-web).
PdfFileCacheNative
PDF file cache backed by a file.
PdfImage
Image rendered from PDF page.
PdfJsConfiguration
Configuration for the PDF.js library.
Link in PDF page.
PdfLinkHandlerParams
Parameters for the built-in link handler.
PdfOutlineNode
Outline (a.k.a. Bookmark) node in PDF document.
PdfPage
Handles a PDF page in PdfDocument.
PdfPageFitInfo
PdfViewerController.calcFitZoomMatrices returns the list of this class.
PdfPageHitTestResult
Represents the result of the hit test on the page.
PdfPageLayout
Defines page layout.
PdfPageRenderCancellationToken
Token to try to cancel the rendering process.
PdfPageText
Handles text extraction from PDF page.
PdfPageTextFragment
Text fragment in PDF page.
PdfPageTextOverlay
A widget that displays selectable text on a page.
PdfPageView
A widget that displays a page of a PDF document.
PdfPermissions
PDF permissions defined on PDF 32000-1:2008, Table 22.
PdfRect
Rectangle in PDF page coordinates.
Pdfrx
Class to provide Pdfrx's configuration. The parameters should be set before calling any Pdfrx's functions.
PdfTextRange
Simple text range in a PDF page.
PdfTextRanges
Text ranges in a PDF page typically used to describe text selection.
PdfTextRangeWithFragments
Text range (start/end index) in PDF page and it's associated text and bounding rectangle.
PdfTextSearcher
Helper class to interactively search text in a PDF document.
PdfViewer
A widget to display PDF document.
PdfViewerController
Controls associated PdfViewer.
PdfViewerParams
Viewer customization parameters.
PdfViewerScrollThumb
Scroll thumb for PdfViewer.

Enums

PdfAnnotationRenderingMode
Annotation rendering mode.
PdfDestCommand
PDF 32000-1:2008, 12.3.2.2 Explicit Destinations, Table 151
PdfPageAnchor
When PdfViewerController.goToPage is called, the page is aligned to the specified anchor.
PdfPageRotation
Page rotation.

Extensions

MapExtension on Map<K, V>
PatternExts on Pattern
PdfMatrix4Ext on Matrix4
PdfRectsExt on Iterable<PdfRect>
Extension methods for List of PdfRect.
RectExt on Rect

Functions

createSimplePasswordProvider(String? password) PdfPasswordProvider
Create PdfPasswordProvider that returns the password only once.
pdfDocumentFromUri(Uri uri, {PdfPasswordProvider? passwordProvider, bool firstAttemptByEmptyPassword = true, int? blockSize, PdfFileCache? cache, PdfDownloadProgressCallback? progressCallback, PdfDownloadReportCallback? reportCallback, bool useRangeAccess = true, Map<String, String>? headers}) Future<PdfDocument>
Open PDF file from uri.

Typedefs

PdfDocumentLoaderProgressCallback = void Function(int downloadedBytes, [int? totalBytes])
Callback function to notify download progress.
PdfDocumentLoaderReportCallback = void Function(int downloaded, int total, Duration elapsedTime)
Callback function to report download status on completion.
PdfDocumentViewBuilderFunction = Widget Function(BuildContext context, PdfDocument? document)
A function that builds a widget tree with the PDF document.
PdfDownloadProgressCallback = void Function(int downloadedBytes, [int? totalBytes])
Callback function to notify download progress.
PdfDownloadReportCallback = void Function(int downloaded, int total, Duration elapsedTime)
Callback function to report download status on completion.
PdfLinkCustomPagePainter = void Function(Canvas canvas, Rect pageRect, PdfPage page, List<PdfLink> links)
PdfLinkWidgetBuilder = Widget? Function(BuildContext context, PdfLink link, Size size)
Function to build link widget for PdfLink.
PdfMatrixNormalizeFunction = Matrix4 Function(Matrix4 matrix, Size viewSize, PdfPageLayout layout, PdfViewerController? controller)
Function to normalize the matrix.
PdfPageChangedCallback = void Function(int? pageNumber)
Function called when the current page is changed.
PdfPageLayoutFunction = PdfPageLayout Function(List<PdfPage> pages, PdfViewerParams params)
Function to customize the layout of the pages.
PdfPageOverlaysBuilder = List<Widget> Function(BuildContext context, Rect pageRect, PdfPage page)
Function to build page overlays.
PdfPageViewDecorationBuilder = Widget Function(BuildContext context, Size pageSize, PdfPage page, RawImage? pageImage)
Function to build a widget that wraps the page image.
PdfPageViewSizeCallback = Size Function(Size biggestSize, PdfPage page)
Function to calculate the size of the page based on the size of the widget.
PdfPasswordProvider = FutureOr<String?> Function()
Function to provide password for encrypted PDF.
PdfPerPageSelectableRegionInjector = Widget Function(BuildContext context, Widget child, PdfPage page, Rect pageRect)
Function to inject SelectionArea or SelectableRegion to customize text selection on each page.
PdfSelectableRegionInjector = Widget Function(BuildContext context, Widget child)
Function to inject SelectionArea or SelectableRegion to customize text selection.
PdfTextMatch = PdfTextRangeWithFragments
For backward compatibility; PdfTextRangeWithFragments is previously named PdfTextMatch.
PdfViewerCalculateCurrentPageNumberFunction = int? Function(Rect visibleRect, List<Rect> pageRects, PdfViewerController controller)
Function to guess the current page number based on the visible rectangle and page layouts.
PdfViewerCalculateInitialPageNumberFunction = int? Function(PdfDocument document, PdfViewerController controller)
Function to calculate the initial page number.
PdfViewerDocumentChangedCallback = void Function(PdfDocument? document)
Function to notify that the document is loaded/changed.
PdfViewerErrorBannerBuilder = Widget Function(BuildContext context, Object error, StackTrace? stackTrace, PdfDocumentRef documentRef)
Function to build loading error banner.
PdfViewerGetPageRenderingScale = double? Function(BuildContext context, PdfPage page, PdfViewerController controller, double estimatedScale)
Function to customize the rendering scale of the page.
PdfViewerHandleLinkTap = bool Function(Offset position)
Function to handle link tap.
PdfViewerLoadingBannerBuilder = Widget Function(BuildContext context, int bytesDownloaded, int? totalBytes)
Function to build loading banner.
PdfViewerOverlaysBuilder = List<Widget> Function(BuildContext context, Size size, PdfViewerHandleLinkTap handleLinkTap)
Function to build viewer overlays.
PdfViewerPagePaintCallback = void Function(Canvas canvas, Rect pageRect, PdfPage page)
Function to paint things on page.
PdfViewerPageTextSelectionChangeCallback = void Function(PdfTextRanges selection)
Function to be notified when the text selection is changed.
PdfViewerReadyCallback = void Function(PdfDocument document, PdfViewerController controller)
Function called when the viewer is ready.
PdfViewerTextSelectionChangeCallback = void Function(List<PdfTextRanges> selections)
Function to be notified when the text selection is changed.
PdfViewerViewSizeChanged = void Function(Size viewSize, Size? oldViewSize, PdfViewerController controller)
Function to be called when the viewer view size is changed.

Exceptions / Errors

PdfException
PdfPasswordException