Inline PDF solution available for Camino 2.0a1pre builds

Talk about the native Mac OS X browser.

Moderator: Camino Developers

User avatar
Uncle Asad
Camino Developer
Posts: 3957
Joined: July 24th, 2004, 1:38 pm
Location: بين العالمين
Contact:

Inline PDF solution available for Camino 2.0a1pre builds

Post by Uncle Asad »

Edit 2009-10-06:

DO NOT USE THIS PLUG-IN; use the new version of the Schubert PDF Browser Plugin instead.

We have discovered over the course of this thread that the Firefox PDF plugin is buggy, causes crashes, and requires a very complex and unfriendly installation method.

----

As seen on Mac OS X Hints, there's a new PDF plug-in available for Mac OS X 10.4 and 10.5. It mostly works in Camino trunk (2.0a1pre) builds, too.

It's packaged as a Firefox extension with a XUL wrapper around the actual NPAPI plug-in; however, the actual NPAPI plug-in (pdfplugin.plugin) does work in Camino trunk (2.0a1pre) builds, too. Just download the .xpi file ("Install Now" link), rename the .xpi file to .zip, unzip it, and put the pdfplugin.plugin from the "plugins" folder in (~)/Library/Internet Plug-ins on your Mac and relauch Camino.

Some keyboard shortcuts (arrow keys/pgUp/Dn/home/end for navigation) don't work, but scrolling with the scrollbar/trackpad works, as do zoom in/out (cmd-=/-). Selection of text and copy work, also. It's certainly usable, though.

Note the plug-in is not compatible with Camino 1.6.x (presumably it uses the new plug-in models introduced in Gecko 1.9), and it breaks the existing "auto-download" of pdfs in Camino 1.6.x on Intel Macs.
Last edited by Uncle Asad on October 6th, 2009, 9:18 am, edited 2 times in total.
Reason: warn that this thread is old and the plugin shouldn't be used
Mac OS X 10.3.9 • PowerBook G4 17" 1.33 GHz | Mac OS X 10.5.x • MacBook Pro 15" 2.2 GHz
Snow7's Camino Forum FAQSearch the Forum  Camino. HelpTroubleshoot Camino
User avatar
Uncle Asad
Camino Developer
Posts: 3957
Joined: July 24th, 2004, 1:38 pm
Location: بين العالمين
Contact:

Re: Inline PDF solution available for Camino 2.0a1pre builds

Post by Uncle Asad »

Some other notes:

• The plug-in doesn't seem to support standard PDF page/fragment identifiers
• It can occasionally eat the next/previous tab shortcuts
• If you switch back and forth between 1.6.x and 2.0a1pre builds and don't want to kill 1.6.x's ability to download PDFs, you can store the plug-in in the 2.0a1pre Camino.app/Contents/MacOS/plugins folder
Mac OS X 10.3.9 • PowerBook G4 17" 1.33 GHz | Mac OS X 10.5.x • MacBook Pro 15" 2.2 GHz
Snow7's Camino Forum FAQSearch the Forum  Camino. HelpTroubleshoot Camino
User avatar
davedit
Posts: 390
Joined: October 18th, 2007, 7:56 pm
Location: San Diego, CA
Contact:

Re: Inline PDF solution available for Camino 2.0a1pre builds

Post by davedit »

