Why my pdf files does not in my app

this is my block and error screenshot

blocks (4)

2 Likes

You must provide a complete path.And not the name of the file only.
And btw, you can’t open files from assets.

2 Likes

is it permission issue.

should be
file:///storage/emulated/0/ and so on

2 Likes

Nope that’s because it’s stored in your assets and not in the storage.If you want to opne files from assets, use this extension:
App Inventor Extensions: Pdf | Pura Vida Apps

2 Likes

there no pdf file in assets

So you must

Some thing liek

there is no error and redirect to phone default pdf viewer app and then back to my app main screen without showing pdf file content

Because you aren’t specifying the complete path @OdiaTech_Center like file://storage/sdcard/file.pdf or /storage/emulated/0/file.pdf
That is the error as i said above:

That should work if you sepcified only the name like file
And also you must provide a file that is available in the downloads file already.:slightly_smiling_face:

it is already present there

So you should check that this path exists using the file component.
Also as i see you must provide a path like this:
file:///mnt/sdcard/Download/file.pdf
So you need to change your blocks :wink:

this is also not working…already tried

Can you show us how you’ve tried it?Also does the file you are trying with is available in the downloads file??Use exists block in the file component to check

Can you please try this path:

show a error msg can not open file.pdf

You must change file to your file name :sweat_smile:

pdf is stored in my internal storage …so it will not be sdcard…can u try this …if successful…then kindly send me the aia file