Skip to content

FLUT-5982- [Feature] Renamed the loading encrypted document titles #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Flutter/pdf-viewer/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ Once the package has been imported, initialize the `SfPdfViewer` as a child of a
* File
* Memory

N> Currently, we do not support viewing the password-protected PDF document.

### Load document from the Asset

The [SfPdfViewer.asset](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/SfPdfViewer.asset.html) creates a widget that displays the PDF document obtained from an [`AssetBundle`](https://api.flutter.dev/flutter/services/AssetBundle-class.html). The following code example explains the same.
Expand Down Expand Up @@ -306,7 +304,7 @@ Widget build(BuildContext context) {
The [onDocumentLoadFailed](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/onDocumentLoadFailed.html) callback triggers when the document loading fails in the `SfPdfViewer`. That is,

* When any corrupted document is loaded.
* When any password-protected document is loaded.
* When any password-protected document is loaded with invalid or empty password.
* When any improper input source value like the wrong URL or file path is given.
* When any non-PDF document is loaded.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
layout: post
title: Loading password-protected PDFs in Flutter PDF Viewer | Syncfusion
title: Viewing password-protected PDFs in Flutter PDF Viewer | Syncfusion
description: Learn here all about loading password-protected PDF feature of Syncfusion Flutter PDF Viewer (SfPdfViewer) widget and more.
platform: Flutter
control: SfPdfViewer
documentation: ug
---

# Loading password-protected PDF's in Flutter PDF Viewer (SfPdfViewer)
# Viewing password-protected PDF's in Flutter PDF Viewer (SfPdfViewer)

When loading a password-protected document without a password or with an invalid password in [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) using the `password` property.The default password dialogue will be displayed.
When loading a password-protected document without a password or with an invalid password in [SfPdfViewer](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer-class.html) using the [password](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/password.html) property. The default password dialogue will be displayed.

![Password dialog](images/password-dialog.png)

## Customize the visibility of password dialogue

The password-protected document can be loaded by providing the password in the `password` property of SfPdfViewer.The `canShowPasswordDialog` property allows the user to customize the password dialogue visibility. The following code example explains the same.
The password-protected document can be loaded by providing the password in the [password](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/password.html) property of SfPdfViewer. The [canShowPasswordDialog](https://pub.dev/documentation/syncfusion_flutter_pdfviewer/latest/pdfviewer/SfPdfViewer/canShowPasswordDialog.html) property allows the user to customize the password dialogue visibility. The following code example explains the same.

{% tabs %}
{% highlight Dart %}
Expand Down
2 changes: 1 addition & 1 deletion flutter-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@
<li><a href="/Flutter/pdf-viewer/document-link-annotation">Document link annotation</a></li>
<li><a href="/Flutter/pdf-viewer/interaction-modes">Interaction modes</a></li>
<li><a href="/Flutter/pdf-viewer/page-layout-and-scroll-direction">Page layout and Scrolling options</a></li>
<li><a href="/Flutter/pdf-viewer/loading-password-protected-pdf's">Loading password protected PDF's</a></li>
<li><a href="/Flutter/pdf-viewer/viewing-password-protected-pdf-files">Viewing Password protected PDF Files</a></li>
<li><a href="/Flutter/pdf-viewer/Localization">Localization</a></li>
<li><a href="/Flutter/pdf-viewer/accessibility">Accessibility</a></li>
</ul>
Expand Down