Home›Blog›Tutorials & How-Tos
Tutorials & How-Tos
16 min read 0 views

Replace Text in PDF and Keep the Same Font: What Works

MojoPDF

MojoPDF

November 23, 2026

Open the font list of almost any PDF exported from Word or Google Docs and you'll see names like ABCDEF+Calibri or KQXWPZ+Arial-BoldMT. The PDF specification defines that random six-letter prefix as a marker. It means the file contains only a subset of the font: the exact glyphs the document used, and nothing else.

Replace Text in PDF and Keep the Same Font: What Works

That one detail explains most of the frustration behind this search. To replace text in PDF and keep the same font, three things have to be true. The editor must have access to the font (fully embedded in the file, installed on your computer, or closely matched). Every character you type must exist in that font. And the new text must fit roughly the space the old text took up, because PDFs don't reflow. When all three hold, an in-place edit is invisible. When any one fails, the editor quietly swaps in a fallback font and the change stands out.

The rest of this article shows how to check each condition in a couple of minutes, what to do when one fails, and how to verify the result before you send the file.

Why PDF Editors Swap Your Font

A Word document stores characters and lets the software decide how to lay them out. A PDF does the opposite. It's a finished page description: each line of text is an instruction that says, roughly, “at this exact position, draw these glyphs from this font at this size.” There are no paragraphs and no line wrapping, and spaces are often just gaps rather than characters. The format is defined in ISO 32000, and that design is exactly why a PDF looks identical on every machine.

A font can be stored in a PDF in one of three ways:

  • Fully embedded: the whole font file travels inside the PDF. This is less common, because it adds weight to the file.
  • Embedded subset: only the glyphs actually used are included. This is the default for almost every export from Office, Google Docs and design tools, because it keeps files small.
  • Not embedded: the PDF only names the font and relies on the viewer having it. This is common in older files and in some reports generated by business systems.

To change a word, an editor needs two things from the font: the outlines (shapes) of every glyph you type, and the metrics (widths and spacing) that place the line correctly. With a subset, the shapes for unused letters simply aren't in the file. If you type a character the original text never used, the editor has nothing to draw it with.

At that point, editors behave differently. Some refuse the edit. Some quietly fall back to Arial, Helvetica or Times. Others, Acrobat among them, use the font if it's installed on your system and substitute it if it isn't. That's why the same PDF edits cleanly on a colleague's laptop and badly on yours. People in the Adobe community have discussed this exact problem for years, and the honest answer hasn't changed: the font has to be somewhere the editor can reach.

DefinitionPlain-English explanation of the term

Font subset: a trimmed copy of a font embedded in a PDF that contains only the characters the document actually uses. Its name starts with six capital letters and a plus sign, such as ABCDEF+Garamond. Subsets keep files small, but you can't type characters that weren't in the original text unless the full font is available.

Once you see a PDF as positioned shapes rather than editable sentences, every font problem in this article makes sense. The editor isn't being difficult. It's trying to draw a letter it was never given.

Diagram showing why you can't replace text in PDF and keep the same font when a glyph is missing from the subset
Click on image to view HD

The Conditions That Decide Whether the Font Matches

Before you touch the document, work out which situation you're in. It takes a minute and saves an hour of nudging text boxes around.

Font state in the PDFEditing with letters already usedTyping new lettersBest fix
Fully embeddedMatchesMatches (if the licence allows editing)Edit in place
Embedded subsetUsually matchesMissing letters fall backInstall the real font, or reuse existing letters
Not embedded, font installed on your machineMatchesMatchesEdit in place
Not embedded, font missingFalls backFalls backInstall it or use a metric-compatible substitute
Scanned page (no font at all)No live textNo live textOCR, then match visually

The first condition is access to the font. The second is character coverage. Changing “March 3” to “March 8” only works from a subset if an 8 already appears somewhere else in that same font in the document. The third is fit. Nothing reflows, so a replacement that's three characters longer either runs into the right margin or overlaps the next column. Or the editor squeezes it by tightening the letter spacing or shrinking the size. Shorter replacements are easier, but they leave a gap, and justified text makes that gap obvious.

There's a fourth, quieter factor: embedding permissions. Font files carry a flag (the fsType field in OpenType) where the font's maker records whether the font may be embedded for preview and print only, or for editing as well. A well-behaved editor respects “preview and print” and won't let you add text in that font, even though the font is sitting right there in the file. It's rarely the cause, but it explains the occasional font that refuses every edit even when all the letters are present.

