An all-to-all document converter for PDF, HTML and Markdown on Linux. Written in Python. Comes with both a command-line tool and a simple GUI. Install it once and just type
allconvfrom anywhere.
- What it does
- Requirements
- Quick start (no install)
- Install into your Linux system (type
allconvanywhere) - Command-line usage
- GUI usage
- Use it as a Python library
- How it works
- Project layout
- Troubleshooting
- Uninstall
- License
AllConv converts between the three formats in every direction:
| From ↓ / To → | HTML | Markdown | |
|---|---|---|---|
| — | ✅ | ✅ | |
| HTML | ✅ | — | ✅ |
| Markdown | ✅ | ✅ | — |
That's all 6 conversions:
pdf→md, pdf→html, html→md, html→pdf, md→html, md→pdf.
Formats are detected automatically from file extensions, so most of the time you just give it an input and an output file.
- Python 3.9+ (developed and tested on 3.13)
- pip (
python3 -m pip) - For the GUI only: Tkinter
Distro Install command Debian / Ubuntu / Mint sudo apt install python3-tkFedora / RHEL / CentOS sudo dnf install python3-tkinterArch / Manjaro sudo pacman -S tkopenSUSE sudo zypper install python3-tk
Everything else is installed automatically from requirements.txt.
Use it straight from the unzipped folder without installing anything system-wide:
unzip allconv.zip
cd allconv
python3 -m pip install -r requirements.txt
# run the CLI
python3 -m allconv.cli report.pdf report.md
# run the GUI
python3 -m allconv.guiThere are also convenience scripts:
./run_cli.sh report.pdf report.md
./run_gui.shYes — you can install it so that typing allconv works from any folder.
There are two ways.
From inside the unzipped allconv folder:
chmod +x install.sh
./install.shThis will:
- install the Python dependencies,
- copy the app to
~/.local/share/allconv, - create the
allconvcommand (andallconv-gui) in~/.local/bin, - add “AllConv” to your application menu (so you can launch the GUI by clicking).
Works on every Linux distribution — not just Debian/Ubuntu. The installer only
uses python3 + pip and the standard ~/.local directories that every distro
has. The one distro-specific piece (installing Tkinter for the GUI) is
auto-detected for apt, dnf, yum, pacman, zypper, apk, xbps, eopkg, emerge and
nix, and the installer prints the exact command for your system. To let it install
Tkinter automatically (via sudo), run:
./install.sh --with-tkThen you can run it from anywhere:
allconv report.pdf report.md
allconv --guiPATH note: the command lives in
~/.local/bin. On most distros this is already on yourPATH. If typingallconvsays command not found, add this line to~/.bashrc(or~/.zshrc) and reopen the terminal:export PATH="$HOME/.local/bin:$PATH"The installer tells you if this step is needed.
This uses the packaging in pyproject.toml and also gives you the allconv
command:
cd allconv
python3 -m pip install --user .
# optional extras:
python3 -m pip install --user ".[pdf]" # WeasyPrint = nicest PDF output
python3 -m pip install --user ".[extract]" # markitdown = better PDF -> MarkdownNow allconv is available system-wide (again via ~/.local/bin).
Tip — fully isolated install with pipx:
pipx install .
pipxkeeps AllConv and its dependencies in their own environment while still putting theallconvcommand on your PATH. Install pipx withpython3 -m pip install --user pipxif you don't have it.
# formats auto-detected from extensions
allconv report.pdf report.md # PDF -> Markdown
allconv report.pdf report.html # PDF -> HTML
allconv page.html page.md # HTML -> Markdown
allconv page.html page.pdf # HTML -> PDF
allconv notes.md notes.html # Markdown -> HTML
allconv notes.md notes.pdf # Markdown -> PDF
# force formats explicitly (useful for odd extensions)
allconv data.txt out.pdf --from md --to pdf
# helpful commands
allconv --list # show every supported conversion
allconv --help # full help
allconv --version # print version
allconv --gui # open the graphical interfaceExit codes: 0 success · 2 input missing · 3 conversion error · 4 unexpected error.
(Useful when calling AllConv from your own shell scripts.)
# convert every Markdown file in the current folder to PDF
for f in *.md; do allconv "$f" "${f%.md}.pdf"; doneLaunch it in any of these ways:
allconv --gui # if installed
allconv-gui # if installed (Option A)
python3 -m allconv.gui # from the source folder
./run_gui.sh # from the source folderor click AllConv in your application menu (after running install.sh).
Then:
- Click Browse… and pick a PDF / HTML / Markdown file.
- Choose the target format (PDF / HTML / Markdown).
- Click Convert and choose where to save.
The source format is detected automatically. A progress bar shows while it works, and it tells you where the file was saved.
from allconv import convert_file, convert
# file-to-file (formats inferred from extensions)
convert_file("report.pdf", "report.md")
# in-memory conversions
html = convert("# Hello\n\nWorld", "md", "html") # returns a str
pdf_bytes = convert(html, "html", "pdf") # returns bytes
with open("out.pdf", "wb") as f:
f.write(pdf_bytes)Public API: convert, convert_file, detect_format, SUPPORTED_FORMATS,
CONVERSIONS, ConversionError.
| Conversion | Engine used |
|---|---|
| HTML → Markdown | markdownify (falls back to BeautifulSoup text) |
| Markdown → HTML | markdown (falls back to a built-in mini-parser) |
| PDF → HTML | PyMuPDF positioned HTML |
| PDF → Markdown | markitdown if present, else PyMuPDF heading heuristics |
| HTML → PDF | WeasyPrint → headless Chromium → ReportLab (text) |
| Markdown → PDF | Markdown → HTML → PDF (same engine chain as above) |
PDF output is automatic: AllConv picks the best engine available on your system, so you don't have to configure anything. Install WeasyPrint for the nicest results; otherwise it uses Chromium/Chrome if present, and finally a plain-text PDF fallback that always works.
allconv/
├── allconv/
│ ├── __init__.py # public API
│ ├── converters.py # core engine (all 6 conversions + fallbacks)
│ ├── cli.py # command-line interface
│ └── gui.py # Tkinter GUI
├── install.sh # system-wide installer (creates the `allconv` command)
├── uninstall.sh # remove the installed command
├── requirements.txt # Python dependencies
├── pyproject.toml # installable package + `allconv` entry point
├── run_cli.sh # run CLI without installing
├── run_gui.sh # run GUI without installing
├── tests/sample.md # example file to try
└── README.md # this file
allconv: command not found
Your ~/.local/bin isn't on PATH. Add this to ~/.bashrc and reopen the terminal:
export PATH="$HOME/.local/bin:$PATH"GUI won't start / No module named tkinter
Install Tkinter for your distro (see Requirements).
PDF output looks plain / unstyled You're on the text fallback. Install a real engine:
python3 -m pip install --user weasyprintor make sure chromium / google-chrome is installed and on your PATH.
PDF → Markdown gives empty or garbled text
The PDF is probably a scanned image. Extracting text from scans needs OCR
(e.g. tesseract), which is not built in.
Dependencies didn't install (no internet during install.sh)
Run it again with internet, or manually:
python3 -m pip install --user -r requirements.txt./uninstall.shThis removes the allconv / allconv-gui commands, the menu entry, and the
installed app files. (If you installed via pip: python3 -m pip uninstall allconv.)
MIT — free to use, modify and share.