Using Postscript, I want to retrieve the name of the file being executed. I know that I can get the file object using 'currentfile', but how do I get its name?
I want to include the name in the document.
Thanks.
Ghostscript has a .filename
operator that'll do it. No idea about the portability. Tiny viewable example:
/Times-Roman findfont
12 scalefont
setfont
newpath
100 200 moveto
currentfile .filename pop show