How to Check Which Fonts Your PDF Uses

You don't need special software for this.

In Acrobat or Acrobat Reader: open File > Properties and click the Fonts tab. Each font is listed with its type and status. Look for “Embedded” or “Embedded Subset”. If neither appears, the font isn't embedded, and the viewer is already substituting a font on screen.

On the command line: the free poppler-utils package includes pdffonts, which prints a quick table:

pdffonts invoice.pdf
name                      type      emb sub uni
ABCDEF+Calibri            TrueType  yes yes yes
GHIJKL+Calibri-Bold       TrueType  yes yes yes

The emb column shows whether a font is embedded, sub whether it's a subset, and uni whether a ToUnicode map exists. That last column matters more than it looks. Without that map, neither the editor nor anyone copying the text can reliably tell which glyph stands for which letter. That's why some PDFs paste as gibberish.

While you're there, check three things:

  1. Strip the prefix to get the real name. ABCDEF+Calibri is Calibri, and Calibri is what you'd install.
  2. Check bold and italic separately. Each one is a separate font file. Your body text may be fully covered while the bold total on an invoice isn't.
  3. Watch for Type 3 fonts. These are drawn as small graphics programs rather than standard font files. Many editors can't edit them in place at all, so treat them like a scan.

If the Fonts tab is empty and you can't select any text, the page is an image. Skip ahead to the section on scanned PDFs.

How to Replace Text in PDF and Keep the Same Font, Step by Step

This process works in most editors, from Acrobat to browser-based ones.

  1. Duplicate the file. Always edit a copy. Some editors rewrite the whole page on save, and you want the original for comparison.
  2. Identify the font and its status using the check above. Note the size too: click into the text and read the size your editor shows.
  3. Make the font available if needed. If it's a subset or not embedded and you need new characters, install the real font on your machine (from your Office installation, Google Fonts or your own licensed library). Then restart the editor so it picks the font up.
  4. Select the existing text, not a new text box. Click directly into the line with your editor's edit-text tool. If the tool creates a fresh box instead of selecting the existing line, you'd be adding text on top rather than replacing it. Stop and find out why: it's usually a scan, a Type 3 font, or text that was converted to outlines.
  5. Type the replacement and check the font field immediately. If the font name changes to Arial, Helvetica, MinionPro or a generic name, the editor has substituted a font. Undo, and go back to step 3.
  6. Match the details. Make sure size, colour, weight and letter spacing match the neighbouring words. A lot of text that looks black is actually 85 to 90 percent grey, or a very dark navy.
  7. Manage the fit. If the new text is longer, reword it before you shrink anything. Tightening letter spacing by 3 to 5 percent is usually invisible. Dropping a whole point size almost never is.
  8. Save as a new file and verify it with the checks later in this article.
Pro TipShortcut the learning curve

If you only need a missing character once or twice, look for it elsewhere in the document in the same font and size. Copying and pasting that existing glyph keeps the original shape exactly, even when the full font isn't installed.

Decision flowchart for keeping the original font when editing PDF text, from font check to verification
Click on image to view HD

A Worked Example: Fixing One Figure on an Invoice

Imagine a freelancer who exported an invoice from a template and then spotted that the total reads 1,250.00whenitshouldbe1,250.00 when it should be 1,720.00. The Word source is on an old laptop, and the client wants the corrected PDF today.

The font check shows two fonts: ABCDEF+Lato-Regular and GHIJKL+Lato-Bold, both embedded subsets. The total is set in Lato Bold.

This is where character coverage bites. The digits 1, 2, 5 and 0 are definitely in the bold subset, because they appear in the total. A 7 might not be, unless another bold figure on the page contains one. Looking through the document, the invoice number in the header is in regular weight, and no bold number has a 7 in it. Typing “1,720.00” straight in would produce a 7 in a fallback font, slightly wider and with a different stroke.

The fix takes five minutes. Lato is free on Google Fonts, so the freelancer installs Lato Bold, restarts the editor and edits the total in place. The editor now takes the 7 from the installed font, and because it's the same family, the width and stroke weight match the embedded glyphs exactly. The new figure is the same length as the old one, so fit isn't a problem. Zooming to 400 percent and pasting the total into a plain text editor confirms it reads 1,720.00 correctly.

One more step is worth doing: check the subtotal and tax lines too. An invoice with one corrected figure and two stale ones is worse than the original.

When the Original Font Isn't Available

