Bug 60350 - show fonts used in PS/PDF-file in metainfo tag
Summary: show fonts used in PS/PDF-file in metainfo tag
Status: RESOLVED WORKSFORME
Alias: None
Product: kfile-plugins
Classification: Applications
Component: ps (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Carsten Pfeiffer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-25 16:34 UTC by Joerg de la Haye
Modified: 2006-12-09 12:50 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg de la Haye 2003-06-25 16:34:53 UTC
Version:            (using KDE KDE 3.1.2)
Installed from:    Debian testing/unstable Packages

It would be nice to show the fonts that are used in a ps- or pdf-file and if they are embedded or not with the metainfo-tag from the ps- and pdf-kfileplugins.
Comment 1 Brad Hards 2005-06-17 13:23:24 UTC
I've looked at using a new feature in Poppler, but under some circumstances this may take a very long time (several minutes). Would it be enough to sample the first few pages?
Comment 2 rgpublic 2005-06-17 15:49:44 UTC
Unfortunately not for professional use. And that's where this
feature is mostly needed. The average user isnt really interested in
which fonts are in there. And a professional user needs to be *sure*
which fonts are in there and which not. Mistakes here can be expensive
in production later. So guessing from the first pages is not really
an option IMO. Fonts can quite often appear later in a document.
Take for example back pages or pages between chapters. They often have
a different design, sometimes using different/additional fonts and
appear later in a document.
When I hover over a movie file for example there is first no thumbnail
but the other information is there. After some time the missing thumbnail
appears. Cant some kind of delay mechanism be applied here?
Comment 3 Joerg de la Haye 2005-06-22 18:18:40 UTC
I agree with Comment #2, it isn't enough to sample the first pages only. But I can't imagine that this is too hard to implement.

For pdf-files you should have a look at the command line tool "pdffonts" which is part of the xpdf utilities. It shows all the fonts used inside a pdf, and it gives you a fairly quick output, even if it is a larger file (I've tested it with a 5,3 MB pdf containing text and several images on 265 pages).

I'm not sure how to solve it for ps-files, but if you create a ps within KDE (e.g. a text with koffice) and use an editor to a look at the new ps-file there's a postscript tag "DocumentFonts" which lists all the fonts used in the given document.

Comment 4 Brad Hards 2005-06-23 13:18:37 UTC
I have played with it within poppler, and it isn't going to be very hard (except that sometimes the font labels are a bit strange, not sure why). But it is slow - 25 seconds on my 1.2GHz laptop to extract the fonts from the PDF specification. That is a lot of stuff to work through in a directory of PDF files...

I'd be happier doing it inside KPDF.

Note that I haven't looked at the Postscript issues at all - I'm just considering the PDF part first.
Comment 5 Joerg de la Haye 2005-06-23 13:47:24 UTC
As poppler is based on xpdf it should be nearly the same code as used in the pdffonts-tool, I guess.

Maybe you're right and it makes more sense to implement that font function as a part of the document properties in KPDF than to put it in a metainfo tag.
Comment 6 Brad Hards 2006-12-09 07:09:45 UTC
You are right in that it is nearly the same code.  However pdffonts is also quite slow.

If you are happy just to have that functionality in KPDF, then please close this wishlist item.
Comment 7 Joerg de la Haye 2006-12-09 12:50:54 UTC
I'm closing this wishlist item, as it seems to be not so easy to implement it in a metainfo tag and kpdf already gives you the font information.