Highlight Text on a PDF Page by Dragging Over It
Renders the page you choose, lets you drag rectangles over the parts that matter, and burns them in as translucent coloured blocks with pdf-lib. Any colour you like, at 40 percent opacity so the words stay readable.
About the PDF Highlight Tool
Choose a page number and the tool renders it into the preview at up to 1.6 times scale, sized to fit the width available. Drag across anything on that page and a yellow box follows your pointer; release, and the highlight is added to the list. Draw as many as you need — clauses, figures, a whole paragraph — and they all stack up before anything is committed. Tiny accidental drags are discarded, so a stray click does not leave a speck on the document.
The colour swatch defaults to a soft yellow, and you can change it to anything. Whatever you pick is applied at 40 percent opacity over the existing content, which is what keeps text legible underneath rather than blotting it out.
Key Features
- Drag directly on the rendered page: You are marking up a picture of the real page at real proportions, not guessing at coordinates in a form.
- Unlimited marks per pass: Every rectangle you draw is collected, and they are all applied together when you save.
- Any highlight colour: The colour input takes any value, so you can use pink for one pass and green for another and tell them apart afterwards.
- Accidental drags ignored: A rectangle smaller than a few points in either direction is discarded rather than added, which keeps stray clicks out of the finished file.
- Vector output, not a re-render: Highlights are drawn as rectangles into the existing page with pdf-lib, so the document keeps its text layer, stays searchable, and does not grow into a stack of images.
- Confidential markup stays put: The page preview comes from pdf.js and the output from pdf-lib, both served from this site, so annotating a sensitive document involves no transfer of it.
How to Use the PDF Highlight Tool
- Add the PDF and wait for the first page to render into the preview.
- Set the page number to the page you want to mark up.
- Pick a highlight colour, or leave the default yellow.
- Drag across each area you want highlighted — repeat as many times as needed.
- Press Apply Highlights and download the file, saved with -highlighted on the end.
How It Works
Each rectangle you draw is recorded in page coordinates rather than screen pixels, so the marks land accurately regardless of how large the preview was rendered on your screen. On saving, pdf-lib draws each one onto the page as a filled rectangle in your chosen colour at 40 percent opacity, flipping the vertical coordinate because PDF measures from the bottom of the page while the canvas measures from the top.
Two consequences are worth understanding. First, these are not annotation objects: a real PDF highlight annotation can be clicked, edited or deleted by whoever opens the file, whereas these are painted into the page content permanently. That is an advantage if you are sending a marked-up copy and want the marks to stay, and a disadvantage if you expected to be able to remove them later. Keep your unmarked original.
Second, choose light colours. The fill is drawn over the text with alpha blending rather than the multiply blending a real highlighter pen uses, so a pale yellow leaves the words perfectly readable while a saturated dark colour will muddy them.
When You Need It
A union representative preparing for a disciplinary hearing works through a bundle of company evidence and needs to mark the three passages that contradict each other before circulating the copy to the member. The bundle contains the member's employment record and named colleagues, so it is not a document to push through a free annotation site, and a marked-up copy that arrives with the marks intact saves an hour of explaining in the meeting.
Someone objecting to a planning application downloads the developer's design statement and wants to flag the paragraphs where the submitted figures disagree with the site plan, ready to attach to a written objection. Marking the pages locally means the annotated version exists only where they put it, and the highlights stay burned in when the council or a neighbour opens it.