#open .pdf

1 messages · Page 1 of 1 (latest)

tall jungle
#

Hello good! How can I open a document that is in the data folder of my application, for example, when I click on a button in my app, a PDF opens on the computer

vivid baneBOT
#

Thank you for your message!

                1. Search the #1047150269156294677 forum for existing posts
                2. Search Github issues to see if this is a known issue
                3. Send the output of `tauri info`
                4. Provide reproduction steps for your issue
                5. Be polite and remember to follow the [Tauri Code of Conduct](https://github.com/tauri-apps/governance-and-guidance/blob/main/CODE_OF_CONDUCT.md)

                Once you've read this and taken the appropriate steps, react to this message
upbeat crow
tall jungle
#

It gives me an error, I tried with the entire route written by hand and it keeps giving me this error:

Uncaught (in promise) shell error: failed to open: Scoped command argument at position 0 was found, but failed regex validation ^((mailto:\w+)|(tel:\w+)|(https?://\w+) ).+

#

The slashes are / and \ and I don't know why, but I tried to write them by hand in both ways and with \\ and it doesn't work

#

I also think I have it right in the tauri.conf.json

full lotus
tall jungle
#

And how should I configure it to open files?

full lotus
#

good question, either try to find a regex for file paths, which may be super annoying idk. Or just set it to ".*" to allow everything.