πŸ–ŒοΈ

Enhance PDF

Compress images, remove duplicate fonts, and strip metadata to reduce PDF file size.

Enhance PDF

Add watermarks, headers/footers with page numbering, Bates stamps, and crop margins β€” drag to reposition, resize handles to scale β€” all client-side.

Drop a PDF file here

or click to browse

How to use the Enhance PDF tool

A 40-page legal brief needs a "CONFIDENTIAL" watermark on every page, page numbers in the footer, and 72pt margins trimmed before filing. Drop the PDF into the tool, click the Watermark tab, type CONFIDENTIAL, set the rotation to -45 degrees and opacity to 30%, and click Place on Page. Switch to Header and Footer, enter the document title in the header-left field, type {{page}} in the footer-center, and click Place on Page. Switch to Crop, enter 72 for all four edges, and click Save PDF. The enhanced document downloads in about 5 seconds for a 40-page file.

Every placed element is draggable and resizable. The Undo and Redo buttons step through your edit history, so experimentation is safe. Bates numbering follows the same workflow β€” enter a prefix like CASE-, set the starting number and digit count, and click Place on Page to stamp every page with a sequential identifier like CASE-000001.

Real-World Applications & Use Cases

Legal Document Preparation

Law firms routinely stamp "CONFIDENTIAL" or "PRIVILEGED" watermarks on case files before sharing them with opposing counsel. Bates numbering β€” sequential identifiers like CASE-000001 β€” is mandatory for e-discovery production under Federal Rules of Civil Procedure. This tool applies both in a single session without uploading sensitive case material to third-party services.

Academic and Report Formatting

University submissions, technical reports, and white papers often require consistent headers with document titles, author names, and automatic page numbering. The header and footer panels support dynamic placeholders β€” {{page}}, {{total}}, and {{date}} β€” so each page gets contextually correct numbering without manual editing.

Print-Ready PDF Trimming

Before sending a PDF to a commercial printer or inserting it into a bound document, excess white margins often need trimming. The Crop PDF tab lets you specify exact point margins for each edge β€” left, right, top, bottom β€” and apply them selectively to all pages, only even pages, only odd pages, or the current page. Preset buttons for Letter and A4 standard margins accelerate the workflow.

Related tools

How the Enhance PDF tool works

PDF rendering via PDF.js

When a user drops or selects a PDF file, the raw bytes are read into an ArrayBuffer and passed to PDF.js (pdfjsLib.getDocument). PDF.js parses the PDF object tree, resolves font dictionaries, image XObjects, and content streams, then rasterizes the selected page to an HTML5 canvas at a calculated scale factor. The scale is derived from the container width divided by the unscaled viewport width, capped at 2x to prevent pixel overflow on high-DPI displays. The canvas dimensions and the SVG overlay's viewBox are synchronised to match the viewport size, ensuring pixel-accurate element placement.

Interactive SVG overlay

Placed elements β€” watermarks, headers, footers, and Bates stamps β€” are not drawn onto the canvas directly. Instead, each element is rendered as SVG primitives (<text>, <image>, <rect>) on an absolutely-positioned SVG layer that overlays the canvas. This separation preserves the original PDF rendering while enabling interactive drag-and-resize. The SVG uses a coordinate system that maps PDF points to viewport pixels via the formula vpX = pdfX * (vpW / pdfPageW), with the Y-axis inverted because PDF coordinates originate at the bottom-left while SVG coordinates originate at the top-left.

Baking elements into PDF via pdf-lib

On "Save PDF", the tool loads the original PDF bytes into pdf-lib (PDFDocument.load), embeds a Helvetica font (StandardFonts.Helvetica), and iterates over every page's element array. For each element, pdf-lib's page.drawText or page.drawImage is called with the element's coordinates, size, colour (converted from hex to RGB via parseColor), opacity, and rotation. Text placeholders like {{page}} and {{total}} are resolved at bake time using replacePlaceholders, so each page receives its correct page number. The modified document is serialised via libDoc.save() and downloaded as a new PDF blob.

Crop margin calculation

The crop feature modifies each page's MediaBox and CropBox β€” the PDF standard's rectangle descriptors that define visible and printable areas. When the user specifies left, right, top, and bottom margins in points (1 pt = 1/72 inch), the tool calculates the new origin and dimensions: newX = szX + cropL, newY = szY + cropB, newW = width - cropL - cropR, newH = height - cropT - cropB. The crop can be applied to all pages, only even/odd pages, or the current page, and the dim-overlay preview updates in real time as values change.

All processing happens client-side using WebAssembly compiled versions of PDF.js and pdf-lib. No data is uploaded to any server. The complete pipeline runs in the browser with zero external API calls after the initial CDN library load.

Frequently Asked Questions

Is my PDF data uploaded to any server?

No. The entire enhancement pipeline runs locally in your browser. PDF.js renders pages to a canvas element, and pdf-lib modifies the PDF bytes in memory using WebAssembly. Your file never leaves your device, which makes this tool safe for confidential legal documents, medical records, and proprietary business materials.

Can I reposition and resize placed elements?

Yes. Every placed element β€” watermarks, headers, footers, and Bates stamps β€” is rendered on an interactive SVG overlay. Drag the element body to reposition it, or drag the blue corner handle to scale it. Double-clicking an element removes it from the page.

What is Bates numbering and when is it required?

Bates numbering is a sequential identification system used in legal and medical document management. Each page receives a unique identifier β€” typically a prefix, sequential number with zero-padding, and optional suffix β€” to ensure every page in a production set can be individually referenced during litigation, audits, or regulatory compliance reviews.

Can I undo changes after placing elements?

Yes. The tool maintains a per-page undo/redo history stack. Use the Undo and Redo buttons or the keyboard shortcuts Ctrl+Z and Ctrl+Y (Cmd+Z / Cmd+Y on macOS) to step through previous states. Each placement, drag, resize, and clear action creates a new history entry.

How does the crop feature affect the final PDF?

The crop tool modifies each page's MediaBox and CropBox β€” the standard PDF rectangles that define the visible and printable area. Specified margins in points (1 point = 1/72 inch) are subtracted from each edge. You can apply crops to all pages, only even or odd pages, or just the current page. The dim-overlay preview updates in real time so you can see the result before saving.

What image formats are supported for image watermarks?

The tool accepts PNG and JPEG images for watermark overlays. Images are embedded into the PDF via pdf-lib's embedPng or embedJpg methods during the save step. The image watermark is automatically scaled to fit within 40% of the page dimensions and centred by default, though you can drag it to any position after placement.

Disclaimer: This tool is for educational and document-preparation purposes only. It does not constitute legal advice. Bates numbering, watermarking, and cropping features are provided as convenience utilities β€” verify that output documents meet the specific formatting requirements of your jurisdiction, court, or regulatory body before submission.
enhancepdfwatermarkheaderfooterbatesnumberingcropmarginoverlaytextimage

More Tools You Might Like

✏️Edit PDF
πŸ“„Merge PDF
βœ‚οΈSplit PDF
πŸ—‚οΈOrganize PDF
πŸ—‘οΈDelete Pages
πŸ”„Rotate PDF