DO PDF
Not possible

Convert DO to PDF

Can you convert DO to PDF?
QUICK ANSWER
Is it possible to convert DO to PDF?
No - not a direct conversion.

Open the .do file in a text editor such as Notepad++ or Visual Studio Code and use File > Print > Save as PDF. No dedicated converter or online service is needed.

No direct path
Also to PDF: LTX · TEX · DWG

On this page

Tested on macOS, Windows & Linux
Last verified Oct 2026

More free converters

HEIC, PNG, WEBP, MP3 and more - every tool here is free.

Open the toolbox

Why convert DO to PDF?

A Stata do-file is stored as plain text - the same format as .txt - containing only lines of Stata statistical commands. There is no binary structure, no embedded graphics, and no data table; producing a PDF only prints the source code, which any text editor can do directly.

How to convert DO to PDF

Notepad++ FREE

Open the .do file in Notepad++, choose File > Print, and select Microsoft Print to PDF (or your system's PDF printer) as the destination.

Visual Studio Code FREE

Open the .do file in Visual Studio Code, use the print command, and select a PDF printer to save the source code as a PDF.

Our free PDF toolsAll tools →

About these formats

Quality & what to watch

  • The PDF will contain the full script text - the only thing missing is the Stata output, which is produced at run time and not stored in the .do file itself.
  • If you need to share the analysis results (tables, figures, output logs), run the do-file in Stata and export from there rather than converting the script.
  • Renaming the .do file to .txt first will allow most online text-to-PDF converters to accept it if you prefer that route.

Frequently asked questions

Why do PDF converters online not accept `.do` files?
A .do file is plain text and behaves identically to .txt; renaming it to .txt first will allow most online converters to accept it.
Is there any information lost if I print a do-file to PDF?
No - the PDF contains the full script text; the only thing absent is the Stata output, which the .do file does not store.
Can I convert a Stata do-file to R or Python and then to PDF?
There is no automatic translator from Stata syntax to R or Python; that rewrite must be done by hand.