Converting Blusfish syntax-highlighted PHP code in to a PDF

Nicolas Kaiser halforc at gmail.com
Wed Apr 11 22:56:00 UTC 2007


On 4/10/07, Gabriel Dragffy <dragffy at yandex.ru> wrote:
> Is there any way to save the lovely syntax-highlighted code of Bluefish
> in to a PDF? I ask only because I need to have code samples, and it
> would be fantastic if they could be highlighted. Also PDF is nice and
> compatible :)

I haven't found an option to print from Bluefish itself yet, however
if you just need syntax-highlighting, you can do so with vim, like
this:

vim "+ha >test.ps" +q test.php

should print syntax-highlighted to a postscript file. ("+q" is for
quitting vim immediately after printing.)
If this is useful enough for you, it might be possible to elaborate on
it (like printing to pdf straight away) and add it to "external
commands" in Bluefish, for convenience.

Cheers,
n.




More information about the ubuntu-users mailing list