Certificate Text Overflows or Misaligns: Classic vs Builder Fixes
A learner's name runs off the certificate or text sits lower than in the editor. The causes differ between classic TCPDF certificates and the Certificate Builder, and so do the fixes.

Certificates are the one LearnDash output learners print and frame, so a name spilling past the border or a date sitting on top of a signature line gets reported fast. LearnDash 4.18.0.1 has two rendering engines: classic certificates go through TCPDF, and certificates made with the Certificate Builder add-on (1.1.2) go through mPDF. They misalign for different reasons and need different fixes. This guide takes each symptom, identifies the engine-specific cause from the source, and gives the fix that holds across names of any length.
First, which engine
Open the certificate in the admin. If the editor shows blocks inside a single Certificate Builder block with a background image setting, it is a builder certificate. If it shows classic HTML with a featured image, it is classic. The certificates list also has a Type column when the builder add-on is active. Everything below is split along that line; our comparison of the two engines explains the design differences behind it.
Classic: text sits lower or further right than expected
TCPDF starts writing at the page margins, and LearnDash passes TCPDF's defaults unless filtered: 27mm top, 25mm bottom, 15mm left and right, on the page format and orientation chosen in the certificate's PDF options. LearnDash also prefixes the content with two line breaks and, unless the legacy constant is set, runs it through wpautop(), which wraps paragraphs and adds spacing. A design positioned in the editor against the featured image therefore lands lower on the PDF than it looked. Fix: set the margins you actually want through the learndash_certificate_params filter, which receives the TCPDF parameter array including a margins sub-array, and account for the two leading breaks by removing them with the learndash_certificate_content filter if they are in the way:
<?php
add_filter(
'learndash_certificate_params',
function ( $params, $cert_id ) {
$params['margins'] = array(
'top' => 10,
'right' => 10,
'bottom' => 10,
'left' => 10,
);
return $params;
},
10,
2
);
Classic: a long name wraps or overflows a table cell
Classic layouts usually position text with tables or fixed-width elements. TCPDF supports only a subset of CSS and no absolute positioning, so a cell given a width in pixels clips or wraps depending on the font. The reliable pattern is a full-width table with centred cells and no fixed widths for the name row, with font size chosen for the longest plausible name. If names still overflow, reduce the size for long names with the learndash_certificate_content filter, which receives the processed HTML and the certificate ID; the user is not passed, but the content already contains the expanded [usermeta] shortcode output, so you can measure the name length in the HTML and swap a style class.
Classic: the font in the PDF is not the font in the editor
TCPDF renders with the fonts bundled in LearnDash's TCPDF library: Helvetica, Times, FreeSans, FreeSerif and FreeMono, each with bold and italic variants. A theme font declared in the editor falls back to Helvetica, which is narrower or wider than the design assumed and shifts every line. Declare one of the bundled families in the certificate's inline styles, or in the Certificate Custom Styles setting under LearnDash LMS, Settings, Certificates, which LearnDash prepends to the content as a style block. If text looks right in the editor and wrong in the PDF, the font is the first suspect.
Builder: a line does not wrap and runs off the edge
The builder's heading and paragraph renderers replace spaces with non-breaking spaces before handing text to mPDF, so that lines break exactly as they did in the editor. The consequence is that a line longer than its container cannot wrap at all; it overflows. A long name in a column, or a sentence typed on one line that is wider than the container width, runs off. Fixes, in order of preference: give the name its own full-width row rather than a column; reduce the font size, remembering that named sizes map to fixed pixel values from 16px for extra small to 122px for gigantic; break long sentences into separate paragraphs; or widen the container, which is the percentage setting on the builder block. Laying out a builder certificate works through the arithmetic.
Builder: columns are narrower than in the editor
For each columns block the renderer computes available width from the page width and container percentage, subtracts a fixed gutter per gap, and splits the remainder by the column percentages. The gutters are fixed pixels while the editor shows percentages, so every column is slightly narrower than it looks, and a column that was just wide enough for a name in the editor is just too narrow in the PDF. Set column widths explicitly and leave a margin, or move the name out of the columns.
Builder: text sits lower than expected
Content flows from the top of the page inside a centred container; there is no top offset, and headings and paragraphs default to a line height of 1.4, so a 40px heading occupies about 56px. Designs that look right in the editor but land low in the PDF usually have block margins set in the editor that the renderer handles differently from spacers. Replace margins with spacer blocks, whose heights pass through unchanged, and tune one spacer against the preview.
Builder: a character is missing or shown as a box
That is a font problem rather than layout, but it moves text because the substitute glyph has a different width. The builder bundles the GNU Free fonts and substitutes from FreeSans when a glyph is absent; a name in a script none of the registered fonts covers shows boxes. Upload a TTF that covers the script, as in adding custom fonts to the Certificate Builder, and select it for the name block. Classic certificates have the same issue with TCPDF's bundled fonts, with FreeSerif covering the widest range.
Both: the editor is not the PDF
Neither engine renders what the block or classic editor shows. Classic certificates should be checked by completing a test course and downloading; builder certificates have a Preview button that renders the real PDF, though with no course or user data, so names come from your placeholder text. Test with the longest real name in your user list, and with a name in each script you serve. Our guide to certificate data shortcodes helps when the overflowing item is a date or score rather than a name.
A fix order that works
- Identify the engine.
- Classic: set margins with the params filter, pick a bundled font, remove fixed widths from the name row.
- Builder: move the name to a full-width row, set explicit column widths, replace margins with spacers.
- Both: test with the longest name and each script, then with a long course title.
When to get help
One certificate is usually fixed within the hour once the engine is known. Multilingual certificate sets, pixel-matched templates for accreditation bodies, or a conversion of classic designs to the builder are projects our LearnDash services team handles with our design team; a LearnDash developer can also add a content filter that scales the name size automatically.
Frequently asked questions
Why does the builder refuse to wrap a long line?
It converts spaces to non-breaking spaces so lines match the editor. Shorten the line, reduce the size, or widen the container or column.
Why is my classic certificate text lower than in the editor?
TCPDF's default margins, two leading line breaks and paragraph wrapping all push content down. Set margins with the certificate params filter.
Can I use my brand font on a classic certificate?
Only the fonts bundled with TCPDF render. For custom fonts, use the Certificate Builder, which accepts TTF uploads.
Does the builder Preview show real names?
No. Previews run with no course or user context. Complete a test course to check real data.
Add worldwincoder.com as a preferred source on Google, or open this article in your AI assistant to use it as a source.
