Skip to content

Password-protected PDF causes UI freeze when opening #2485

@kylqVTN

Description

@kylqVTN

Bug description

When opening a password-protected PDF file, the UI freezes noticeably after the password is entered.

This happens even with relatively small PDF files (~1–5MB).
Non-password-protected PDFs open smoothly.

Opening a password-protected PDF should not block the UI thread.
At minimum, the UI should remain responsive while the document is being decrypted and opened.

Steps to reproduce

  1. Prepare a PDF file protected with a password (e.g. 3–5MB)
  2. Open the PDF using PdfViewer
  3. Enter the correct password
  4. Observe that the UI freezes until the document is fully opened

Code sample

SfPdfViewer.file(
pdfFile.file,
key: _pdfViewerKey,
controller: _pdfViewerController,
password: _password,
canShowScrollHead: false,
canShowScrollStatus: false,
canShowTextSelectionMenu: false,
canShowPageLoadingIndicator: false,
)

Screenshots or Video

document_6228699286490585541.mp4

Stack Traces

Stack Traces
[Add the Stack Traces here]

On which target platforms have you observed this bug?

Android

Flutter Doctor output

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions