0

This is the path " /data/user/0/com.example.flutter_pdf_proj/app_flutter/example.pdf" i am getting while converting base64 string to bytes using path provider package.

enter image description here

I can open the PDF and view in mobile.

now i a have to save this PDF in mobile local storage in mobile. How can i do that.

Please help me?

Thanks in advance.

Siva M
  • 11
  • 2
  • 1
    It is already saved, otherwise how could you "open" a file that is not yet "saved" on the device? – MMZK1526 Oct 02 '22 at 07:31
  • i cannot find the file in device. I searched everywhere. Can i save it in custom folder path in local storage? – Siva M Oct 02 '22 at 07:38
  • See if this helps: https://stackoverflow.com/questions/51423058/cannot-find-the-path-provided-by-getapplicationdocumentsdirectory – MMZK1526 Oct 02 '22 at 07:40
  • i tried it but getting this issue "Cannot open file, path = '/storage/emulated/0//example.pdf' (OS Error: Permission denied, errno = 13)" – Siva M Oct 02 '22 at 07:50

2 Answers2

1

You can let users to locate where they want to save their pdf (or any files you generate before) using https://pub.dev/packages/flutter_file_dialog. It can help you in "duplicating" file to specific folder as they want to.

Fahmi Ali
  • 11
  • 1
  • 1
0

Actually i donot have filemanager in my emulator. So i am unable to view the downloaded path in the device. So now i have installed file manager in my emulator device and able to see the PDF docs in the device. So thanks everyone for your help.

Siva M
  • 11
  • 2