Problem → SolutionApril 2, 20265 min read

Text Is Overlapping in PDF After Converting From Another Format

Overlapping text in a converted PDF is a line spacing or coordinate calculation error in the converter. Here's how to identify the cause and produce clean output.

Text objects that overlap each other in a converted PDF — lines printing on top of previous lines, characters colliding — are a coordinate calculation error. The converter placed text at the wrong Y coordinates, or it miscalculated line height, leading (the space between text lines), or font metrics. This is always a converter bug or misconfiguration, not the source document's fault.

Most Common Cause: Line Height Miscalculation

PDF positions text at absolute coordinates. If the converter calculates line height incorrectly — using the wrong font metric or a different units assumption (points vs pixels) — lines are placed too close together or on top of each other. This is most common when: converting HTML to PDF (CSS line-height is not always interpreted correctly by HTML-to-PDF tools), converting rich text formats with non-standard fonts, or using a PDF library with incorrect font metric loading. Symptoms: the overlapping is uniform across the document, affecting every line equally.

Fix 1: Use a Different Conversion Tool

The fastest fix: try a different converter. If your current tool produces overlapping text, switch to: (1) Microsoft Word's native Export to PDF for Word documents — it has the most accurate line spacing calculation, (2) LibreOffice for ODT/ODS/ODP files — strong PDF output, (3) FixMyPDF's Word to PDF for .docx files. If one tool produces overlapping text, another usually does not. The correct converter for a specific source format always produces correct line spacing.

Fix 2: Adjust Line Spacing in the Source Document

If a specific tool is producing the overlap and you cannot switch: increase line spacing in the source document to give the converter more vertical margin for error. In Word: select all text → Home → Line and Paragraph Spacing → set to 1.15 or 1.2 instead of "Single." This reduces the density of the overlap by giving each line more vertical room. It changes the document layout but prevents the collision. For formal documents where you cannot change line spacing, switching converters is the better fix.

Fix 3: Flatten and Re-OCR as a Recovery Step

For a PDF with overlapping text that you cannot re-convert (no source document, no alternative converter): rasterize the pages and run OCR to create a clean text layer. In Acrobat Pro: use Print → Adobe PDF → "Print as image" to create a rasterized version, then run Recognize Text. The overlapping text will appear as overlapping in the image, but at least the file will be visually coherent. Alternatively, open in Ghostscript with rasterization: gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dFIXEDMEDIA input.pdf -sOutputFile=clean.pdf.

Fix 4: Adjust Font Substitution in the Converter

Overlapping text in HTML-to-PDF conversions often occurs when a specific web font is not available to the converter and the substitute font has different metrics. The converter uses the substitute font's dimensions but the original font's line height — miscalculating spacing. Fix: ensure the converter has access to the fonts used in the source. For wkhtmltopdf: install the web fonts on the conversion server. For Puppeteer/headless Chrome: the fonts are loaded via the full browser engine and this issue rarely occurs. For other HTML-to-PDF tools, specify fallback fonts explicitly in your CSS that closely match the primary font's metrics.

Try Compress PDF Now — Free

Browser-based, private, and instant. No account or software required.

Open Compress PDF
Report Bug
Send Feedback
Feature Request