MZ Can MZ open pdf files externally

Hey, I was wondering if there was any way for RPG maker Mz to open a pdf file either externally or in-game? I assume opening pdf files in game isn’t possible but if there’s any way to open them externally I would be grateful to know. thanks in advance
It is possible, yes. The game is HTML-based and runs in a browser, which is capable of reading the Portable Document Format. E.g. for a PDF file named manual.pdf in the game's docs subfolder:
JavaScript:
window.open("docs/manual.pdf");
By default this should open the file in a new window/tab. Details here~

[Edit: as described on the linked page, it may also be a good idea to add a window "name", like so:
JavaScript:
window.open("docs/manual.pdf", "helpfile");
This should allow compatibility with Safari, and prevent opening duplicate windows if you use the script call multiple times.]
It worked, thank you so much, I really appreciate it
Great, happy RPG Making! 👋

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/can-mz-open-pdf-files-externally.178379/