Page 1 of 1

Foxitreader URL launch fix

Posted: Fri 11 Feb 2011, 08:25
by ozsouth
*** Edit 17/2/11 (http fix is OK; www fix needed amending) ***

Foxitreader is a great pdf reader - can open embedded URLs. Default result in Puppy was to launch default text editor instead of browser. Other distros didn't have that trouble. Problem is in /usr/local/bin/defaulthandler.

Remove lines 6-8:

Code: Select all

if [ "`echo -n "$AFILE" | grep '\.'`" = "" ];then
 #/usr/local/bin/defaulttexteditor "$1"
 exit

Replace with:

Code: Select all

if [ "`echo -n "$1" | grep 'http:'`" ];then
 /usr/local/bin/defaultbrowser "$1"
exit
fi
if [ "`echo -n "$1" | grep 'www.'`" ];then
 /usr/local/bin/defaultbrowser "http://""$1"
exit

URLs now open the browser. Nothing else appears to be affected.

Foxit URL launch fix

Posted: Tue 01 Mar 2011, 12:27
by In the Doghouse
To ozsouth about the URL launch fix, THANK YOU!

I tried this, and it got FoxitReader reading embedded URLs, just as promised.

The bonus is that it also resolved my problem with TrueCrypt, which would take Help menu URLs, and launch an empty geany text editor window. (only remaining TrueCrypt Help menu problem is that the TrueCrypt User's Guide.pdf tries to be imported from postscript (?) into GIMP, instead of just going into Foxit. Had to replace gimp-2.6 executable with a script of the same name, that looks for the TrueCrypt launch of GIMP, and replaces it by calling Foxit:

Code: Select all

#!/bin/sh
if [ "`echo -n "$1" | grep 'TrueCrypt'`" ]; then
 /usr/local/bin/FoxitReader "$1"
exit
fi
exec gimp-2.6ORIG
[Syntax borrowed from ozsouth's URL fix script]

This works, but would love to know why Puppy calls GIMP for a PDF launch)

Posted: Thu 03 Mar 2011, 23:45
by Michalis
Great fix ozsouth.

Works also for transmission, probably for other programs too. I have suggested it also to Barry at his blog.

Posted: Thu 15 Mar 2012, 01:04
by Barkin
HTTPS links in PDFs don't work for me in Foxit (with FireFox 7),
all HTTPS hyperlinks clicked on in Foxit in my Puppy 525 are redirected to www.homeimprovement.com

I've attached a test PDF (in zip file) with HTTP and HTTPS links, (made in Open Office).

[Both the HTTP and HTTPS links in the attached PDF work OK in Adobe reader in Windows Vista].

Foxitreader Quick Fix

Posted: Thu 15 Mar 2012, 08:27
by ozsouth
Referring to initial post, removing the colon after the first http (in /usr/local/bin/defaulthandler) is the quick fix. I now use Racy 522 & its Epdfview opens weblinks, but the same version doesn't in Puppy 525/528/529.