A SCRIPT HAS MORE THAN ONE READER
Put the implementation on the page.
Code belongs in a source file. Sometimes a conversation, a handover or a set of notes also needs a document. PY to PDF makes that reading copy.
Built around a familiar task
Start with the Python file you already have. Select it, let the converter lay it out, then save the PDF. The result includes syntax colors, readable indentation and optional line references. You can adjust the page size and open a preview before downloading.
A colleague reviewing a utility, someone revisiting an old project, or a learner sharing an exercise can all use the same workflow. No account, installation or payment is required.
The source is the document
PY to PDF reads .py, .pyw, .pyi and plain-text .txt files. It includes the supplied imports, definitions, docstrings and comments without fetching the rest of the project. It never runs the script, installs its dependencies or captures its output.
Keep the original source for editing and execution. A PDF is convenient for reading, searching, annotation and printing, but copied text can differ because of line wrapping and displayed line numbers.
Your browser does the conversion
The selected text and the PDF stay in page memory. Fonts and conversion assets are served with the website. Optional formatting runs locally too, and you can undo it if you need the original layout.
The file handling page explains temporary data and network requests. For practical steps, follow the Python conversion guide.