Converting Blusfish syntax-highlighted PHP code in to a PDF

Richard Mancusi vrman49 at gmail.com
Thu Apr 12 15:25:10 UTC 2007


On 4/12/07, Gabriel Dragffy <dragffy at yandex.ru> wrote:
> Nicolas Kaiser wrote:
> > On 4/12/07, Richard Mancusi <vrman49 at gmail.com> wrote:
> >> You can print from Bluefish - it just needs to be setup.  Following is
> >> my strange setup - I suspect there is a better way.
> >>
> >> 1. Edit/Preferences/External programs
> >>    Utilities and filters section
> >>    Add
> >>    (I added 3 "printers" - this is where YOU can get inventive)
> >>    Label = Print    Command = lpr '%s'
> >>    Label = enscript   Command = enscript -B --font=Courier8 -M letter '%s'
> >>    Label = enscript-hdr   Command = enscript --font=Courier8 -M letter '%s'
> >
> > Sure, but these don't do syntax-highlighting, do they? Try
> >
> > Label = vim-ps   Command = vim "+ha >%s.ps" +q %s 2>/dev/null
> >
> > Should create a syntax-highlighted %s.ps postscript file.
> >
> > Problem with vim is, it uses different colors than Bluefish. For
> > printing the original Bluefish colors you'd need to convert Bluefish
> > syntax highlighting to vim.
> > If there's an easier way to print with original Bluefish syntax
> > highlighting, I'm all ears.
> >
> > Cheers,
> > n.
> >
>
>
> In bluefish I give it the command
> vim "+ha>~/PDF/%s.ps" +q %s 2>/dev/null
>
> but i can't seem to get any kind of output :( I have tried changing it
> in all sorts of ways, but nothing seems to output a file.
>
> After I get this working I'm thinking I can pipe the output to
> lp -d 'postscript-color'
> Where hopefully I'll end up with my PDF :)
>

I just tested the following - I don't know if it answers all your questions
but perhaps it's a start.

1. I named my cups pdf printer PDF_Printer (pretty unique, huh :-) )
2. In Bluefish I added the following
    Label = pdf-printer    Command = lpr -PPDF_Printer '%s'

When you select pdf-printer from External/Commands it appears that
nothing happened.  However, if you look in /home/"userlogon"/PDF
or wherever you defaulted your cups pdf to, you will find your completed
pdf.

hth
-rich




More information about the ubuntu-users mailing list