[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Printing graphs to pdf under program control
Ian Watson (email@example.com) asked about automating the
production of PDF copies of Stata graphs:
> Has anyone had success passing a filename under program control to
> Acrobat Distiller on a Windows platform?
> I wish to print my graph to a pdf file, but graph export (to pdf) is
> not available under Windows. I can of course print to Acrobat
> Distiller manually. But what I want to do is automate the procedure
> inside a do file. ...
This should be possible by using Distiller's command-line parameters.
I just tried the following on my system from within Stata:
. sysuse auto
. scatter mpg weight
. graph export c:\temp\mytest.eps
. !"C:\Program Files\Adobe\Acrobat 5.0\Distillr\acrodist.exe"
/o c:\temp\mytest.pdf c:\temp\mytest.eps
Note that everything after the shell command (!) should all be on
This fired up an instance of Distiller and converted the file
c:\temp\mytest.eps which came from Stata into a pdf file. The
following document on Adobe's site may be of some additional
It appears that a "job options file" may be created for Distiller
to allow you to control various settings for the conversion process
such as what font substitutions to use. I did not find it necessary
to do this in my test case above, however.
* For searches and help try: