- Using: gs -sDEVICE=tiffsep1 -sCompression=lzw -o out%d.tif post.ps input.pdf - With post.ps: %! << /EndPage { newpath 0 0 moveto 1000 1000 lineto stroke } bind /Orientation 3 >> setpagedevice - Ghostscript returns an error. - KenS in StackOverflow said it could be a bug in the PDF interpreter. - It works if I use BeginPage, instead. The question in StackOverflow: https://stackoverflow.com/questions/63166024/how-can-i-write-a-line-in-a-pdf-with-a-gradient-with-ghostscript-postscript-with/63168132#63168132
This /EndPage procedure and the bug report are invalid. /EndPage must take 2 integers, consume them and return a boolean value. The following configuration works just fine. << /EndPage { newpath 0 0 moveto 1000 1000 lineto stroke exch pop 2 ne } bind /Orientation 3 >> setpagedevice