PDX is an experiment in making one document useful to both people and machines.
A person should be able to open a document and see the original PDF. An AI system or text extractor should be able to read a clean Markdown layer from the same file. The author keeps control of both versions instead of relying on a model to reconstruct the document later.
This repository contains the working prototype. The broader idea and the reasoning behind it are in vision.md which I did with claude at 1AM out of curiosity.
The prototype can:
ActualText for compatible text extractors;The output is still a valid PDF. Normal PDF readers show the original visual document, while supported tools can read the embedded Markdown layer.
This is an early prototype, not a published file standard. PDF extraction is heuristic, so complicated layouts and scanned documents will still need manual correction.
pdx/ contains the Python converter, format reader and writer, FastAPI service.
viewer/ contains the Next.js viewer and editor.
The backend requires Python 3.12 and uv.
cd pdx
uv sync
uv run uvicorn api:app --reload --port 8000
Start the viewer in another terminal:
cd viewer
npm install
npm run dev
Open http://localhost:3000 and drop in a PDF. The viewer uses http://localhost:8000 by default. Set NEXT_PUBLIC_API_URL if the API is running elsewhere.
Copyright (c) 2026 Sarthak. No license is currently granted.
The source is public for inspection, but commercial use, redistribution, and derivative work require permission unless a license is added later. A commercial licensing model is still being decided.
11 commits
JavaScript
95.4%
Python
3.2%
TypeScript
1.1%
PDX is an experiment in making one document useful to both people and machines.
A person should be able to open a document and see the original PDF. An AI system or text extractor should be able to read a clean Markdown layer from the same file. The author keeps control of both versions instead of relying on a model to reconstruct the document later.
This repository contains the working prototype. The broader idea and the reasoning behind it are in vision.md which I did with claude at 1AM out of curiosity.
The prototype can:
ActualText for compatible text extractors;The output is still a valid PDF. Normal PDF readers show the original visual document, while supported tools can read the embedded Markdown layer.
This is an early prototype, not a published file standard. PDF extraction is heuristic, so complicated layouts and scanned documents will still need manual correction.
pdx/ contains the Python converter, format reader and writer, FastAPI service.
viewer/ contains the Next.js viewer and editor.
The backend requires Python 3.12 and uv.
cd pdx
uv sync
uv run uvicorn api:app --reload --port 8000
Start the viewer in another terminal:
cd viewer
npm install
npm run dev
Open http://localhost:3000 and drop in a PDF. The viewer uses http://localhost:8000 by default. Set NEXT_PUBLIC_API_URL if the API is running elsewhere.
Copyright (c) 2026 Sarthak. No license is currently granted.
The source is public for inspection, but commercial use, redistribution, and derivative work require permission unless a license is added later. A commercial licensing model is still being decided.
11 commits
JavaScript
95.4%
Python
3.2%
TypeScript
1.1%