Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-106072

QtPdf can't open password-protected PDF files on Windows/Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.4.3, 6.5.0, 6.5.1, 6.6.0
    • 6.4.0 Beta3
    • PDF
    • None
    • Android, Windows
    • 3a1d4eac6 (dev), efbb12954 (dev), abd2b84ec (6.4.3), d7bc7151d (6.5.0), 27034b867 (6.5), c9a9c55dc (6.5)

    Description

      The reason is that QPdfDocument::load() creates a QFile each time. When it detects that it needs a password, it has to try again after the password is provided; at that time, QFile::open() fails, probably because Windows doesn't allow opening a file that's already open. So we have to be more careful about closing it and disposing the QFile if we're going to re-open it later, or else reuse the existing QFile instance perhaps.

      Found by investigating test failures in https://codereview.qt-project.org/c/qt/qtwebengine/+/399780

      Attachments

        For Gerrit Dashboard: QTBUG-106072
        # Subject Branch Project Status CR V

        Activity

          People

            srutledg Shawn Rutledge
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: