我只是想在将文件传输到 lp 之前更改文件的方向,因为 -o 选项不起作用:
gs -sDEVICE=pxlcolor -sOutputFile="\|lp -dprintername" -dNOPAUSE -dBATCH -c "<</Orientation 3>> setpagedevice" -f "inputfile"
给出:
GPL Ghostscript 8.70 (2009-07-31)
Copyright (C) 2009 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefined in This
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop 1739 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:1149/1684(ro)(G)-- --dict:0/20(G)-- --dict:70/200(L)--
Current allocation mode is local
Current file position is 5
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
即使这也给出了类似的错误:
gs -sDEVICE=pxlmono -sOutputFile=/dev/stdout -dNOPAUSE -dBATCH -c "<</Orientation 3>> setpagedevice" -f "test"