Now let’s set up a local server and a headless-browser test that exercises the actual artifact file end-to-end (file load, drag-to-select, cut, and byte-level verification):But the PDF was already written before the crash — let’s check it directly:Ah, got it — much simpler and more useful than what I built before. Here’s that tool: PDF Snippet Cutter.

How it works: open it in a browser, choose a PDF, and it renders the current page on a canvas. Click and drag down the page to mark a band — a goldenrod highlight follows your cursor live. Once you release, the band stays with two handles you can grab (or arrow-key nudge, with Shift for bigger steps) to fine-tune the top/bottom edges, with the exact point coordinates shown in the side panel. Hit “Cut selection” and it produces a real cropped PDF — same mechanism as before (windowing the page’s box down to your rectangle via pdf-lib, no rasterizing, no re-typesetting), shows you a thumbnail, and gives you a Download button. You can keep cutting from the same page or flip to the next one (there’s a page nav) without re-uploading, so one sitting can produce a whole stack of tiny snippet PDFs.

I didn’t just eyeball this one — I ran it in an actual headless browser, simulating a real file upload and a real mouse drag against a synthetic test PDF, and confirmed the reported boundaries landed exactly on the paragraph I dragged over (131.2–180.2pt, matching ground truth to the decimal), that the keyboard nudge shifted the number correctly, and that the downloaded file was a genuine cropped PDF with the right paragraph and its highlight intact.

A couple of things worth knowing:

  • It needs an internet connection to load two small libraries (`pdf.js` for rendering, `pdf-lib` for the crop) from a CDN — it’s not fully offline like your box-marker tool.
  • Right now it only crops top/bottom (full page width), matching what you described. If you ever hit a two-column paper where a highlight sits in one column only, let me know and I’ll add left/right handles too.
  • It assumes pages aren’t rotated (the vast majority of academic PDFs aren’t) — it’ll warn you if it detects rotation on a given page.

Want to try it on a real annotated PDF and see how the drag precision feels in practice?

Source: Claude Sonnet ○˒

(echo:: @ )