Very cool, thanks for the tip!
Camino Themes and Stuff (If that doesn't work, try the mirror)
Pimp My Camino
User avatar
jcraig
Posts: 1958
Joined: December 6th, 2002, 6:38 pm
Location: Plainfield, IL USA
Contact:

Re: Inline PDF solution available for Camino 2.0a1pre builds

Post by jcraig »

So long Manfred...
There is no dark side of the moon, really. As a matter of fact, it's all dark.
User avatar
Uncle Asad
Camino Developer
Posts: 3957
Joined: July 24th, 2004, 1:38 pm
Location: بين العالمين
Contact:

Re: Inline PDF solution available for Camino 2.0a1pre builds

Post by Uncle Asad »

Also, note that the author of this plug-in is releasing new versions very quickly, so be sure to check back there for updates. The latest version fixes some keyboard nav bugs (but between the plug-in and focus bugs in Gecko 1.9, it’s hard to tell what’s a bug in the plug-in and what’s just horribly broken in Gecko :( For instance, while the arrow keys now work, in order to get them to work you have to explicitly click in the plug-in content, but that has the unfortunate result of eating the tab-switching shortcuts 100% of the time, and then triggering known Gecko/Cocoa widgets plug-in bugs).
Mac OS X 10.3.9 • PowerBook G4 17" 1.33 GHz | Mac OS X 10.5.x • MacBook Pro 15" 2.2 GHz
Snow7's Camino Forum FAQSearch the Forum  Camino. HelpTroubleshoot Camino
ozean
Posts: 301
Joined: July 20th, 2003, 6:22 am
Location: Oslo
Contact:

Re: Inline PDF solution available for Camino 2.0a1pre builds

Post by ozean »

In the last few days there have been a few new builds (after a three month period without any activity). However, when I tried the newest version (0.9.9.5), Camino crashed when opening a PDF.
User avatar
Uncle Asad
Camino Developer
Posts: 3957
Joined: July 24th, 2004, 1:38 pm
Location: بين العالمين
Contact:

Re: Inline PDF solution available for Camino 2.0a1pre builds

Post by Uncle Asad »

ozean wrote:In the last few days there have been a few new builds (after a three month period without any activity). However, when I tried the newest version (0.9.9.5), Camino crashed when opening a PDF.

Fortunately, there seems to be an easy fix, if a rather ugly one :(

The author has changed how he does certain things in the newer versions and, rather than using the plug-in API, is using XPCOM, which means he's added a bunch of files.

The only way to use the plug-in now is to perform surgery on Camino itself.

1) Download the latest version from http://code.google.com/p/firefox-mac-pdf/ ("Install PDF Plugin" link)
2) Rename the .xpi file .zip (so Mac OS X will know how to expand it) and double-click to extract the files
3) Copy the "pdfplugin.plugin" file into Camino.app/Contents/MacOS/plugins
4) Copy the contents of the "components" folder into Camino.app/Contents/MacOS/components

N.B. You will need to repeat this procedure any time you install or upgrade Camino.

See the previous posts for some of the known problems with the plug-in in Camino.

Edited to supply a better step-by-step set of instructions
Mac OS X 10.3.9 • PowerBook G4 17" 1.33 GHz | Mac OS X 10.5.x • MacBook Pro 15" 2.2 GHz
Snow7's Camino Forum FAQSearch the Forum  Camino. HelpTroubleshoot Camino
marxistvegan
Posts: 13
Joined: July 13th, 2005, 11:03 am

Re: Inline PDF solution available for Camino 2.0a1pre builds

Post by marxistvegan »

Uncle Asad wrote:
ozean wrote:In the last few days there have been a few new builds (after a three month period without any activity). However, when I tried the newest version (0.9.9.5), Camino crashed when opening a PDF.

