Forums > MaxMSP

opening a pdf NOT using opendialog

May 31, 2010 | 8:02 pm

basically, I want the file to just pop open on a click, but can only make it offer a file location with opendialog. Is there another object that can make pdfs open on screen with no user choice so that the same one always opens?

May 31, 2010 | 11:40 pm

If you are using a mac and know the path to the document you want to open you can use the [shell] external (google or will help you find it, the UB version is probably the one you need). Send it a message formatted:

cd ~/Desktop; open "target file.pdf"

If you want the file to open with a specific application, rather than the default you can format it like this:

cd ~/Desktop; open -a TextEdit "index.html"

The first path needs to be the containing folder and the end bit is the filename.


June 1, 2010 | 5:02 am

You can also do it The Applescript Way, also using the shell object.
Then you can define which application you will use for opening the PDF.


– Pasted Max Patch, click to expand. –
June 1, 2010 | 11:00 am

thanks guys

love this forum…

June 1, 2010 | 11:28 am

am i missing something? probably…

i just use the classic maxbrowser command:

– Pasted Max Patch, click to expand. –

…pretty easy to adapt to specify a path other than the patch path.

i mean, all the other methods are great too, of course…

June 1, 2010 | 1:18 pm

the maxbrowser trick is very nice too !
isnt it just fantastic that the same thing can be done in sooooo many ways in max ?

June 1, 2010 | 4:29 pm

Or use the built-in browser object.

– Pasted Max Patch, click to expand. –
June 2, 2010 | 10:19 am

To pid – I tried yours and it worked a treat, but it wont open the file when I turn it into an application. Did I do something wrong?

– Pasted Max Patch, click to expand. –

June 2, 2010 | 10:35 am

@bob76: i’m afraid i have no idea, as applications are not my strong point. but presumably they have ‘root’ as themselves, as it were. try including the pdf in the app and not using the ‘path’ command to ‘thispatcher’ but simply the known path to the folder structure of the app?

others will be able to give more help no doubt.

June 2, 2010 | 12:08 pm

A couple of days ago AD. posted this zip for the shell object on the forum…if you need it

the first one is the right one ;-)

June 2, 2010 | 12:41 pm

All working – thanks for the shell zip – that was just what I needed.

December 8, 2013 | 8:06 pm

I wonder whether the PDF files can be opened using some manual PDF readers built with the help of some manual tools which can be customized by users according to our own favors to help open and view PDF files? Any ideas?

Best regards,

May 7, 2014 | 7:57 pm

right, pdf related software such as pdf reader, pdf viewer or other applications can be used to open pdf document. external software or built in application.

  • This reply was modified 10 months by  dhimage.
Viewing 13 posts - 1 through 13 (of 13 total)

Forums > MaxMSP