Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help with command line usage

23 views
Skip to first unread message

D.B. Carter

unread,
Jun 17, 2022, 3:32:32 PM6/17/22
to
Hello,
I'm trying to use Ghostscript via Autocad command line using Autolisp programming. The goal is totake multiple pdf's in a folder and create one pdf. I have the lisp writing the command line but it fails.
Here is what the autolisp file produces at the command line.

-sDEVICE= pdfwrite -dBATCH -sOutputFile=F:\Quick Plots\temp\20220617-TEST.PDF DP-L1.pdf DP-DP5.pdf DP-DP4.pdf DP-DP3.pdf DP-DP2.pdf DP-DP1.pdf

Why is failing?
(Error: /undefined in -sDEVICE=pdfwrite.)

Jeffrey H. Coffield

unread,
Jun 17, 2022, 5:30:53 PM6/17/22
to
You have a space between the "-sDEVICE=" and "pdfwrite" but the error
seems to show it is ignoring the space.

I don't see that the command starts with "gs" but I'm not a Windoze user.

Try "gs -h" and see if "pdfwrite" is listed under "Available devices:"

Jeff

Ross Presser

unread,
Jun 18, 2022, 9:33:26 PM6/18/22
to
You might want to use the pdfwrite2 device.

ken

unread,
Jun 19, 2022, 3:36:59 AM6/19/22
to
In article <12d3b91f-0037-4d9a...@googlegroups.com>,
rpre...@gmail.com says...

> You might want to use the pdfwrite2 device.

There is no pdfwrite2 device, there is ps2write but that outputs level 2
PostScript.


Ken

ken

unread,
Jun 19, 2022, 3:37:09 AM6/19/22
to
In article <e687f727-39bc-4d67...@googlegroups.com>,
fathe...@gmail.com says...
I can't see any way to get that from your stated command line. The space
between -sDEVICE= and pdfwrite should produce an 'unknown device:'
Ordinarily that ouwl read something like 'unknown device: devicename'
but in this case it is blank.

Can you quote the entire back channel output please ?


Ken

luser droog

unread,
Jun 19, 2022, 10:21:39 PM6/19/22
to
Stab in the dark, but the error makes it look like the PostScript interpreter is trying
to execute the command line as if it were PostScript code. Maybe autocad is piping
directly into a running ghostscript instance and you'll need to use some other
interface in Autocad to change the way ghostscript is being invoked (assuming the
earlier guess is correct).

Ross Presser

unread,
Jun 22, 2022, 12:06:57 PM6/22/22
to
My bad then, sorry for getting them confused.
0 new messages