Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show font information in (PDF) file Properties window #23

Open
sahwar opened this issue Dec 10, 2014 · 14 comments

Comments

@sahwar
Copy link

commented Dec 10, 2014

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.

@zeniko

This comment has been minimized.

Copy link
Contributor

commented Dec 10, 2014

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).

@sahwar

This comment has been minimized.

Copy link
Author

commented Dec 10, 2014

@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...

@ousia

This comment has been minimized.

Copy link

commented Feb 13, 2015

@zeniko, many thanks for the implementation.

@ericnchen

This comment has been minimized.

Copy link

commented Apr 21, 2016

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?

@RadGH

This comment has been minimized.

Copy link

commented Feb 21, 2017

@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

@andselisk

This comment has been minimized.

Copy link

commented May 21, 2018

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.

@ousia

This comment has been minimized.

Copy link

commented May 21, 2018

@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?

@RadGH

This comment has been minimized.

Copy link

commented Jul 3, 2018

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!

@GitHubRulesOK

This comment has been minimized.

Copy link

commented Jul 3, 2018

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

@RadGH

This comment has been minimized.

Copy link

commented Jul 4, 2018

@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?

@GitHubRulesOK

This comment has been minimized.

Copy link

commented Jul 4, 2018

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\Desktop\git搭建.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 :-)

@RadGH

This comment has been minimized.

Copy link

commented Sep 8, 2018

@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

@GitHubRulesOK

This comment has been minimized.

Copy link

commented Sep 8, 2018

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.

@GitHubRulesOK

This comment has been minimized.

Copy link

commented Sep 28, 2018

@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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.