Converting Blusfish syntax-highlighted PHP code in to a PDF
Gabriel Dragffy
dragffy at yandex.ru
Thu Apr 12 13:26:40 UTC 2007
Nicolas Kaiser wrote:
> 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.
>
Thank you so much for all the replies.
I have to say that ultimately a PDF is much more useful to me than PS.
Going the VIM route seems good. Can it go straight in to PDF though?
Also the files that I edit are stored remotely, and I edit them in
Bluefish via GnomeVFS (samba shares). If I put the VIM command in to
bluefish is it going to handle this OK?
Many thanks, Gabriel
More information about the ubuntu-users
mailing list