Sumatrapdf: Show font information in (PDF) file Properties window

Created on 10 Dec 2014  路  16Comments  路  Source: sumatrapdfreader/sumatrapdf

pdffonts is a handy tool supplied in the Poppler library. It shows the information of all the fonts used in a PDF file: name, type, encoding, embeded or not etc.

Is it possible to use this in SumatraPDF to show font information as a separate tab in the document Properties dialog? It's always very useful to know which fonts and in what encoding are included in a PDF if for example you're trying to recreate it in HTML5+CSS3 for instance by using https://github.com/coolwanglu/pdf2htmlEX.

Most helpful comment

Any update on this? Would be great if it was built into the default version. Evince (Linux) does it just fine and fast as far as I can tell, maybe look into how they've done it?

All 16 comments

We've already been experimenting with showing font information. The main problem is currently that retrieving that information can take quite a while and we don't have an easy way to update the Properties dialog when that information is available.

If you want to give it a try, get a build from http://www.zeniko.ch/#SumatraPDF , open a document then and hit Ctrl+D twice (the first opens the Properties dialog, the second shows the font information - possible after quite a delay).

@zeniko: Sounds awesome, I can't wait for this to become more stable and to be released with the newer versions of the official builds.

Maybe a progress bar could appear in the Fonts tab of Properties until the information is gathered...

@zeniko, many thanks for the implementation.

Any update on this? Would be great if it was built into the default version. Evince (Linux) does it just fine and fast as far as I can tell, maybe look into how they've done it?

@sudoeric I found myself in need of this feature today. The CTRL+D twice trick doesn't work in Sumatra 3.1.1 and the one on zeniko.ch seems to be outdated (3.1).

But I found Evince is available for Windows, and the font detection works just fine. Thank you for the suggestion!

I hope this gets added to Sumatra some day.

Here is what Evince looks like, and it was available as soon as I was able to find the menu, no loading bar needed:

evince_2017-02-21_10-57-14

The irony is that since Feb 2018 Evince is only available for Linux flavors or as a source code. They don't build Windows versions anymore since

there is no-one that can maintain that.

TL; DR: It would be really nice if SumatraPDF were able to reveal font info reliably and out of the box.

@andselisk, the link to the _Windows_ binary for _Evince_ is https://mail.gnome.org/archives/evince-list/2018-April/msg00002.html.

@zeniko, contains a binary, but it shows no font info. Would it be possible that you contribute the code to the development version of _SumatraPDF_?

I came back to this over a year later and found myself using the Evince version that Ousia pointed out
(thanks). Still hoping Sumatra adds the feature some day!

from the links above
Evince w32-3.26.0-1-installer is about 200 MB or evince-w64-3.26.0-2-installer.exe = 205.64 MB
after a long time it unpacks to over 700MB (that's more than 30,300 files in 1,453 folders) WTF !!

from above SumatraPDF-dev.exe (one single file suited to portable use) is 2.52 MB

Evince should be able to knock the spots off SumatraPDF when it finally loads (admittedly it does have basic annotation etc)
however
Sumatra can report Courier New and Georgia for its settings.txt file (try that in Evince and you get File type Text Document (text/plain) is not supported)
for the Bible de Gen猫ve, 1564 example downloaded from first link SumatraPDF reports EXACTLY THE SAME 3 variants of EBGaramond as evince does
However SumatraPDF will directly file open URL http://dl.fullcirclemagazine.org/issue65_en.pdf from the third example (can't try that in Evince) and reports 9 unique fonts including 5 Scribus Outlines (Fo7SO etc.) whereas Evince needs the file to be downloaded first and reports 29 fonts (4 fonts reported multiple times) and can't name the 5 Scribus Outline Fonts

@GitHubRulesOK I wasn't trying to say that Evince was better or anything. I love Sumatra PDF and prefer it over anything else for reading PDFs. But I get design files from designers who think PDFs are a viable format for web design (it's not) and I need to detect fonts in the PDF to know what specific families, weights and styles are used.

Sumatra to my knowledge can't detect fonts. There was apparently an option to press CTRL+D twice but that doesn't do anything.

Are you saying that Sumatra does have this feature? How do you use it?

I was not critiquing your post just comparing apples with pears
Use Zeniko's link above to get (DEVelopers) build, it may be older 3.1.1 pre-release but you can CtrlD+CtrlD+CtrlC the second screen and get output like this (Evince will not let you copy details, and neither will confirm the font size rendered, simply family and style, see below)

File: C:\Users\K\Desktopgit鎼缓.pdf
Title: Git Tutorial
Author: Li Yanrui
Created: 05/08/2008 15:38:08
Modified: ConTeXt - 2008.07.30 11:51
Application: ConTeXt - 2008.07.30 11:51
PDF Producer: luaTeX-0.28.0
PDF Version: 1.5
File Size: 303.83 KB (311,120 Bytes)
Number of Pages: 19
Page Size: 21.01 x 29.7 cm (A4)

Fonts: AdobeHeitiStd-Regular (Type1 (CID); Identity-H; embedded)
AdobeKaitiStd-Regular (Type1 (CID); Identity-H; embedded)
AdobeSongStd-Light (Type1 (CID); Identity-H; embedded)
LMMono10-Regular (Type1 (CID); Identity-H; embedded)
LMRoman7-Bold (Type1 (CID); Identity-H; embedded)
LMRoman10-Bold (Type1 (CID); Identity-H; embedded)
LMRoman10-Regular (Type1 (CID); Identity-H; embedded)

@RadGH
PS forgot to mention beware hitting H will highlight selected text :-)
use "save as" so you dont corrupt the original or change
AnnotationDefaults [
HighlightColor = #ffff60
SaveIntoDocument = false

Also this Z version unlike acrobat will allow copying restricted text the same way as Evince :-)

@GitHubRulesOK Thanks for clarifying and sorry for the delay. I had the need to try this again and just tested with your instructions. Looks like that dev build does get the fonts just fine :)

I wonder why this isn't part of the latest version? Hmmm!

image

Although you cant check each text element for font type, a bonus is you can highlight in colour (though NOT comment) any text you want others to change. Anything more detailed will require a pdf analyser.

@kjk since I have seen this feature working in alternative builds, is there any reason it cant be enabled in pre-release or better yet in full release ?

Closing as incorporated as part of wider feature request to more importantly highlight font failures per #350

@kjk @ @GitHubRulesOK , you guys are amazing!
Great wrok!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

suckerstate picture suckerstate  路  22Comments

joshua1000 picture joshua1000  路  26Comments

StefanMich picture StefanMich  路  25Comments

kjk picture kjk  路  25Comments

nbrummerstedt picture nbrummerstedt  路  15Comments