View Single Post
Posts: 134 | Thanked: 91 times | Joined on Nov 2009 @ Imperial College London
#6
For the N900 I couldn't find an easy way of opening a pdf stored on the ext3 partition. This solution worked brilliantly!

In case it's useful for anyone I've wrapped it up in a very rudimentary shell script below. If there's an easier way of doing this then someone please shout! It's annoying that osso_pdfviewer [filename(s)...] doesn't work, but there we go.

Here's the script (I've saved as /usr/bin/openpdf and then use openpdf [filename(s)...] from the command line):

Code:
#!/bin/sh

if [ `expr match "$1" "/*"` -eq 1 ]
 then
  fullpath=$1
 else
  fullpath="$PWD/$1"
fi

openme="file://$fullpath"

if [ -r $fullpath ]
 then
  run-standalone.sh dbus-send --print-reply \
  --dest=com.nokia.osso_pdfviewer /com/nokia/osso_pdfviewer \
  com.nokia.osso_pdfviewer.mime_open string:$openme
 else
  echo "could not read file $fullpath"
fi
 

The Following 3 Users Say Thank You to Big Phat Jan For This Useful Post: