Extension:Embed Document

Purpose
Will show a document like *.pdf, *.doc, *.wav embedded inside a MediaWiki page.

"Here is my sugestion on dealing with pdf files and an answer from a coleague:

-- MarcioCarneiro? - 23-10-2007 16:09

Is it possible to develop a plugin to read a pdf file and write a wiki file? I have clients who need to read a pdf file with legal newspaper every day and I am trying to build a legal document management system inside a wiki engine.

About wiki files, could be a native xml database the management of wiki files such as sedna, eXist or xindice? "

And here is the answer:

"Hi Marcio!

Although you will need some engineering efforts, yes, it's possible (and after, you can publish your own piece of software, better if free software!). Such flux can be stated as:

PDF -> PDF filter -> Wiki format converter -> Input

Well, the PDF block is your newspaper (um Diário Oficial da União, I think),

The PDF can be parsed/manipulated via Perl, for instance (look at http://search.cpan.org/~antro/PDF-111/PDF.pm). That's your filter block.

The Wiki format converter can even be part of the lst module, embedded into the same perl (convertin keywords/tags into wiki tags).

And the insert can be made also via Perl using DBI.

-- MauricioMauad - 23 Oct 2007"

Usage
/my/path/myfilename.pdf

/my/path/myfilename.pdf

Note: The path has to be in your wiki's root directory

Installation

 * 1) Copy the code into
 * 2) Add  into

Code
markers, allowed are onlya...zA...Z0...9_/.</li>-</li>:</li></ul> ";  } }

PDF
If you are using mediawiki version 1.12 (work only here, because of Extension:Filepath and Extension:TagParser are needed!), it would probably be a good idea to create a template for simple document embedding. <div style="color:#000000; border:solid 1px #A8A8A8; padding:0.0em 0.em 0.0em 0.em; background-color:#FFFFFF;font-size:80%; vertical-align:middle; width:50%">
 * 1) follow Creating template for handling PDF files
 * 2) open the page Template:Pdf_embed in you wiki, edit and insert this code:

Now you can use this template to add a pretty looking box (width 50%, height 450) with link and embedded PDF file to your wiki pages. And there is no need to specify the full path anymore!