Fortunately, there seems to be an easy fix, if a rather ugly one :(

The author has changed how he does certain things in the newer versions and, rather than using the plug-in API, is using XPCOM, which means he's added a bunch of files.

The only way to use the plug-in now is to perform surgery on Camino itself. As before, the pdfplugin.plugin file goes inside Camino.app/Contents/MacOS/plugins, but now the contents of the "components" folder inside the xpi need to live in Camino.app/Contents/MacOS/components.


So it better not to upgrade? or is the upgrade worth it?
lilmoch
Posts: 47
Joined: December 13th, 2007, 2:42 pm

Re: Inline PDF solution available for Camino 2.0a1pre builds

Post by lilmoch »

I just tried installing this following Uncle Asad's instructions for 0.9.9.5. I put the pdfplugin.plugin file in Camino.app/Contents/MacOS/plugins, and the contents of the components folder inside the xpi in Camino.app/Contents/MacOS/components.

Nevertheless, each time I click on a PDF link Camino crashes. Do any of you have this working? Or does anyone have an old version that they could perhaps send to me?
stardomains
Posts: 163
Joined: October 27th, 2008, 9:50 pm

Re: Inline PDF solution available for Camino 2.0a1pre builds

Post by stardomains »

lilmoch wrote:I just tried installing this following Uncle Asad's instructions for 0.9.9.5. I put the pdfplugin.plugin file in Camino.app/Contents/MacOS/plugins, and the contents of the components folder inside the xpi in Camino.app/Contents/MacOS/components.

Nevertheless, each time I click on a PDF link Camino crashes. Do any of you have this working? Or does anyone have an old version that they could perhaps send to me?


I could not get it to work either.

You can use the bookmarklet below and use PDFMENOT online flash to open in browser. The bookmarklet creates a link next to any pdf link on a webpage. Click it and it will open in PDFMENOT.

Code: Select all

javascript:(function()%7Bvar%20links=document.getElementsByTagName('a'),%20pdf_regex%20=%20new%20RegExp('pdf$','i');for%20(var%20i=0;%20i%3Clinks.length;%20i++)%20if%20(pdf_regex.test(links%5Bi%5D.getAttribute('href')))%20%7B%20links%5Bi%5D.href='http://pdfmenot.com/view/'+links%5Bi%5D.href;links%5Bi%5D.style.background%20=%20'url(http://static.retailmenot.com/pdf.gif)%20no-repeat';links%5Bi%5D.style.padding%20=%20'0%200%200%2020px';%7D%20%7D)()


ex. http://www.letterfu.com/letters/plain-lilac-letter.pdf

Put bookmarkelet in bookmark bar and click it. A PDF link appears in Camino next to example link.
lilmoch
Posts: 47
Joined: December 13th, 2007, 2:42 pm

Re: Inline PDF solution available for Camino 2.0a1pre builds

Post by lilmoch »

Very cool! Thanks for the tip.
User avatar
Uncle Asad
Camino Developer
Posts: 3957
Joined: July 24th, 2004, 1:38 pm
Location: بين العالمين
Contact:

Re: Inline PDF solution available for Camino 2.0a1pre builds

Post by Uncle Asad »

It works for me; I don't have any idea why it's not working for you :(

In my experimenting (and ozean's report above), the crashes came about because the stuff that belongs in Camino.app/Contents/MacOS/components/ was missing. Perhaps double-check that you have PDFplugin.xpt, PDFService.js, and PDFService.xpt in Camino.app/Contents/MacOS/components/ ?

In the end, because of all the focus/plug-in bugs in Gecko 1.9 and the new hackery required to install it, it's not a very elegant solution even when it is working, which is unfortunate. If you're on PPC, I think you're probably far better off with the ancient Schubert plug-in; on Intel, simply downloading the PDF, clicking Open, and then clicking Trash when you're done if you don't want the PDF is still a more effective workflow.
Mac OS X 10.3.9 • PowerBook G4 17" 1.33 GHz | Mac OS X 10.5.x • MacBook Pro 15" 2.2 GHz
Snow7's Camino Forum FAQSearch the Forum  Camino. HelpTroubleshoot Camino
stardomains
Posts: 163
Joined: October 27th, 2008, 9:50 pm

Re: Inline PDF solution available for Camino 2.0a1pre builds

Post by stardomains »

You can also go back to fx-quartz-pdf-0.9.9.xpi

http://code.google.com/p/firefox-mac-pd ... nloadCount
User avatar
hardcoreUFO
Posts: 240
Joined: March 19th, 2004, 9:14 am
Location: Dunedin, NZ

Re: Inline PDF solution available for Camino 2.0a1pre builds

Post by hardcoreUFO »

This instantly crashes the nightly (Version 2.0b1pre (1.9.0.4pre 2008103000)) upon loading a pdf file on my machine.
lilmoch
Posts: 47
Joined: December 13th, 2007, 2:42 pm

Re: Inline PDF solution available for Camino 2.0a1pre builds

Post by lilmoch »

I was able to get it to work using the version that "stardomains" linked to. The new version crashes Camino without fail.
Post Reply