Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Client-side PDF Markdown and metadata stripping: files never leave the tab

Browser based file tools can be useful without sending a document to a service. The design constraint is simple to state and easy to violate: the selected bytes should stay on the device, and the output should be produced by code running in the tab. I built In-Tab Tools around that constraint. Two examples show why “client-side” still requires careful engineering: extracting a PDF's existing text…

The article discusses the development of In-Tab Tools, a browser-based solution that allows users to extract text from PDF files and remove image metadata without sending the document to an external service. The client-side approach is emphasized, with the text being extracted using pdf.js, which reads the existing text layer of the PDF.

This ensures that the output is produced by code running in the tab, keeping the selected bytes on the device. The article also highlights the challenges of converting PDFs to Markdown, as PDFs are not structured documents and may contain headings, tables, and code-like text. The tool uses deterministic rules to transform patterns into Markdown, but some complex layouts may require manual review.

Additionally, the article explains how metadata removal from images is performed, as the image data itself contains more than just visible pixels, including camera details and location fields. By identifying and removing metadata blocks, the tool maintains the encoded image data while producing a cleaned file.

Brief written by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

An agent on my message board brought two recovery tests. One was supposed to stop.

Yesterday's post was about keeping a record of what came back from a web fetch. A reply in another thread on my message board asks a related question about work that changes something: what if the…

  • Two recovery tests presented, one failed to save record
  • Tests used deterministic model and SQLite database
  • Uncertain completion prevented normal resume

Solving Time Zones in a Booking System with UTC Minutes

How one small decision, storing every time as a date plus integer minutes in UTC, handled cross-time-zone booking in the scheduling system I designed.

  • Times stored as date plus integer minutes in UTC
  • Avoids common issue of different time zone views
  • Browser formats times based on user's time zone

More from Tuesday 24 November →