# How to find out WHERE a specific font is used in a PDF document

For a given PDF which uses a number of fonts (e.g., in Acrobat Reader, the fonts used can be seen when selecting Files > Properties > Fonts) how can I find out where a certain font is used in the document (using Adobe Acrobat 7, Reader, or a free PDF tool)

Just to be clear: I don't want to find which font is used on a certain piece of text (I know how to do that using Acrobat 9 Professional, see this Super User question). Instead I want to find where a specific font is used.

It's a bit old now this question, but I came here via Google, and someone else might also. My solution was to create a Preflight profile (Acrobat 9 Pro) which errored on font information. Clicking on the font name in the results then jumps to the page and highlights the text. Downside is that you get a list of all fonts on all pages organised by page rather than by font name, but it provided a solution for me.

1) Create a new Custom preflight profile Advanced|Preflight|Options|Create New Preflight Profile

2) Give the profile a name (Fontfinder, say)

3) In the left window of the dialog click "Custom checks"

4) In the right window of the dialog below the blank box click the plus symbol to create a new check and include in current profile

5) Click "text" in the Group, the bottom property is "Text size". Select this and click "Add"

6) The pane below now has more options. Click on the drop down options probably labelled "equal to" and select "less than"

7) Enter a large value in the Number field. I entered 500

8) Top left of the dialog when check fires report as... and enter something like Text size 500 pt or less and click OK. There should be a new custom check in the pane with a red cross beside it. If the cross is not red, click on the check label, and select "error" below the pane

Repeat the steps above for another error check, but changing the option for 500 to "greater than or equal to", and Check fires report as Text 500 pt or greater

9) Click OK in the Edit Profile Dialog

10) Run the profile on your PDF

I set the font to error on a large point size so that all of the errors would report in a group. The second check is simply to catch any font larger than that. I suppose you could check for pt size 50000 and have the same result.

• This answer helped a lot. However, at step 5, instead of selecting the Text group, select the Font group, and then Base Font Name and type in the name of the font, which works a lot nicer. Nov 1, 2012 at 8:08

