How to know which fonts are used in selected part of a PDF document

121

37

I'm using Foxit Reader as default PDF viewer. How can I see what type of font is used for a selected part of a PDF document?

(If this can only be done with another software, I'd prefer a freeware as I don't want to pay for just viewing selected fonts' types.)

Mehper C. Palavuzlar

Posted 2010-03-08T11:42:32.983

Reputation: 51 093

your pdf is in various types of font? – Ye Lin Aung – 2010-03-08T11:59:02.070

2Yep, lots of font types in it. – Mehper C. Palavuzlar – 2010-03-08T12:11:05.240

2That's funny, I had the exact same question today. You saved me the trouble of asking it. :) – Sasha Chedygov – 2010-03-09T07:20:58.407

1:) Although, we have no solution yet. – Mehper C. Palavuzlar – 2010-03-09T07:40:17.613

2

At http://superuser.com/questions/62562/how-to-find-out-where-a-specific-font-is-used-in-a-pdf-document Rabarberski states "I don't want to find which font is used on a certain piece of text (I know how to do that)"...

– Arjan – 2010-03-29T14:18:32.993

I've added the explanation on how to do this using Acrobat 9 Professional – Rabarberski – 2011-02-22T09:02:04.463

@Rabarberski: We'd been looking forward to hearing from you. Thanks for your answer. – Mehper C. Palavuzlar – 2011-02-22T09:07:29.393

Answers

65

If you are using PDF-XChange Viewer, do this:

  1. Select your text with the text selecting tool
  2. Right-click the selection
  3. Click on "Text Properties..."
  4. Choose "Formatting" (on the left)
  5. There is an arrow on the left of your selected text (which comes on the right part of the
    window)
  6. You click on it and you get all the information you want.

enter image description here

Patrick

Posted 2010-03-08T11:42:32.983

Reputation: 666

3I think this should be the accepted answer since it is free. – Randy Levy – 2014-06-23T18:42:21.927

5@Patrick : it is not available in Linux/BSD or OSX. – user2284570 – 2014-12-01T20:30:19.600

It works fine under wine. (It also happens to be the best (and only free) pdf annotation tool that you can use on linux and that uses the pdf standard.) – Diagon – 2016-10-10T19:02:18.607

This worked perfectly for me, and it's definitely available on just the free program. Thanks for sharing! – Sarah Bailey – 2017-03-05T21:19:36.777

5Perfect answer - PDF XChange Viewer is free software as requested in the question and does so much more than Acrobat Reader. – Amos M. Carpenter – 2014-05-16T03:03:31.150

55

Here's something very simple for unencrypted PDFs:

 strings my.pdf | grep FontName | cut -d '/' -f4

Try removing the "cut" part if it gives no meaningful results.

Aleksey Gureiev

Posted 2010-03-08T11:42:32.983

Reputation: 779

4Just to note: it seems this does not work on pdfs produced with pdflatex. – PLL – 2015-09-03T19:39:06.787

1This does not seem to work for me either — it just prints out FontName FontName FontName – fatuhoku – 2016-02-22T17:43:59.553

Could you kindly explain what this command does? – Bobort – 2017-12-06T17:05:44.937

1Is it hard to check manuals for "strings", "grep" and "cut"? It extracts all strings from the PDF, selects only lines with FontName, shows the 4th field from the ones separated by '/'. – Aleksey Gureiev – 2017-12-07T04:59:50.653

4@fatuhoku you need to pick the right number for the -f4. Remove the cut section and see the uncut output. – Aleksey Gureiev – 2017-12-07T05:01:16.053

if the font list is long, with many duplicates, appending | sort | uniq -c might help – myrdd – 2018-11-22T13:59:54.183

Its very hard for me to link the font to the correct text with multiple fonts in one pdf. +1 for a cli solution :) – Jarco – 2013-09-10T12:05:30.733

52

In both Foxit Reader and Adobe Reader if you go to File > Properties and then click on the Fonts tab you will be able to see a full list of fonts available in that document, however, there isn't any features in these basic PDF readers that will let you select some text and view the properties for that text to see exactly which font it uses.

For that you need Foxit PDF Editor, Adobe Acrobat or some other PDF editor.

Rowan

Posted 2010-03-08T11:42:32.983

Reputation: 942

