Matt,
Thanks a lot for that! I was hoping I wasn't the first :) I also found your Word/PDF/Excel search stuff, will give that a go as well (and possibly add OO.org file formats at a later time if I can figure it out from your examples - I'll let you know if I do this).
Thanks again, -- Tarjei
On 6/7/05, MHart wiki@matthart.com wrote:
I wrote some stuff to output MediaWiki as PDF here: http://meta.wikimedia.org/w/index.php?title=PDF_Export
Basically, I copy index.php to PrintArticle.php with some modifications that parses the article for {Title} or {Title1 | Title2} where {Title} is the article(s) to export to PDF, and two titles separated by a | indicates no page breaking in the exported PDF.
Images are preserved as well as practically all formatting. I use htmldoc from www.htmldoc.com
So you would create a page titled: PDF Article For Whatever
{Whatever Article 1} {Whatever Article 2} {Short Article 3 | Short 4 | Short 5} {Whatever 6}
Then an href link to the PrintArticle page:
[http://yoursite.com/PrintArticle.php/PDF_Article_For_Whatever Create PDF for this article]
Then clicking on the "Create PDF for this article" generates something like...
Creating: (Whatever Article 1) etc...
PDF_Article_For_Whatever.pdf
The HTML for those articles is generated by MediaWiki and saved by the PrintArticle page mods to your server temp folder. I then exec() htmldoc to generate the PDF, saved in a /printouts folder that you must create w/same privileges as /images (basically Apache needs to be able to create the file in that folder).
You can get to it that posting when the meta site is back up.
- MHart
- http://taxalmanac.org
----- Original Message ----- From: "Tarjei Knapstad" tarjei.knapstad@gmail.com To: "Mediawiki" mediawiki-l@wikimedia.org Sent: Tuesday, June 07, 2005 11:57 AM Subject: [Mediawiki-l] Printing/typesetting/converting mediawiki documents
Hi,
We've recently started using Mediawiki quite extensively around the office as part of the intranet, and it's working out great. Thanks for a great piece of software!
We have one minor gripe though, which I'm trying to find a solution to: Are there any extensions or tools to print one or more wiki pages to postscript or PDF in a nice way?
Printing from Mozilla is quite decent, but you often end up with funny page breaks, there's some headers/footers I can live without etc. etc. Some solutions that've popped into my mind:
- is it possible to create an extension for this?
- is it possible to modify the css or whatever it is that decides how
the browser prints?
- are there any third party tools that could PDF-ify a Mediawiki DB?
- ... other ideas?
Any tips and pointers would be greatly appreciated.
Cheers,
Tarjei Knapstad _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l