Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re[2]: st: Printing graphs to pdf under program control


From   Ian Watson <[email protected]>
To   Alan Riley <[email protected]>
Subject   Re[2]: st: Printing graphs to pdf under program control
Date   Sun, 17 Oct 2004 21:37:14 +1000

Dear Alan,

  Thanks for looking into this. Your suggested syntax worked fine, but
  Acrobat Distiller stayed open after processing the the eps file.
  Fortunately, your suggested link to:

  http://www.adobe.com/support/techdocs/321090.html

  provided the answer. If one uses the command line

  !"C:\Program Files\Adobe\Acrobat 5.0\Distillr\acrodist.exe"
       /n /q /o c:\temp\mytest.pdf c:\temp\mytest.eps

  (note the addition of /n /q) Distiller closes after processing the
  eps file.

  Also, if one uses winexec instead of the shell command (the !), then
  one avoids the OS window opening also.

  In the course of hunting down command line options (using Google) I
  also came across a useful discussion on creating PDFs from PS files
  under Linux:

  http://www.pathcom.com/~kujira/pdf6.htm


  Of course, as Kit mentioned, the other option is to move to a
  Mac OS X system.
  

Kind regards

Ian


Alan Riley wrote:

AR> This should be possible by using Distiller's command-line parameters.
AR> I just tried the following on my system from within Stata:

AR>   . sysuse auto
AR>   . scatter mpg weight
AR>   . graph export c:\temp\mytest.eps
AR>   . !"C:\Program Files\Adobe\Acrobat 5.0\Distillr\acrodist.exe"
AR>        /o c:\temp\mytest.pdf c:\temp\mytest.eps
  
AR> Note that everything after the shell command (!) should all be on
AR> one line.

AR> This fired up an instance of Distiller and converted the file
AR> c:\temp\mytest.eps which came from Stata into a pdf file.  The
AR> following document on Adobe's site may be of some additional
AR> assistance:

AR>    http://www.adobe.com/support/techdocs/321090.html

AR> It appears that a "job options file" may be created for Distiller
AR> to allow you to control various settings for the conversion process
AR> such as what font substitutions to use.  I did not find it necessary
AR> to do this in my test case above, however.


AR> --Alan
AR> ([email protected])
AR> *
AR> *   For searches and help try:
AR> *   http://www.stata.com/support/faqs/res/findit.html
AR> *   http://www.stata.com/support/statalist/faq
AR> *   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index