Urgent.News

What's breaking now, across thousands of outlets.

Tech

Getting the text out of five screenshots inside one PDF

The document is a three-page weekly ops report with five screenshots pasted in: a growth dashboard, a chat channel, a spreadsheet, an alert and a kanban board. I built it myself as a test file with invented content, because it's such a common shape of document: someone screenshots five tools and drops them into a report, and later someone else needs the words. Select-all and copy doesn't get you…

A three-page weekly operations report contained five screenshots - a growth dashboard, chat channel, spreadsheet, alert, and kanban board. The document was manually created for demonstration purposes, as combining screenshots of five tools into a report is a common format. Selecting and copying text from the screenshots did not yield the desired result, as the PDF treats the screenshots as images without text.

To extract the text, the entire PDF was uploaded to ImgIn's Extract PDF content tool. The OCR (Optical Character Recognition) feature recognized all five screenshots in a single run, placing each as a separate block labeled "Image OCR" immediately after its corresponding screenshot and before its caption. The order of the blocks matched the page order of the original document.

The extracted text for each screenshot was accurate and well-formatted. The growth dashboard's data appeared correctly in tabular form, with labels, values, and deltas preserved. The chat messages were correctly attributed to the right speakers, except for two instances where the names of the speakers were incorrectly associated with the wrong messages.

The spreadsheet data was perfectly extracted and tab-separated, making it easy to paste directly into a spreadsheet application. The alert's text was also accurately extracted, with the exception of a formatting issue where the title lost spaces around its dot.

Two screenshots had less satisfactory results. A bar chart under the dashboard tiles had seven values that were correctly extracted but incorrectly grouped into two rows due to the OCR process. Similarly, a kanban board had three column names and three of the four cards correctly extracted. However, the fourth card, OPS-416, was incorrectly extracted as just its ID, with its title missing from the output.

Additionally, the small headers and footers that appeared on each page of the original report were not included in the extracted text.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Who gets rated higher: age, age gap and the reciprocity myth - from 24 million ratings

In the previous piece I went through 24 million ratings from our app Rate Me (people rate each other's photos 1-10) and showed four things: the dip at nine, men underrating men, countries rating…

  • Men rate women more generously when they are older
  • Women rate men more critically when they are older
  • No reciprocity effect between ratings given and received

5 Errors I Hit Building DeFi Bots (And How to Fix Them)

Building production bots on free APIs sounds cool in theory. In practice, you hit walls immediately. Here are the 5 real errors I encountered while building two Ethereum monitoring bots, and exactly…

  • WebSockets timeout issue resolved by switching to polling every 15 minutes
  • CoinGecko rate limit avoided by reducing polling frequency or tokens tracked
  • Supabase Row-Level Security issue fixed by disabling RLS or creating policy

I treated publishing as a queue. The queue lied.

On September 11, the publishing ledger said 29 articles while the public profile showed 30 . I had one stale editor buffer, one repaired series assignment, and no trustworthy answer to a simple…

  • Reporter treated publishing system as a queue, but it was a small distributed system.
  • Multiple histories existed in the queue: editorial rotation, public list, and browser session.
  • Mistake assumed counts represented the same thing, leading to duplicate publications.

Page count is the wrong unit for estimating a PDF-to-text job

"How many pages?" is the first question anyone asks about turning a pile of PDFs into text, and it's the number that ends up in the estimate.

  • Page count is poor predictor of edits needed in PDF-to-text conversion
  • Spot types include fixes, manual review, and rerun through OCR
  • Script fixes 85% of issues, human needed for remaining spots

More from Saturday 12 September →