Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • putpdf not capturing output of commands

    I used the following code copied from the helpfile to try to create a pdf file. The file (example.pdf) shows up. However it is missing the output of the commands. It has "Report on 1978 automobiles" as content and that's all. e.g. the summarize mpg output is missing. Where am I going wrong?

    Thanks in advance.


    use https://www.stata-press.com/data/r17/auto, replace

    putpdf begin

    putpdf paragraph, font("Courier",20) halign(center)
    putpdf text ("Report on 1978 automobiles")

    summarize mpg

    return list
    putpdf save "/Users/mputt/Box/chibe/sri/example.pdf"

  • #2
    The command does not capture what you type and any output that appears in the Results window. If you want to capture the output of summarize, for example, see

    Code:
    help putpdf table
    and for text

    Code:
    help putpdf paragraph
    On the other hand, if you want a log file of what appears on the Results Window, see

    Code:
    help log

    Comment

    Working...
    X