[Info-vax] GS convert PDF to PS.
Phillip Helbig undress to reply
helbig at asclothestro.multivax.de
Sun Mar 13 13:17:31 EDT 2022
In article <t0l1m4$7a5$1 at dont-email.me>,
=?UTF-8?Q?Jan-Erik_S=c3=b6derholm?= <jan-erik.soderholm at telia.com>
writes:
> I'm new to Ghostscript.
> I try to convert a PDF file to a PS file.
>
> And yes, this a step in the "print a PDF file" project.
> I had some issues with getting the Xerox printer to print
> a plain PDF file so I thought about converting i to to PS...
>
> Have tried with:
>
> $ gs "-dNOPAUSE" "-sDEVICE=ps2write" "-sOutputFile=out.ps" "-fOUT.PDF"
This works for me:
$ IF P1 .EQS. "" THEN GOTO USAGE
$ IF F$PARSE(P1,,,"TYPE") .EQS. "." THEN P1 = P1 + ".PDF"
$ IF P2 .EQS. "" THEN P2 = F$PARSE(P1,,,"NAME") + ".PS"
$ IF F$PARSE(P2,,,"TYPE") .EQS. "." THEN P2 = P2 + ".PS"
$ GS "-dNOPAUSE" "-sDEVICE=pswrite" "-dBATCH" "-sOutputFile=''P2'" 'P1'
$ EXIT
$USAGE:
$ TYPE SYS$INPUT
P1: PDF file (required), default type .PDF
P2: PostScript file (optional), default type .PS, default name <name_of_P1>.PS
$ EXIT
More information about the Info-vax
mailing list