Sometimes you can't get the real font. It might be a commercial typeface you don't own, a custom corporate font, or something obscure that the PDF only names. You have three options, in order of preference.

Use a metric-compatible substitute. Several free fonts were designed with exactly the same character widths as common commercial fonts. Text in them takes up the same space, even though the letter shapes differ slightly:

Original fontMetric-compatible substitute
ArialLiberation Sans
Times New RomanLiberation Serif
Courier NewLiberation Mono
CalibriCarlito
CambriaCaladea

Matching metrics means line length and spacing won't change, which removes the most visible symptom. At body-text size, most readers won't notice the difference in shape. In large headings, some will.

Find a visual match. For display fonts, a font-identification service given a sharp, high-resolution crop of the text can usually name the font or a close relative. Match the x-height (the height of lowercase letters) and the stroke contrast before you worry about individual letters.

Replace the whole line, not one word. If the substitute is noticeably different, swapping a single word leaves one odd word in the middle of a sentence. Retyping the whole line, or the whole paragraph, in the substitute makes the change look deliberate rather than patched.

What you shouldn't do is use a copy of a font you don't have a licence for. Most font licences cover embedding and editing rights, and using an unlicensed copy to edit a client's document creates a problem you didn't have before.

What About Scanned PDFs?

A scan has no fonts at all. Each page is a photograph of paper, so “the same font” has to mean a visual match rather than a technical one.

The workflow changes. First, run OCR so the page has real, selectable text. Next, pick a font that looks like the printed type: typewritten documents and laser-printed office letters are usually Courier, Times or Arial lookalikes. Then remove the old words and set the new ones at a matching size and weight, with a slight greyness so they don't look cleaner than the surrounding scan. Adobe's guide to editing scanned PDFs describes Acrobat matching new text to the look of the scanned original for exactly this reason.

Scans have two traps of their own:

  • The white rectangle. Deleting text from a scan with a basic tool leaves a pure white block on an off-white, slightly speckled page. Better editors repair the background (called inpainting), so the paper texture continues under the new words.
  • Text that's too crisp. Perfectly sharp text sitting on a fuzzy 200 dpi scan looks pasted on. Using a touch of grey instead of pure black helps it blend in.

If your scan won't let you select any text, start with why scanned PDFs aren't searchable: OCR has to work before any editing can. And if you're not sure whether your file is a scan, a subset problem or something else, the four reasons a PDF won't edit will help you work out which one you're dealing with.

Comparison of whiteout overlay, fallback font and true in-place PDF text edit results
Click on image to view HD

What Usually Goes Wrong, and How to Spot It

The most common failure isn't a font mismatch at all. It's whiteout plus a new text box: covering the old words with a white rectangle and typing new ones on top. It can look perfect on screen, but the original text is still in the file. Anyone can select it, search for it, or simply move the white box. On an invoice or a contract, that's a real risk, not a cosmetic one. Running flatten afterwards doesn't fix it either: flattening merges the layers visually, but the covered text usually stays in the page and can still be extracted.

Common MistakeEasy to miss, costly to fix

Covering text with a white box and typing over it isn't replacing text. The original words stay in the file and show up when someone searches, copies, or uses a screen reader. Always edit the actual text itself, or use a true redaction tool if the goal is to remove information.

Other failures to check for before you send the file:

  • Silent fallback. After you type, the font field shows a different name. Zoom to 400 percent and compare a letter with a distinctive shape, such as a lowercase g, a or y or the numeral 1, against the same letter elsewhere on the page.
  • Spacing drift. The edited words are spaced slightly differently from their neighbours. Compare the gaps between words in the edited line with the line above it.
  • Baseline shift. The new text sits half a point higher or lower than the rest of the line. Drag a ruler guide across the line to check.
  • Fake bold. When the bold font isn't available, some editors fake bold by thickening the regular weight. It can pass on screen but looks smudgy in print.
  • Broken copy-paste. Copy the edited line and paste it into a plain text editor. If it comes out as symbols or with letters missing, the character mapping is broken, and search, accessibility and screen readers will all suffer.
  • Screen versus print. Print a test page, or use print preview at actual size. A mismatch between pure black and dark grey is much more visible on paper than on screen.

None of these checks takes more than a minute, and together they catch almost every edit that would otherwise give itself away.

Edit the PDF or Go Back to the Source?

If you have the original Word, Google Docs or InDesign file, editing that and exporting again is almost always cleaner. All the fonts are there, the text reflows, and you avoid every problem above. Editing the PDF directly makes sense when the source is lost or belongs to someone else. It also makes sense when the PDF has picked up extras, such as stamps, signatures or scanned annotations, that you'd lose by regenerating it.

