1
votes

I created a custom syntax highlighting configuration for Gedit/GtkSourceView. It has worked well for my purposes, but now I am trying to find a way to export the highlighted text files as PDF via the Linux terminal.

I know that this is possible through the Gedit GUI function, but is this possible via the terminal?

I have come across the enscript GNU project, but this only seems to have pre-programmed syntax highlighting; I do not see a way to have it utilize GtkSourceView syntax highlighting/theme configurations.

1

1 Answers

0
votes

It seems like there is no way to print using GtkSourceView from the command line. With enscript, however, you can copy your own language definition file to ~/.enscript/.

From the manual page:

StatesPath: path

Define the path for the states program. The states program will lookup its state definition files from this path. The default value is `$HOME/.enscript:/usr/share/enscript/hl'.

Have a look at the .st files in /usr/share/enscript/hl for examples.