• Help with command line usage

    From D.B. Carter@21:1/5 to All on Fri Jun 17 12:32:30 2022
    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.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeffrey H. Coffield@21:1/5 to D.B. Carter on Fri Jun 17 14:30:50 2022
    On 06/17/2022 12:32 PM, D.B. Carter wrote:
    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.)


    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ross Presser@21:1/5 to Jeffrey H. Coffield on Sat Jun 18 18:33:24 2022
    On Friday, June 17, 2022 at 5:30:53 PM UTC-4, Jeffrey H. Coffield wrote:
    On 06/17/2022 12:32 PM, D.B. Carter wrote:
    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.)

    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

    You might want to use the pdfwrite2 device.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ken@21:1/5 to All on Sun Jun 19 08:36:59 2022
    In article <e687f727-39bc-4d67-b896-6c91b231b487n@googlegroups.com>, fathedfred@gmail.com says...

    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.)

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From luser droog@21:1/5 to D.B. Carter on Sun Jun 19 19:21:36 2022
    On Friday, June 17, 2022 at 2:32:32 PM UTC-5, D.B. Carter wrote:
    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.)

    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).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ross Presser@21:1/5 to ken on Wed Jun 22 09:06:54 2022
    On Sunday, June 19, 2022 at 3:36:59 AM UTC-4, ken wrote:
    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.

    My bad then, sorry for getting them confused.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)