Two boundaries apply whichever method you use. First, editing a digitally signed PDF breaks the signature: viewers will flag the document as changed after signing. Corrections to a signed contract need a fresh signature, not a quiet fix. Second, changing a document someone else issued, such as a bank statement, certificate or receipt, and presenting it as the original isn't a font problem. It's alteration. Fix your own documents, and ask the issuer for a corrected version of theirs.

Getting It Right the First Time

A matching edit is mostly diagnosis done before editing. Know whether the font is embedded, subset or missing. Make sure every character you need exists in it. Keep the replacement close to the original length. That's the difference between an edit nobody notices and one that looks off at a glance.

The next time you need to replace text in PDF and keep the same font, spend the first two minutes in the Fonts tab instead of the editing tool. The edit itself then takes seconds, and the verification checks tell you whether it worked before your client, landlord or professor finds out it didn't.

Key TakeawaysThe essentials at a glance
  • PDFs store positioned glyphs, not editable sentences, so the editor needs the actual font to draw new letters
  • Subset fonts (names like ABCDEF+Calibri) only contain the characters already used in the document
  • Check File > Properties > Fonts, or run pdffonts, before editing
  • Install the real font or use a metric-compatible substitute when letters are missing
  • Never whiteout and type over: the old text stays in the file
  • Verify at 400 percent zoom, with a copy-paste test and a print preview
MojoPDF
Written By

MojoPDF

Taj

A professional SaaS founder offering great value to it's customers.

Frequently Asked Questions

Usually because the font in the PDF is an embedded subset or isn't embedded at all, and the editor can't find the full font on your computer. Rather than refuse the edit, it substitutes a fallback such as Arial or Helvetica. Installing the real font and restarting the editor fixes most cases.

Yes. Any editor that edits the existing text in place, rather than adding a text box on top, can do it, as long as it can reach the font. The same rules apply in every tool: the font must be embedded or installed, and every character you type must exist in it.

Yes, if the font is installed on your own computer, because the editor can then use the local copy. If it isn't installed and you can't get it, a metric-compatible substitute such as Carlito for Calibri keeps the line length identical, even though the letter shapes differ slightly.

In Acrobat or Reader, open File > Properties and look at the Fonts tab. Ignore the six-letter prefix before the plus sign: ABCDEF+Lato-Bold is Lato Bold. For scanned pages, which have no fonts, a font-identification service working from a sharp crop of the text is the best option.

Because the embedded subset only contains the characters the document already used. Rearranging letters that exist works fine, but a letter that never appeared in that font has no shape stored in the file. The editor either falls back to another font or blocks the edit.

Usually, if you edit the existing text, because the new characters take on that text's size and position. Some editors shrink text automatically to fit a longer replacement, though, so check the size field after typing. Adding a new text box never inherits anything, which is one more reason to avoid it.

Some editors offer a find-and-replace feature, and it works when the replacement uses letters the font already covers. Every instance still faces the same fit problem, though: a longer word can push past margins or crowd justified lines. Review each changed line rather than trusting the batch result.

Yes. A digital signature covers the document as it was at the moment of signing, so any later text edit makes viewers flag it as modified. If a signed contract needs correcting, change it and have it signed again.

The PDF is missing, or has a broken, ToUnicode map, the table that tells software which glyph stands for which letter. The page can look perfect while copy, search and screen readers all fail. Running the pdffonts command shows a no in the uni column when that map is missing.

Generally not as an installed font. The embedded copy is licensed for displaying and printing that document, and extracting it for other use usually breaks the font licence. Editing within the permissions the font allows is a different matter from taking the font itself.

Run OCR first so there's real text to work with, then identify a visually similar font from a crop of the printed text. Match the size and weight, and use a slightly grey colour so the new words don't look sharper than the scan around them.

No. The original text stays in the file under the white box, where anyone can select it, search for it or reveal it. For corrections, edit the real text, and for removing sensitive information, use a proper redaction tool that deletes the content.

The most common causes are fake bold, where an editor thickens the regular weight because the bold font is missing, and colour mismatches, such as pure black next to a dark grey. Both are easy to miss on screen. A test print at actual size shows them immediately.

567 tools, one workspace

Every PDF tool you need, in one place

Convert, edit, sign, organize and secure your documents — or let the AI read them for you. Pick a tool, drop your file and finish in the Mega AI Studio.