Skip to content

Unable to Open Password-Protected PDF for Printing on Android #224

Open
@bhuvneshMB

Description

@bhuvneshMB

I am experiencing an issue where react-native-print is unable to print password-protected PDFs on Android. When attempting to print such a PDF, the native print screen opens but then crashes immediately. The same PDFs work fine on iOS without any issues.

Steps to Reproduce:

  1. Pass the protected pdf file URI to react-native-print.
  2. Call RNPrint.print({ filePath: uri }) to print the document.
  3. The native print preview opens briefly, then the app crashes on Android.

Expected Behavior:

  • react-native-print should either prompt for a password before printing or provide an appropriate error message.
  • The app should not crash but instead handle password-protected PDFs gracefully.

Actual Behavior:

  1. On Android, the native print preview opens and then crashes immediately.
  2. On iOS, the same PDF prints successfully.

Environment:
Library Version: react-native-print ^0.11.0
React Native Version: 0.73.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions