PdfJsConfiguration class

Configuration for the PDF.js library.

Set PdfJsConfiguration.configuration before using any APIs. It can be typically set in the main function.

Constructors

PdfJsConfiguration({required String pdfJsSrc, required String workerSrc, required String cMapUrl, required bool cMapPacked, bool useSystemFonts = true, String? standardFontDataUrl, Duration pdfJsDownloadTimeout = const Duration(seconds: 10)})
const

Properties

cMapPacked bool
Whether to use the packed cmaps. The default is true.
final
cMapUrl String
cmaps directory URL such as https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/cmaps/
final
hashCode int
The hash code for this object.
no setterinherited
pdfJsDownloadTimeout Duration
The timeout for downloading the PDF.js library. The default is 10 seconds.
final
pdfJsSrc String
psf.js file URL such as https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.mjs
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
standardFontDataUrl String?
The URL where the standard font files are located. Include the trailing slash.
final
useSystemFonts bool
When true, fonts that aren't embedded in the PDF document will fallback to a system font. The default is true.
final
workerSrc String
psf.worker.js file URL such as https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

configuration PdfJsConfiguration?
The current configuration. null to use the default.
getter/setter pair