SShortSingh.
Back to feed

PDF and DOCX to Markdown and tables, without an LLM

0
·14 views

Language models can read documents, but they give a different answer on a different day and charge by the token. For invoices, reports and contracts that you process in volume, a deterministic parser is often the better tool: the same file gives the same output, and the price does not depend on how long the answer is. DocToJSON reads PDF and DOCX files from a public URL and returns three things. Headings and lists become Markdown. Text keeps the order it has on the page.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Python Script Converts RSS and Atom Feeds into JSON and CSV

A DEV Community tutorial explains how to turn RSS and Atom feeds into structured data using Python. The formats vary in how they structure dates and descriptions, and descriptions are often wrapped in HTML, which complicates processing. The author provides a short script built on the standard library plus requests that discovers a site's feed, normalizes its items, and exports them to CSV. Feed discovery works by reading alternate link tags on a page or checking common feed paths, and a known feed URL can be fetched directly instead.

0
ProgrammingDEV Community ·

Canvas text draws in fallback font before custom web font loads

A developer found that the first fillText call on a canvas draws with the fallback system font even when a custom web font is declared with @font-face. Tests across Chromium, Chrome, Firefox and WebKit showed no errors, and the font request is only sent when the draw happens, so the text ignores the font still in transit. Redraws after 50 ms or more used the correct font, with the delay depending on network timing. A control test confirmed the font was not requested before the first draw, meaning canvas does not wait for it. The reported fix is to await document.fonts.load() with the font string and text before drawing, which worked in all four browsers.

0
ProgrammingDEV Community ·

Git rerere Can Reuse Your Merge Conflict Fix So You Resolve It Once

Developers running multiple AI coding agents on separate branches often hit the same merge conflict repeatedly when combining their work. The article demonstrates how Git's rerere feature, short for reuse recorded resolution, solves this by remembering how a conflict was resolved. Once enabled, Git automatically reapplies a saved resolution whenever the identical conflict reappears during later merges or rebases. The walkthrough sets up a demo repository with two worktrees simulating agents editing the same login function. It then shows how to enable rerere, inspect what will be recorded with status and diff, and commit the resolution once for reuse.

0
ProgrammingDEV Community ·

Discovery Phase AI vs ChatGPT: Which Fits Your Requirements Work

A comparison piece argues that general chat assistants like ChatGPT are useful for drafting discovery material such as problem statements, requirement lists and meeting summaries. The author notes that these tools struggle to keep a multi-stage discovery consistent across weeks of work and multiple people. The article lists strengths of chat assistants, including fast first drafts, rewording, brainstorming edge cases and flexible output formats. It identifies limits such as the lack of built-in structure, answers that do not connect across conversations, and manual copy-and-paste editing with no change history. The piece is written by the team behind the product it compares, a point the article itself discloses.

PDF and DOCX to Markdown and tables, without an LLM · ShortSingh