You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Document-Processing/PDF/PDF-Viewer/blazor/document-security.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,8 @@ This article describes how the Blazor PDF Viewer (SfPdfViewer) handles secured P
13
13
14
14
The PDF specification supports two primary security configurations:
15
15
16
-
- Password-protected (user/open password required to decrypt and open the file)
17
-
- Permission-restricted (owner password sets granular permissions such as printing, copying, editing, annotating, and form filling)
16
+
-[Password-protected](./document-security/password-protected) (password required to decrypt and open the file)
17
+
-[Permission-restricted](./document-security/permission) (owner password sets granular permissions such as printing, copying, editing, annotating, and form filling)
18
18
19
19
Behavior and expectations:
20
20
- When a password-protected PDF is loaded, the viewer prompts for the password. If the password is incorrect or omitted, the document does not open.
Some PDFs require a password to open. When such a document is loaded in the viewer, the following behavior applies:
13
13
14
-
- A password prompt appears if the document requires an open/user password.
15
-
- If the correct password is provided, the document loads and becomes viewable per the document’s permissions.
16
-
- If the password is incorrect, the viewer shows an error and continues to prompt until a valid password is entered or the operation is canceled.
17
-
- If the operation is canceled, the document is not loaded.
14
+
- A password prompt appears if the document requires an password.
18
15
19
16
The viewer displays a password prompt UI when a protected document is opened.
20
17
@@ -26,6 +23,19 @@ Mobile password prompt:
26
23
27
24

28
25
26
+
- If the correct password is provided, the document loads and becomes viewable per the document’s permissions.
27
+
- If the password is incorrect, the viewer shows an error and continues to prompt until a valid password is entered or the operation is canceled.
28
+
29
+
Invalid password error in desktop:
30
+
31
+

32
+
33
+
Invalid password error in Mobile:
34
+
35
+

36
+
37
+
- If the operation is canceled, the document is not loaded.
38
+
29
39
## Load the password-protected document programmatically
30
40
31
41
Use the [LoadAsync method](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html) to load a PDF from a file path, URL, or base64 data at runtime. Pass the password as the second parameter.
@@ -51,3 +61,7 @@ Use the [LoadAsync method](https://help.syncfusion.com/cr/blazor/Syncfusion.Blaz
51
61
```
52
62
53
63
[View sample in GitHub](https://github.com/SyncfusionExamples/blazor-pdf-viewer-examples/tree/master/Load%20and%20Save/Load%20the%20Security%20Document).
The viewer respects these permission flags and disables restricted actions in its UI. It cannot bypass or elevate document permissions. For example, when printing is disallowed, the print action is not available; when copying is restricted, text selection may be limited or copy commands disabled.
0 commit comments