Skip to content

Releases: narendrachampaneri/htpd

HTPD 0.1.2

Choose a tag to compare

@narendrachampaneri narendrachampaneri released this 23 Oct 09:40

Turn a PDF into one .htpd file that any AI can answer from - with page numbers, figures, and an honest "Not found in this file." Replaces v0.1.1.

Downloads

  • htpd-0.1.2-linux-x64.tar.gz - the converter (Linux x64, Ubuntu 24.04+ or WSL). Unpack, then ./htpd convert manual.pdf --single. Optional: sudo apt install tesseract-ocr to read scanned pages.
  • htpd-skill.zip - the skill for AI apps (Claude and others that support skills).
  • Claude Code: /plugin marketplace add narendrachampaneri/htpd then /plugin install htpd@htpd.

New in 0.1.2

  • Tested on 45 kinds of PDF of known text (Word, LaTeX, Chrome, slides, scans, letters drawn as shapes): 99 % of the text in order, 96 % of the headings.
  • Tables set tight (LaTeX, web pages, slides) now come out as table rows, header row included; two-column tables too.
  • Headings from a table of contents printed in the document (web pages printed to PDF, e.g. Confluence).
  • Scans: headings found by size and bold; bullets kept as list items.
  • A page that cannot be read (no OCR installed) is kept as a picture of the page.
  • Headers and footers removed also in short documents and on the empty pages of books.
  • Hindi and Gujarati: no letters twice, word spaces found.
  • Claude Code plugin and the pip package htpd-reader (no dependencies).
  • The reader: right section first for 78 % of the test questions (was 77 %).

Known limits: Linux only for the ready converter (Windows through WSL); OCR can misread numbers on scans - check them against the page; what a chart means is only in its picture.

Apache-2.0 license.

HTPD v0.1.1

Choose a tag to compare

@narendrachampaneri narendrachampaneri released this 21 Oct 09:36

Turn a PDF into one .htpd file that any AI can answer from - with page numbers, figures, and an honest "Not found in this file." Replaces v0.1.0 (download these files instead).

Downloads

  • htpd-0.1.1-linux-x64.tar.gz - the converter, ready to run (Linux x64, Ubuntu 24.04+ or WSL). Unpack, then:
    ./htpd convert manual.pdf --single
    Optional: sudo apt install tesseract-ocr to also read scanned pages and text inside pictures.
  • htpd-skill.zip - the skill for AI apps (Claude and other apps that support skills). Add it in your app's skill settings, then give the AI your .htpd file.

What it does

  • Sections at the document's own headings; documents without headings get parts of a few pages and a map of the document.
  • Every paragraph with its page; tables as rows (also cells that wrap and tables stored cell by cell); code kept as code; headers and footers removed; sideways pages turned; damaged PDFs survived.
  • Figures (diagrams, charts, photos) stored as pictures inside the file, with caption and page. An AI that can see pictures can look at them (htpd-read figure, the MCP tool figure, the skill).
  • OCR of scanned pages and text inside pictures (free Tesseract, optional). OCR text is marked, and unsure words are left out, not guessed.
  • Raised numbers stay exact: -2³¹ <= X < 2³², not "-231 <= X < 232".
  • Links of the PDF (a register name to its definition, "see section 3.6") are kept after each section.
  • The reader answers only from the file, with [page, section], or says "Not found in this file." with the reason (for example "the file never mentions Bluetooth"). A small trained re-ranker puts the right section first more often: no GPU, no download, a few kilobytes.
  • MCP server for AI agents; skill for AI apps.

Measured on 133 test questions from two public manuals (eval/report.md): the right section comes first for 77 % of them (plain word search: 64 %), it is among the first five for 95 %, and the exact answer is in the text handed to the AI for 86 %. "Not found" is said for 21 of 22 questions the manuals do not answer, and wrongly for only 1 of 111 they do.

Known limits

  • PDF only; Linux only for the converter (Windows through WSL)
  • What a chart or diagram means is only in its picture: an AI must look at it
  • Formulas lose their layout; tables whose first column also wraps can still come apart

Apache-2.0 license.