Silent pdf creation

Discussion in 'AutoCAD' started by Marcel Janmaat, May 14, 2004.

  1. Hello there,

    Ive downloaded a free pdf converter but cannot seem to make it print
    silently. Meaning, it always asks for a filename. I want to be able to
    provide the
    filename so i can use it in my Vlisp programming (on the command prompt).

    Can anybody help me on this?
     
    Marcel Janmaat, May 14, 2004
    #1
  2. I have three different ones. But all without the posibility of unchecking a
    filename.
    Can you perhaps provide me yours?

    MJ
     
    Marcel Janmaat, May 14, 2004
    #2
  3. The CutePDF and Pdf995 (free versions)
     
    Marcel Janmaat, May 17, 2004
    #3
  4. I tried several free PDF creators, but still cannot to make it print
    silently. Meaning, NOT asking for a filename. I want to be able to
    provide the filename with the print command so i can use it in my Vlisp
    programming (on the command prompt).

    MJ

     
    Marcel Janmaat, May 26, 2004
    #4
  5. Marcel Janmaat

    S. Yoder Guest

    Have you tried just plotting to a postscript file, to a particular
    directory, and having something "watch" that directory? Like Acrobat or
    GoBatchGS?
    http://www.output.tmfweb.nl/
    See "Ghostscript GUI".

    Works pretty silently here.
     
    S. Yoder, May 26, 2004
    #5
  6. I still haven't found what i'm looking for.

    Also a good song by U2.
     
    Marcel Janmaat, Jun 23, 2004
    #6
  7. Marcel Janmaat

    steedj Guest

    TRY THIS...
    Use Ghostscript 8.14 PDF creator software.
    (see download info below)
    You can run it from your Vlisp Routine.
    Prior to running Ghostscript, isolate your drawing name so that the name is assigned to a lisp variable that Ghostscript can use to create a PDF. This should allow you to provide the
    filename so you can use it in your Vlisp routine.

    Here's what I do:
    I have my program set to read the drawing name -- the code looks something like this:

    (setq dwg_name (getvar "dwgname")
    pltname (substr dwg_name 1 (- (strlen dwg_name) 4)) ;;remove extension from dwg name -- use this in your Plot command line
    DwgPfx (getvar "dwgprefix") ;c:\etc
    PDFFILE (strcat DwgPfx pltname ".pdf") ;create PDF Filename
    );setq
    (setq GS_sheet1 (strcat DwgPfx pltname ".plt")) ; create Postscript file name

    GHOSTSCRIPT DOWNLOAD:
    Down load AFPL Ghostscript (PDF creator), gs814w32.exe,
    from here:ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/gs814/
    Or from here: http://prdownloads.sourceforge.net/ghostscript/gs700w32.exe?download
    gs814w32.exe is a self extracting zip file. run it and install Ghostscript (Note: do not change the location of the Ghostscript file -- c:\gs\...)



    GHOSTSCRIPT LISP CODE:
    Here's the Code (Sub-Routine) you will need to convert your postscript to PDF using GhostScript. Note the Lisp variabales PDFFILE & GS_sheet1 are contained within the code below; They were taken from the code above. Also, in order for the code below to work as shown, make sure to use the "pltname" variable as the filename inside your PLOT command line of code when you create your Postscript file -- if you do not, the resulting Postscript file name willnot match the file name within the GS_sheet1 variable. Thus, the code below will not work as shown):

    (defun make_PDF ()
    (setq GSEXE "C:\\gs\\gs8.14\\bin\\gswin32c.exe")
    ;;--------------------------------------------
    ;;Multi sheet Set Ghostscript switches:
    ;;-------------------------------------------
    (setq GSARGS (strcat
    " -sDEVICE=pdfwrite"
    " -q"
    " -dPDFSETTINGS=/prepress"
    " -dCompatibilityLevel=1.3"
    " -dNOPAUSE"
    " -dBATCH"
    " -sOutputFile=" PDFFILE
    " -c .setpdfwrite"
    " -f " GS_sheet1
    ));setq
    ;;----------------------
    ;;Run Ghostscript:
    ;;----------------------
    (startapp GSEXE GSARGS)

    (princ)
    );end Make_pdf

    Hope this helps.
    I use something like the above every day.
    With a simple, single click of an assigned toolbar button, I can spit out both single & multi-page PDF till the cows come home and the cool part is that all the software is free!

    Regards
    J. Steed
     
    steedj, Jun 24, 2004
    #7
  8. A little late response but...

    Thanx for your code. I'm working on it but with no luck so far.
    What i get when i use the code is verry shortly a minimized dosscreen on the
    windows-toobar, wich is okay, but i dont see the file yet. The result of the
    routine is 33.

    is assigned to a lisp variable that Ghostscript can use to create a PDF.
    This should allow you to provide the
    extension from dwg name -- use this in your Plot command line
    (Note: do not change the location of the Ghostscript file -- c:\gs\...)
    PDF using GhostScript. Note the Lisp variabales PDFFILE & GS_sheet1 are
    contained within the code below; They were taken from the code above. Also,
    in order for the code below to work as shown, make sure to use the "pltname"
    variable as the filename inside your PLOT command line of code when you
    create your Postscript file -- if you do not, the resulting Postscript file
    name willnot match the file name within the GS_sheet1 variable. Thus, the
    code below will not work as shown):
    both single & multi-page PDF till the cows come home and the cool part is
    that all the software is free!
     
    Marcel Janmaat, Sep 14, 2004
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.