Text and fonts
Text in the PDF cannot be selected or searched
The document looks right and selecting text does nothing. Search finds no matches. Copying gives you an image or nothing at all.
What is actually happening
The text is not text. Either the whole page was rasterised, or the specific text is inside an image, or it is drawn in a canvas. A render from HTML produces real text by default, so this is nearly always the content rather than the render.
Confirming it is this and not something that looks like it
Try selecting different parts of the document. If some text selects and some does not, the non-selecting parts are images. If none does, the whole output was rasterised.
The fix
Replace images of text with real text. The common offenders are a logo with a tagline baked in, a chart with its labels drawn into a bitmap, and a signature block that is a scan. Each is worth converting because searchable text is what makes the document usable years later.
If that was not it
These produce the same symptom often enough to be worth ruling out before assuming the fix above did not work.
- Headings implemented as images to guarantee a font, which the font-embedding fix solves properly
- A canvas-rendered chart, whose labels are pixels
- A scanned signature covering the name printed underneath it
- Text with a colour matching its background, which selects but appears to be absent
Frequently asked
Does this happen with every rendering engine?
The behaviour behind it is not specific to one tool. The text is not text. Anything rendering HTML to a paged medium has to make the same decision, so the fix travels with you if you change how the render happens.
Will this show up as an error in my logs?
No, and that is what makes it expensive. A document that renders wrong is still a successful render as far as every log line is concerned. It is found by someone opening the file, which is usually the customer.
Related failures
Problems people arrive at from the same starting point, or mistake for this one.
Custom fonts fall back to a default in the PDF
The font file was not fetched.
Emoji do not render in the PDF
Emoji need a dedicated font, and colour emoji need one in a colour font format.
Arabic or Hebrew text renders backwards or disconnected
Two separate problems.
Line breaks in the PDF differ from the browser preview
The font is not the same.
Chinese, Japanese or Korean characters show as boxes
The font in use has no glyphs for those characters, and no font on the render machine does either.
CSS for paged documents, and what actually works
Which parts of the paged media specification a browser-based render implements.
Everything that goes wrong, by category
The full list, grouped by where in the pipeline it breaks.
Paste your markup and see the rendered document, without signing up.