Skip to content

#1184 - Pdf with password#1185

Merged
gvreddy04 merged 7 commits intomainfrom
features/1184-pdf-with-password
Oct 30, 2025
Merged

#1184 - Pdf with password#1185
gvreddy04 merged 7 commits intomainfrom
features/1184-pdf-with-password

Conversation

@gvreddy04
Copy link
Copy Markdown
Contributor

No description provided.

Enhanced the `PdfViewer` component to support password-protected PDFs and improved error handling for document loading. Key changes include:

- Added a `Password` parameter to the `PdfViewer` component and updated the `OnAfterRenderAsync` method to pass it to JavaScript interop.
- Introduced the `OnDocumentLoadError` event callback to handle document loading errors.
- Updated `blazor.bootstrap.pdf.js` to support password prompts and handle password-related exceptions.
- Modified `PdfViewer_Demo_01_Examples.razor` to test password-protected PDFs with a local file path.
- Added a sample encrypted PDF (`pdf_password_protected.pdf`) for testing.
- Improved metadata and font handling in the sample PDF.
- Enhanced code robustness with null checks and better documentation.

NOTE: This commit message is auto-generated using GitHub Copilot.
Replaced the local file path in the `Url` property of the `<PdfViewer>` component with a publicly accessible URL pointing to a hosted PDF file on GitHub. This ensures the PDF file can be viewed in environments where the local file path is inaccessible.

NOTE: This commit message is auto-generated using GitHub Copilot.
@gvreddy04 gvreddy04 added this to the 3.4.1 milestone Oct 29, 2025
@gvreddy04 gvreddy04 self-assigned this Oct 29, 2025
@gvreddy04 gvreddy04 linked an issue Oct 29, 2025 that may be closed by this pull request
@gvreddy04
Copy link
Copy Markdown
Contributor Author

Screenshot:

image

@gvreddy04
Copy link
Copy Markdown
Contributor Author

Password Prompt Screenshot:

image

Updated `<img>` tags in the documentation to include valid GitHub-hosted URLs. Added examples for handling password-protected PDFs in the `<PdfViewer>` component, including setting the `Password` parameter and prompting users for a password. Enhanced `alt` attributes for better visual representation of features.

NOTE: This commit message is auto-generated using GitHub Copilot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PdfViewer failed when the pdf has password

1 participant