HEX
Server: Apache/2.4.68 (codeit) OpenSSL/4.0.1
System: Linux societies-web 5.4.17-2136.353.3.el8uek.x86_64 #3 SMP Thu Feb 12 09:46:56 PST 2026 x86_64
User: yles (1028)
PHP: 8.3.31
Disabled: exec,shell_exec,passthru,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source,symlink,pcntl_exec
Upload Files
File: //usr/bin/ps2ps2
#!/bin/sh
# "Distill" PostScript with the Ghostscript 'ps2write' device
# this generates a PDF-style stream with an attached 
# PostScript program to interpret it.

# This definition is changed on install to match the
# executable name set in the makefile
GS_EXECUTABLE=gs

OPTIONS="-P- -dSAFER"
while true
do
	case "$1" in
	-?*) OPTIONS="$OPTIONS $1" ;;
	*)  break ;;
	esac
	shift
done

if [ $# -ne 2 ]; then
	echo "Usage: `basename \"$0\"` [options] input.ps output.ps" 1>&2
	echo "  e.g. `basename \"$0\"` -sPAPERSIZE=a4 input.ps output.ps" 1>&2
	exit 1
fi

exec $GS_EXECUTABLE -q -sDEVICE=ps2write -sstdout=%stderr "-sOutputFile=$2" -dNOPAUSE -dBATCH $OPTIONS "$1"