I have created a plugin using firebreath its been installed in firefox but i wanted to know is it possible to load the plugin automatically when i open a file with

.XXX

extension ? example: you can right click on a PDF and open with browser and it opens the PDF in npapi plugin. How it is possible? and how PDF maintains same UI for all browsers and they dont expose their code its embedded. Do they use HTML 5 canvas? as far as i searched there are very less information about it.

1

There are 1 best solutions below

8
On

You can register plugins for file extensions (although you can't override built-in support that way): set(FBSTRING_FileExtents "XXX")

Plugins can be opened in the two relevant modes: embedded as an element in the page or as full-page - e.g. when you navigate to http://foo.com/bar.pdf or request a document who's mimetype your plugin handles. The Acrobat Reader plugin is most often seen as a full-page plugin and rarely actually embedded somewhere.