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

st: Printing graphs to pdf under program control


From   Ian Watson <[email protected]>
To   statalist <[email protected]>
Subject   st: Printing graphs to pdf under program control
Date   Wed, 13 Oct 2004 11:56:44 +1000

Dear statalist,

  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. At present the commands:

  graph use mygraphfile
  graph print, logo(off) lm(0) tm(0)

  work successfully, and provided I have set Acrobat Distiller as my
  default printer, the dialogue box for Acrobat Distiller comes up and
  I can type the filename for the PDF file in. However, I want to
  automate this by passing the filename to Distiller.

  I have tried the unix approach:

  printer define prn ps "mypdf_filename"

  but this doesn't work under Windows ("unrecognised command: printer").

  I notice that there seems to be a default value in the Distiller
  dialogue box ("stata graph.pdf") but I am unsure if this is Distiller
  behaviour, or something that Stata has sent to Distiller. If the
  latter, then presumably there is a hook somewhere for sending one's
  own choice of filename.

  Finally, not all of the print graphic controls from the dialogue box
  (Graphic Preferences - Printer) appear to be available in syntax, or
  have I overlooked something? In particular, I notice missing are the
  color mapping options, and the scaling options.

  Any advice on these matters would be greatly appreciated.


-- 
Kind regards,
 Ian                          

=================================
Ian Watson
Senior Researcher
acirrt
University of Sydney
NSW 2006
Australia

Phone: 02 9351 5622
  Fax: 02 9351 5615

Email: [email protected]
  Web: www.acirrt.com
================================

*
*   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