3Also, if some fonts are embedded inside the PDF, it doesn't mean they are actually in use. – user2284570 – 2014-12-01T20:28:50.823

44

In Adobe Acrobat X Pro (not for free), you can use the Edit Document Text tool to find out about the font:

  1. Click Tools on the documents menubar in the top right corner to show the side menu of tools.
  2. Open the Content area in the right sidebar and locate the Edit Document Text tool.
  3. Select some text
  4. Right-click and select Properties...
  5. The Text tab of the properties dialog shows the font (you can also change it)

In Adobe Acrobat 9 Pro, you can use the TouchUp Text Tool which is found under (Tools > Advanced Editing > TouchUp Text Tool).

This might also work in other Acrobat versions, but the Tool might be buried somewhere else in Acrobat's menus.

Rabarberski

Posted 2010-03-08T11:42:32.983

Reputation: 7 494

Are there alternatives for Linux users? – zygimantus – 2016-10-13T07:47:01.947

27

I don't know of any way to do what you want other than using some very expensive commercial PDF processing software (such as Enfocus' PitStop or callas' pdfToolbox4).

The closest you can get is the pdffonts.exe commandline utility. That is contained in the XPDF-based tool collection, available here: http://www.foolabs.com/xpdf/download.html (Download: ftp://ftp.foolabs.com/pub/xpdf/xpdfbin-win-3.03.zip ).

If you run

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

the result will show all fonts used on page 22. To see all fonts used in the complete document, just run

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

Kurt Pfeifle

Posted 2010-03-08T11:42:32.983

Reputation: 10 024

It is not clear from the answer but this solution also works on Linux. xpdf is normally available via the package manager, although my package manager references https://www.xpdfreader.com/ as the homepage of xpdf.

– Lucas – 2018-07-20T11:40:01.960

13

While it doesn't preserve layout particularly well, Libre Office http://www.libreoffice.org is able to import PDF files. After importing a pdf, if you click on a text block it will tell you what font was used.

vkiwi

Posted 2010-03-08T11:42:32.983

Reputation: 131

2In LibreOffice (Draw) the fonts look different if you have not installed them, but the font selector shows you the font of the block you have selected. Top answer: free and easy :-) – Alexander Taubenkorb – 2015-09-06T13:01:10.890

Won't work on a Mac, since LibreOffice insists on opening the PDF in Writer, not Draw. – Dɑvïd – 2016-08-17T16:37:05.457

worked for my pdf on a mac – daslicious – 2018-01-22T05:12:44.423

11

If the font is installed on your computer, then maybe copying the text to some word processor does the trick? And even when not installed, some word processors might still show the requested name in their font dialog.

