Skip to content

[BUG] PdfEncryption exception when exporting or sync an encrypted pdf #577

@infinite-d474

Description

@infinite-d474

Which app is your issue for

Document Scanner

Version

1.18.4.138

What platform are you using?

Android

OS Version

GrapheneOS (Android 16, Build nr: 2026021200)

What happened?

Issue 1)

On the attempt to export a pdf to a local folder with a set password the export fails with following msg:

Error
com.itextpdf.kernel.exceptions.PdfException: PdfEncryption exception

This can appear on two ways:

  1. Doc View > enter any pdf > PDF > Export > set pw > OK
  2. Settings > Sync > Sync document PDFs > add > set up sync with pw
    Doc View > Sync

The export without a pw works as expected.
Expected behavior: The pdf is exported to the provided folder.

Issue 2)

In addition if a password is once set it can not be removed.

This can appear on two ways:
1a) Doc View > click any pdf > PDF > Export > set pw and clear pw > ok
This pw can not be removed
1b) Settings > PDF export > PDF password > enter pw > save
This pw can not be removed and is now also set for the case 1a)
2) Settings > Sync > Sync document PDFs > add > set up sync with pw

A possible workaround:

  1. Settings > import settings > select settings with no password set
  2. Settings > Sync > Sync document PDFs > rm any entries with set pw
  3. via backup and clear storage
    • Settings > Create Backup
    • App info > Storage & cache > Clear storage
    • Settings > Restore Backup

Expected behavior: A once set pw can be removed in the settings

Since this is my first FOSS contribution in form of an issue report any suggestions are welcome.
Thank you for your great effort in developing and maintaining this app.

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdone

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions