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
MZ Can MZ open pdf files externally
RPG Maker MZ SupportIt 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
By default this should open the file in a new window/tab. Details here~
developer.mozilla.org
[Edit: as described on the linked page, it may also be a good idea to add a window "name", like so:
This should allow compatibility with Safari, and prevent opening duplicate windows if you use the script call multiple times.]
manual.pdf in the game's docs subfolder:
JavaScript:
window.open("docs/manual.pdf");
Window: open() method - Web APIs | MDN
The open() method of the Window interface loads a specified resource into a new or existing browsing context (that is, a tab, a window, or an iframe) under a specified name.
[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");
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/