enscript
actually creates a postscript file, not a PDF file. Most likely the PDF viewer used on the Linux systems in question also can display postscript files and, therefore, did not complain while the PDF viewer used on Windows can not. To actually create a PDF run ps2pdf
on the enscript
output.
On enscript
enscript
(at least the GNU version) does not output PDF but a choice of other formats:
GNU Enscript converts ASCII files to PostScript, HTML, or RTF and stores generated output to a file or sends it directly to the printer.
According to its man page the actual output format is selected using the -W / --language option:
-W [lang], --language[=lang]
Generate output for the language lang. The possible values for
lang are:
PostScript
generate PostScript (default)
html generate HTML
overstrike
generate overstrikes (line printers, less)
rtf generate RTF (Rich Text Format)
ansi generate ANSI terminal control codes
Your enscript
call does not include this option. Thus, by default postscript is generated.
How to create PDF
A common tool on Linux systems is ps2pdf
which you can use to generate a PDF from your enscript
postscript output:
ps2pdf - Convert PostScript to PDF using ghostscript
ps2pdf12 - Convert PostScript to PDF 1.2 (Acrobat 3-and-later compatible) using ghostscript
ps2pdf13 - Convert PostScript to PDF 1.3 (Acrobat 4-and-later compatible) using ghostscript
According to its man page it can be called with merely the source postscript and target PDF file names on the command line:
ps2pdf [options...] {input.[e]ps|-} [output.pdf|-]
ps2pdf12 [options...] {input.[e]ps|-} [output.pdf|-]
ps2pdf13 [options...] {input.[e]ps|-} [output.pdf|-]
You may have yet to install ghostscript to run it.