Announcement

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

  • Stata14 export results to PDF

    Dear community,

    I am new to STATA and to this forum as well. I am in the process of familiarising myself with STATA (14) but now face a problem that seems very trivial but I cannot find the solution for the life of me. I simply would like to export all the output that appears in my results window as a PDF document. There seems to be no button to click on in order to do this. The translate command does not help me. I read the help translate file but cant find out what I am doing wrong or what I should type as command.

    Can please somebody advise? It seems like something that should not be that hard to do.

    Any help would be really appreciated!

  • #2
    Timbo:
    welcome to the Stata (not STATA please, as per FAQ) forum.
    You can simply copy and paste your Stata session on a Do-file and then print all the stuff via the Print command available scrolling down the File menu in the Do-file editor.
    If you have a .pdf Printing option installed on your desk/laptop the job is done.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      As does Carlo, I typically created PDFs using the macOS Print dialog box to save the "prinout" as a PDF rather than send it to the printer. I cannot speak for Windows or Linux.

      But since today seems to be my day for answering questions about the translate command, here is an example. The tools you need are described in
      Code:
      help log
      help translate
      I run this code from the Do-file editor windows.
      Code:
      log using "~/Downloads/pretend.smcl", replace
      sysuse auto, clear
      summarize weight length
      log close
      translate "~/Downloads/pretend.smcl" "~/Downloads/pretend.pdf", replace
      This is what I see in the Results window.
      Code:
      . log using "~/Downloads/pretend.smcl", replace
      ------------------------------------------------------------------------------------------------
            name:  <unnamed>
             log:  /Users/lisowskiw/Downloads/pretend.smcl
        log type:  smcl
       opened on:   3 Jun 2020, 12:18:41
      
      . sysuse auto, clear
      (1978 Automobile Data)
      
      . summarize weight length
      
          Variable |        Obs        Mean    Std. Dev.       Min        Max
      -------------+---------------------------------------------------------
            weight |         74    3019.459    777.1936       1760       4840
            length |         74    187.9324    22.26634        142        233
      
      . log close
            name:  <unnamed>
             log:  /Users/lisowskiw/Downloads/pretend.smcl
        log type:  smcl
       closed on:   3 Jun 2020, 12:18:41
      ------------------------------------------------------------------------------------------------
      
      . translate "~/Downloads/pretend.smcl" "~/Downloads/pretend.pdf", replace
      
      .
      end of do-file
      
      .
      This is a screenshot of the top of the PDF (screenshot so you don't have to open a link to see it).
      Click image for larger version

Name:	pretend.png
Views:	1
Size:	189.7 KB
ID:	1556722

      Comment


      • #4
        Thank you guys!

        Comment

        Working...
        X