Fix PDF Hairlines
Thicken hairlines that drop out in print
Files are processed only in this browser. Nothing is uploaded to a server.
Thicken hairlines that drop out in CTP output and printing to a set width
This PDF is password-protected.
Continue in another tool
Processing…
Everything runs inside this browser. Your file is never sent to a server.
Your file is ready to download
Continue with this result
Open page preview
Changing a setting hides the previous result. Run it again to save the latest settings.
Remove the password from an encrypted PDF first. Processing focuses on page content, so bookmarks, attachments, forms and signatures may not be preserved. Keep the original and check the result.
Working…
0.0
It hasn't frozen — the result will appear when the calculation finishes.
About Fix PDF Hairlines
In a PDF, line thickness is set by a single w operator placed before the drawing. The spec allows 0, which means “the thinnest line the output device can draw” — one device pixel. On screen that always shows as one pixel and looks fine, but on a 2400 dpi platesetter one pixel is about 0.01 mm, so the line all but vanishes in print. Table borders from word processors and CAD drawings are common sources.
This tool looks only at w values in the content streams of pages and the Form XObjects inside them. Anything below the threshold (0.25 pt by default) is rewritten to the minimum width (0.5 pt by default). Coordinates, dash patterns, text and images are left byte for byte.
When the w number isn't the real width
The w value is in the current coordinate units. If a drawing was placed at 20% with the cm operator, w 1 is really 0.2 pt. The tool follows the transformation (CTM) built up by cm and Form XObject matrices, through q/Q, and judges each line by its real width at the moment it is stroked (w × scale). Such a line is therefore caught and rewritten as w 2.5 (0.5 pt real), while w 0.2 inside a group scaled up three times is really 0.6 pt and is left alone. The new width is written in that coordinate system too, so the result is the minimum width at real size.
You can re-check the result in the preflight tab of PDF Info, which follows the transformations the same way and counts lines that are thin at their real size. For reference: 0.25 pt ≈ 0.088 mm and 0.5 pt ≈ 0.176 mm.
Where else the width comes from
Besides the w operator, line width can be set through the LW entry of a graphics state dictionary (ExtGState) applied with gs, and without any w the spec default of 1 pt applies (which also turns into a hairline when placed at reduced scale). The tool follows these widths too. When there is no w operator to rewrite, or the same w also serves lines that are thick enough, it wraps just the thin line in q … Q and raises the width inside. Paths that are a clip and a stroke at once (W S) and outlined text (render modes 1 and 2) are left alone.
Worked examples
A table from a word processor
- Input
Table border w 0, cell dividers w 0.1, outer frame w 0.75- Output
0 → 0.5 pt, 0.1 → 0.5 pt, 0.75 unchanged
Only the two values below 0.25 pt change. The hierarchy of thin inner lines versus a heavier frame narrows to 0.5 against 0.75; to keep more contrast, run it again with a minimum around 0.3 pt.
A CAD drawing placed at reduced scale
- Input
A drawing made with w 1, placed on A4 with cm 0.2- Output
w 1 → 2.5 (0.2 pt → 0.5 pt real), 1 fix
The tool works out 1 × 0.2 = 0.2 pt, flags it as a hairline and rewrites w as 2.5 so it prints at 0.5 pt in that coordinate system. When every line of the drawing uses the same single w, only that one operator changes, so the summary reports 1.
How to use it
- Add the PDF and set the threshold and the minimum width to write.
- Run it and check how many streams and operators changed.
- Re-check the result in the preflight tab.
Frequently asked questions
Do dashed lines get thicker too?
Their width changes, but the dash spacing in the d operator does not. A tightly spaced dash can look solid once it's thicker.
Are lines in annotations or form fields fixed?
No. Only page and Form XObject content streams are handled; annotation appearance streams and lines inside patterns or Type3 fonts are not.
Can I use it on a signed document?
Rewriting content streams invalidates the signature. Sign again after fixing.
Sources
Last reviewed: