Opening with PDF-Xchange Viewer by right-clicking


Simple script to open pdf files with PDF-XChange Viewer through wine by right clicking and selecting this script from Nautilus Scripts.Place this script inside .gnome2/nautilus-scripts/ 

( Go to home folder and press "Ctrl h" to see .gnome2 folder; inside this folder nautilus-scripts folder is present; place this script there; script can have any name but naming it 'PDF-XChange Viewer' make some sense; make script executable )





-------------------------------------------------------------------------------------------------------------------------------------------------
HOW THIS SCRIPT WORKS:

"C:\Program Files\Tracker Software\PDF Viewer\PDFXCview.exe" is where PDF-XChange Viewer executable file is placed inside the wine folder(/home/$USER/.wine).

'winapath -w' will convert the  Unix path name to Win32 path  i.e  '/home/$USER/script.txt' will be converted to  'Z:\home\$USER\scripts.txt'

'$*' represent the complete path of the file you have selected i.e script.txt file in Desktop will have a complete path name  /home/$USER/Desktop/script.txt

-------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

#!/bin/bash

#for opening file with PDF-XChange Viewer

PDFXVIEWER="C:\Program Files\Tracker Software\PDF Viewer\PDFXCview.exe"

file=$(winepath -w "$*")

wine "$PDFXVIEWER" "$file"


[Download script]






(note: to install wine run   sudo apt-get install wine ( Ubuntu ) in terminal or use Software Center  ( Ubuntu ) or Add/Remove Software ( Fedora ).
          Get installation files of PDF-XChange Viewer from http://www.tracker-software.com/product/pdf-xchange-viewer )


 Enjoy Linux !!


No comments:

Post a Comment