Here is a way how to find out for each individual page which set of fonts is used on it. (Sorry, I don't know a way to make the location-awareness for font usage more specific than page-wise without resorting to expansive commercial software such as callassoftware.com's pdfToolbox4 or Enfocus' PitStop.)

This method use XPDF's pdffonts.exe utility, a GPL-licensed Free Software:

2. Extract the *.zip file to some directory and locate the various *.exe utilities contained therein.
3. Now, to show all fonts used on page 22 of a document, run:

pdffonts.exe -f 22 -l 22 c:\path\to\some\pdf.pdf

4. To see all fonts used in the complete document, just run:

pdffonts.exe c:\path\to\some\pdf.pdf

5. To obtain a list of fonts used on each page of a 22-page PDF, just use:

for /l %i in (1,1,22) do ^
(echo.PAGE %i & pdffonts -f %i -l %i c:\path\to\some\pdf.pdf)

• This method also works on Linux/Mac, except of course the binary is called pdffonts rather than pdffonts.exe and the path would use forward slashes. Mar 12, 2014 at 2:51

I have used Enfocus' Pitstop Pro plugin for this, but it's not cheap.

In the report created by the Acrobax X Preflight, click on the "Show in Snap" button in the bottom left corner of the report window, then in the window listing click on +Overview, and +Pages, Each page of the pdf is listed, click on +Page: 1 for example, click +Fonts, the fonts for the page are listed, click on a font and the text it is used on will show in the Preflight Snap View window. If you have to you can use find in acrobat to locate the text. I've found it is not always on the page reported, but the snap view does accurately show what text a particular font is used on, hence the need to use a regular text find.

Perhaps not relevant to you if the PDF wasn't originally created in Word, but if it was, you can find the fonts in Word using Advanced Search, as described here.

In short:

1. Find
3. Format -> Font

etc. You can work out the rest.

The following is a script that accomplishes this on Linux or similar operating systems, using only open-source software (qpdf and pdffonts).

#!/usr/bin/ruby

# usage:
#  find_page_where_font_is_used.rb file.pdf Nimbus
# Finds the first page in file.pdf where a font with a name containing Nimbus is used.
# Font names are matched in a case-insensitive way.
# Requires pdffonts, qpdf.

def die(message)
$stderr.print "error in find_page_where_font_is_used.rb: #{message}\n" exit(-1) end def shell_out(command) output = #{command} result =$?
if !(result.success?) then
die("error in command #{command}")
end
return output.strip
end

def is_used_in_page_range(font,pdf,from,to)
table = shell_out("pdffonts -f #{from} -l #{to} #{pdf}")
if table=~/^[a-zA-Z0-9\+\-]*#{font}/i then
return true
else
return false
end
end

def search_for_font(font,pdf,from,to)
print "Searching pages #{from}-#{to}.\n"
if from==to then
return from
else
mid = (from+to)/2
if mid==to then mid=to-1 end
if is_used_in_page_range(font,pdf,from,mid) then
return search_for_font(font,pdf,from,mid)
else
return search_for_font(font,pdf,mid+1,to)
end
end
end

def main

pdf = ARGV[0]
font = ARGV[1] # can be a substring, e.g., Deja or Nimbus
n = shell_out("qpdf --show-npages #{pdf}").to_i
print "total pages = #{n}\n"
if !is_used_in_page_range(font,pdf,1,n) then
print "No font in #{pdf} has a name containing the string #{font} (case-insensitive).\n"
exit(0)
end
p = search_for_font(font,pdf,1,n)
print "The font first occurs on page #{p}.\nOutput of pdffonts for this page:\n"
print shell_out("pdffonts -f #{p} -l #{p} #{pdf}")+"\n"
end

main


I have found a way, that isn't very automatic, but it only involves freeware and tells you exactly which text uses a specific font:

1. Identify the fonts using pdffont and the page where it is used as explained in the other answers.
2. Open the PDF in Inkscape (selecting the page you want to look at in detail).
3. Save the file as SVG.
4. Open the SVG file in your favorite text editor and search for the font name. SVG is XML-based, so you should be able to see for which text the font is used.

I found Inkscape also to be useful for the reverse problem: If you have a particular snippet of text, it can tell you what font it is: Open the PDF as above, then use the text tool and select the text you want to know the font of. Inkscape may not render the font correctly, but it does display the name of the font in the font selector.

This doesn't meet all the OP's restrictions, but I've found many of the other methods suggested here less useful if you're looking for hidden text. My workaround was to use Adobe Illustrator.

For example, Print > PDF > Save as PDF in MS Word 2016 for macOS will insert hidden exclamation marks in Arial after each ordinal in a numbered list. If you preflight the PDF in Acrobat, it will report embedding "Arial MT", but Show in snap will just give you a blank gray box, so there's no text to search for.

Opening the PDF instead in Illustrator, if you have it, will:

1. make the hidden text visible, and
2. allow you to use the Type > Find Font… command to locate the text and/or replace the font.

You can also do this with pdf.js, even the version integrated in Firefox. Reference

First, you have to enable the debugging mode (it’s disabled by default for security reasons, do not forget to re-disable it once done): go to about:config and set pdfjs.pdfBugEnabled to true (later to false to re-disable).

Then, navigate to the JS file, for example via file:///home/myusername/. The URL will now look something like: file:///home/myusername/filename.pdf

Append #pdfBug=all to the URL. You might have to press F5 to reload the page. It will now look similar to this:

You’ll notice the list of fonts on the right-hand side. If you tick one of the checkboxen, the locations of where on the page(s) the selected font is used will be underlaid with a semi-transparent yellow.

You might wish to change the colour. In the in-Firefox version, you can do that by ticking one font (to have it visible), pressing F12, using the selector to click on one highlighted text, scrolling down, in the CSS Rules tab, to the .debuggerShowText CSS class, and changing its style:

I’ve not tried this with the standalone pdf.js version but am assured (by the reference) it’s possible; web/debugger.css has the style in question.

Somewhere in the internet I found this other method that works, if you have Adobe Acrobat (I think this works after 7).

Find Tools>Edit Document Text (I am reading from my Acrobat 10X, it may be different in your version, but you should be able to find what I'm talking about)

Once a box of text is selected, right-click and look at the properties. There, it will say the font used.

edited: found the link to my reference: http://www.deepbluesky.com/blog/-/extracting-font-information-from-pdf-files_35/

• As specifically stated in my question, the problem you are solving is not my question. Mar 3, 2011 at 8:21