Questions tagged [enscript]

Enscript is a program that can convert source code files into PostScript files.

The enscript program can convert numerous types of computer languages from their source files into syntax-highlighted PostScript.

20 questions
8
votes
2 answers

Convert source code to syntax highlighted image

Background OpenOffice Writer lacks the ability to link to an ASCII text source file, apply syntax highlighting, wrap it in a frame, and update the frame contents whenever the source file changes. However, OpenOffice Writer can link to images, and…
3
votes
1 answer

Linux enscript multiple text files to a single PostScript file

I'm using this code to create a text file from our application, convert it to PostScript using enscript and then convert it to PDF. function print_order { ORDERFORM="Sales Order" PARAMFILE="$1.par" echo "OUTPUT_TO:FILE:$1.tmp" > $PARAMFILE …
user3636943
  • 129
  • 1
  • 11
2
votes
0 answers

Using mac fonts with enscript

I'm using GNU enscript on a MacBook pro this command works enscript -G --line-numbers -f Helvetica@11 -p out1 file.txt I'd like to be able to use some of the native mac fonts - is there a way to find the correct font name to use in the -f command…
ja.
  • 1,329
  • 9
  • 14
2
votes
1 answer

Permission denied when adding enscript command as alias in bash_profile

Via this post, I am using the following command to export all .java files recursively in a directory to PDF form (files.pdf): enscript -r -1 --file-align=2 --font=Courier7 --pretty-print=java --line-numbers -o - `find . -name '*.java'` | ps2pdf -…
r123454321
  • 3,323
  • 11
  • 44
  • 63
2
votes
2 answers

Linux enscript -- footer doesn't work (final purpose is to add pager number at footer for PDF)

Does anybody know how to add page number at footer for PDF? Followed is an example to show how to add page number at header by using enscript, ps2pdf pdftk. It works. #!/bin/bash input="$1" output="${1%.pdf}-header.pdf" pagenum=$(pdftk "$input"…
warem
  • 1,471
  • 2
  • 14
  • 21
1
vote
1 answer

How to convert txt to pdf with utf-8?

I use the following command to convert txt to ps. Then convert ps to pdf. enscript --header='Page $% of $=' --word-wrap -o output.ps 2>/dev/null < input.txt But it does not work for utf-8 input. enscript --header='Page $% of $=' --word-wrap -o…
user1424739
  • 11,937
  • 17
  • 63
  • 152
1
vote
1 answer

what happens to the js code inside EM_ASM?

In Enscripten what happens to the code inside EM_ASM function? I mean if that code get compiled or interpreted at runtime? If compiled then if that runs faster or slower than native interpreted js in browser?
Navid
  • 53
  • 10
1
vote
2 answers

Prepend header to file without changing the file

Background The enscript command can apply syntax highlighting to various types of source files, including SQL statements, shell scripts, PHP code, HTML files, and more. I am using enscript to generate 300dpi images of source code for a technical…
Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
1
vote
1 answer

Printing colorful syntax highlighting to paper

I want to print out some code on paper including syntax highlighting. After some research, I found out, that I could do this with pygments and enscript, but don't know how to combine these tools. Obviously there must be someone out there, who has…
uloco
  • 2,283
  • 4
  • 22
  • 37
1
vote
1 answer

How to change the syntax highlight color in GNU Enscript?

GNU Enscript is a free replacement for Adobe enscript program, and I downloaded it for syntax highlighting and *.ps output, but can I change the default color model? I found that there is a file named c.st in /usr/share/enscript, but it's just…
Kevin Dong
  • 5,001
  • 9
  • 29
  • 62
1
vote
1 answer

How to change text color in output from enscript

I am am converting simple text file to PDF from command line on Mac using following code: enscript -Bp '-' input.txt | pstopdf -i -o outfile.pdf What I would like to do is that color my text/font in PDF file. I believe enscript has color options…
Supertech
  • 746
  • 1
  • 9
  • 25
0
votes
0 answers

Starting page numbers at 600

I use enscript to add page numbers to PDF files generated from libreoffice. I use the following script and have always started numbering at page 1. Now I want to start numbering at page 600 and my guesses don't work. The script still writes page…
Strider22
  • 21
  • 4
0
votes
1 answer

enscript error: must print at least one line per page: --no-header

I'm getting the following error using RedHat 8 after an upgrade from RedHat 7: error: must print at least one line per page: --no-header Why won't it print a blank page?
0
votes
0 answers

Enscript syncDataBase returns "07:46:10 [ERROR ] [4300] [14492] 0% HTTP request failed, code: 403, error: Forbidden"

I tried with and without credentials but same result. Worked fine last year. I'm using Powershell to call the Enscript commands. .\ENScript.exe syncDatabase /l "$sti\log.txt" #/d "xxxxxxxx" /p $pw /v | out-file "$sti\log.txt" I've tried both old…
tholm
  • 1
  • 1
0
votes
2 answers

Enscript: where is the AFM folder located at on OSX?

I installed enscript thru brew install enscript Normally AFM folder located at /usr/share/enscript/afm but no such directory.
CuriousNewbie
  • 319
  • 4
  • 13
1
2