playMaker

Author Topic: Open Document?  (Read 4779 times)

Gida

  • Playmaker Newbie
  • *
  • Posts: 48
Open Document?
« on: February 26, 2016, 08:16:16 AM »
Hey! Whats the best way to open a Document like a PDF from within the game with playmaker is there an action?

Greetings :)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Open Document?
« Reply #1 on: February 26, 2016, 11:37:14 AM »

Gida

  • Playmaker Newbie
  • *
  • Posts: 48
Re: Open Document?
« Reply #2 on: February 29, 2016, 02:49:07 AM »
Hey and many thanks. But I simply want to launch a PDF in the external Reader on a button Press. :)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Open Document?
« Reply #3 on: February 29, 2016, 07:49:39 AM »
Hi,
for which platform are you building?

Gida

  • Playmaker Newbie
  • *
  • Posts: 48
Re: Open Document?
« Reply #4 on: February 29, 2016, 08:53:18 AM »
Hey Dino,

PC / MAC

Gida

  • Playmaker Newbie
  • *
  • Posts: 48
Re: Open Document?
« Reply #5 on: February 29, 2016, 11:24:11 AM »
got something?

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Open Document?
« Reply #6 on: March 01, 2016, 12:40:32 PM »
If you are on PC/Mac, try this in a C# script (edit path to whatever)

System.Diagnostics.Process.Start(@"c:\myPdf.pdf");
« Last Edit: March 01, 2016, 02:05:54 PM by dudebxl »

Gida

  • Playmaker Newbie
  • *
  • Posts: 48
Re: Open Document?
« Reply #7 on: March 02, 2016, 03:10:06 AM »
THNX, will try :)

Gida

  • Playmaker Newbie
  • *
  • Posts: 48
Re: Open Document?
« Reply #8 on: March 02, 2016, 05:30:32 AM »
Worked like a charm :) Thank you, solved

Gida

  • Playmaker Newbie
  • *
  • Posts: 48
Re: Open Document?
« Reply #9 on: March 03, 2016, 11:55:48 AM »
hm but not from touch. is there another solution???

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Open Document?
« Reply #10 on: March 03, 2016, 12:20:52 PM »
what do you mean by touch? You mean from a mobile device?

Gida

  • Playmaker Newbie
  • *
  • Posts: 48
Re: Open Document?
« Reply #11 on: March 04, 2016, 02:51:29 AM »
Hi,

I think ive got a problem with the path. The Document should be launched from the root Folder so I replaced "c:\myPdf.pdf" with ..\myPdf.pdf".
1st Question : Is this correct?

2nd Question: shall I put it in the update or start function?

Greetz

EDIT:

when testing and switching to runtime, where should the
« Last Edit: March 04, 2016, 06:58:58 AM by Gida »

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Open Document?
« Reply #12 on: March 04, 2016, 09:35:00 AM »
Try this action.. let me know if it works in the build (so that i can put on the ecosystem).

This is only for OS & Win (maybe mobile!!! - it should work but not tested) and uses System.Diagnostics.Process.Start

I tested with a picture from dropdown Mypictures and it works for me.

Thx

pietwelve

  • Junior Playmaker
  • **
  • Posts: 70
Re: Open Document?
« Reply #13 on: September 13, 2017, 08:27:56 PM »
Hi dudebxl,
I'm trying you action that i'm very interested in.
It works fine when the .pdf is in  "my pictures" windows folder, but I can't have it work with the .pdf file in the Game Asset Folder. Sorry if it sounds dummy.
My setup is :
filename : temp.pdf; file path : temp.pdf; set path : streaming asset path
and the temp.pdf file in the Asset folder.