openFile static method
Future<PdfDocument>
openFile(
- String filePath, {
- PdfPasswordProvider? passwordProvider,
- bool firstAttemptByEmptyPassword = true,
- bool useProgressiveLoading = false,
Opening the specified file.
For Web, filePath
can be relative path from index.html
or any arbitrary URL but it may be restricted by CORS.
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.
If useProgressiveLoading
is true, only the first page is loaded initially and the rest of the pages
are loaded progressively when PdfDocument.loadPagesProgressively is called explicitly.
Implementation
static Future<PdfDocument> openFile(
String filePath, {
PdfPasswordProvider? passwordProvider,
bool firstAttemptByEmptyPassword = true,
bool useProgressiveLoading = false,
}) => PdfrxEntryFunctions.instance.openFile(
filePath,
passwordProvider: passwordProvider,
firstAttemptByEmptyPassword: firstAttemptByEmptyPassword,
useProgressiveLoading: useProgressiveLoading,
);