Skip to content

Instantly share code, notes, and snippets.

@irinkaa
Created April 13, 2020 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save irinkaa/9faadf30b3a5a381a0b621d72b712020 to your computer and use it in GitHub Desktop.
Save irinkaa/9faadf30b3a5a381a0b621d72b712020 to your computer and use it in GitHub Desktop.
/pagewidth currentpagedevice /PageSize get 0 get def
/pageheight currentpagedevice /PageSize get 1 get def
/stringHolder 10 string def
<<
/EndPage
{
2 eq { pop false }
{
newpath
0 0 moveto
0 20 lineto
200 20 lineto
200 0 lineto
closepath
%%gsave
1 setgray
fill
%%grestore
1 setlinewidth
0 setgray
stroke
gsave
/Times-Roman 9 selectfont
30 5 moveto
pagewidth
stringHolder cvs
show
( - ) show
pageheight
stringHolder cvs
show
grestore
true
} ifelse
} bind
>> setpagedevice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment