How to transform a Dofile to PDF

46 views Asked by At

I have a dofile and I want to convert to a PDF. My idea is that even people that do not have access to Stata can see the codes that I wrote.

I tried this

translate TEST_FE (1).do pdffile, translator(txt2pdf)

and found this: varlist not allowed

db markdoc is also not working

1

There are 1 answers

0
TheIceBear On BEST ANSWER

Try this translate "TEST_FE (1).do" "pdffile.pdf", translator(txt2pdf)

Your do-file has a space in the name. Then it needs to be in " " quotes as there otherwise is no way for Stata to know where the file name ends.

In general, try to avoid spaces in technical file names such as scripts and data files. As well as special characters part from _ and -. That will make it less likely for you to run in to odd errors.