openData static method
Future<PdfDocument>
openData(
- Uint8List data, {
- PdfPasswordProvider? passwordProvider,
- bool firstAttemptByEmptyPassword = true,
- String? sourceName,
- void onDispose()?,
Opening the PDF on memory.
passwordProvider
is used to provide password for encrypted PDF. See PdfPasswordProvider for more info.
firstAttemptByEmptyPassword
is used to determine whether the first attempt to open the PDF is by empty password
or not. For more info, see PdfPasswordProvider.
sourceName
can be any arbitrary string to identify the source of the PDF; data
does not identify the source
if such name is explicitly specified.
Implementation
static Future<PdfDocument> openData(
Uint8List data, {
PdfPasswordProvider? passwordProvider,
bool firstAttemptByEmptyPassword = true,
String? sourceName,
void Function()? onDispose,
}) =>
PdfDocumentFactory.instance.openData(
data,
passwordProvider: passwordProvider,
firstAttemptByEmptyPassword: firstAttemptByEmptyPassword,
sourceName: sourceName,
onDispose: onDispose,
);