(Other than that: a screen capture and WhatTheFont! might help, if it's worth the trouble. Or select the text, and then "print" the selection to a new PDF document, to see what its font properties shows then?)

Arjan

Posted 2010-03-08T11:42:32.983

Reputation: 29 084

My friend came with the same idea, and seemed to work, am upvoting. But - WhatTheFont did not help at all. First you have to do a lot of manual work in validating the characters extracted from the image. And in the end... "No match found". – Veverke – 2017-03-29T14:13:51.453

9

Meanwhile I found a different method to list fonts used in a PDF (and indicate wether they're embedded or not), which uses Ghostscript only (no need for additional third party utilities). Unfortunately this also does NOT satisfy your requirement to learn about a font used for highlighted text.

This method uses a little utility program, written in PostScript, shipping with the source code of Ghostscript. Look in the toolbin subdir for the pdf_info.ps file.

The included comments say you should run it like this in order to list fonts used, media sizes used

gs -dNODISPLAY ^
   -q ^
   -sFile=____.pdf ^
   [-dDumpMediaSizes] ^
   [-dDumpFontsUsed [-dShowEmbeddedFonts]] ^
   toolbin/pdf_info.ps

I did run it on a local example file. Here is the result:

C:\> gswin32c ^
      -dNODISPLAY ^
      -q ^
      -sFile=SHARE.pdf ^
      -dDumpMediaSizes ^
      -dDumpFontsUsed ^
      -dShowEmbeddedFonts ^
      C:\\pa\\gs\\gs8.64\\lib\\pdf_info.ps

SHARE.pdf has 12 pages.
Title: SHARE_Information_070808.indd
Creator: Adobe InDesign CS2 (4.0)
Producer: Adobe PDF Library 7.0
CreationDate: D:20080808103516+02'00'
ModDate: D:20080808103534+02'00'
Trapped: False

Page 1 MediaBox: [ 595.276 841.89 ] CropBox: [ 595.276 841.89 ]
Page 2 MediaBox: [ 595.276 841.89 ] CropBox: [ 595.276 841.89 ]
Page 3 MediaBox: [ 595.276 841.89 ] CropBox: [ 595.276 841.89 ]
Page 4 MediaBox: [ 595.276 841.89 ] CropBox: [ 595.276 841.89 ]
Page 5 MediaBox: [ 595.276 841.89 ] CropBox: [ 595.276 841.89 ]
Page 6 MediaBox: [ 595.276 841.89 ] CropBox: [ 595.276 841.89 ]
Page 7 MediaBox: [ 595.276 841.89 ] CropBox: [ 595.276 841.89 ]
Page 8 MediaBox: [ 595.276 841.89 ] CropBox: [ 595.276 841.89 ]
Page 9 MediaBox: [ 595.276 841.89 ] CropBox: [ 595.276 841.89 ]
Page 10 MediaBox: [ 595.276 841.89 ] CropBox: [ 595.276 841.89 ]
Page 11 MediaBox: [ 595.276 841.89 ] CropBox: [ 595.276 841.89 ]
Page 12 MediaBox: [ 595.276 841.89 ] CropBox: [ 595.276 841.89 ]

Font or CIDFont resources used:
DKCTOS+FrutigerLT-BlackCn
DKCTOS+FrutigerLT-BoldItalic
DKCTOS+Wingdings3
TIELEM+FrutigerLT-Black
TIELEM+FrutigerLT-Bold
TIELEM+FrutigerLT-BoldCn
TIELEM+FrutigerLT-Cn
TIELEM+FrutigerLT-Italic
TIELEM+FrutigerLT-UltraBlack
TIELEM+TimesNewRomanPS-BoldItalicMT

Kurt Pfeifle

Posted 2010-03-08T11:42:32.983

Reputation: 10 024

Can no longer find pdf_info.ps in the /usr/share/ghostscript/9.18/lib directory (Ubuntu). Also, can't find it at the git. Any other ideas?

– Diagon – 2016-10-10T19:29:41.900

6

Sounds like the fonts tab in Adobe Reader is an easy solution.

But another way would be to select the text, copy and paste into Word, and you should be able to determine the front in Word if it copies the formatting like it did for me.

user274205

Posted 2010-03-08T11:42:32.983

Reputation: 61

1No! The font tab list fonts which are embedded in the PDF file it doesn't mean they are used. – user2284570 – 2014-12-01T21:03:03.953

5

Rowan's answer is fine, and if you really need to narrow it down to a small portion of a complex document, try to re-print a subset to another PDF (there are excellent free PDF printers, if you don't have one), and check the font properties of the resulting file.

Fa3ien

Posted 2010-03-08T11:42:32.983

Reputation: 73

4

An easier solution is just to use Adobe Reader X and to right-click anywhere in the document, choose "Document Properties", then click on the tab "Fonts". There you see a list of all fonts used in the document.

andli

Posted 2010-03-08T11:42:32.983

Reputation: 41

2@andeh : No! This list the fonts which are embedded in the PDF file it doesn't mean they are used. – user2284570 – 2014-12-01T21:02:00.463

1Does this apply for a selected part of the document as per the OP's question or for the whole document? – Tog – 2013-10-28T14:19:30.987

It's a list for the whole document yes, but I used it myself after having the same problem as OP and it worked great. It would be problematic if there are tons of different fonts used in the doc though. – andli – 2013-10-30T20:46:15.323

3

Another solution is to open the PDF file with Adobe Illustrator, if the fonts are not streamlined you'll be able to know which fonts you are using.

vitto

Posted 2010-03-08T11:42:32.983

Reputation: 371

If the fonts are not installed, you will see their names displayed in the "Missing fonts" window. Perfect solution. – xApple – 2017-02-20T18:32:14.077

2

In Adobe Reader XI go to File -> Properties and click the Fonts tab. They are all there. Super easy, and free

Yitz Pierce

Posted 2010-03-08T11:42:32.983

Reputation: 37