How can I extract embedded fonts from a PDF as valid font files?

后端 未结 8 994
独厮守ぢ
独厮守ぢ 2020-11-28 17:37

I\'m aware of the pdftk.exe utility that can indicate which fonts are used by a PDF, and wether they are embedded or not.

Now the problem: given I had P

相关标签:
8条回答
  • 2020-11-28 17:43

    One of the best online tools currently available to extract pdf fonts is http://www.pdfconvertonline.com/extract-pdf-fonts-online.html

    0 讨论(0)
  • 2020-11-28 17:43

    This is a followup to the font-forge section of @Kurt Pfeifle's answer, specific to Red Hat (and possibly other Linux distros).

    1. After opening the PDF and selecting the font you want, you will want to select "File -> Generate Fonts..." option.
    2. If there are errors in the file, you can choose to ignore them or save the file and edit them. Most of the errors can be fixed automatically if you click "Fix" enough times.
    3. Click "Element -> Font Info...", and "Fontname", "Family Name" and "Name for Humans" are all set to values you like. If not, modify them and save the file somewhere. These names will determine how your font appears on the system.
    4. Select your file name and click "Save..."

    Once you have your TTF file, you can install it on your system by

    1. Copying it to folder /usr/share/fonts (as root)
    2. Running fc-cache -f /usr/share/fonts/ (as root)
    0 讨论(0)
  • 2020-11-28 17:45

    PDF2SVG version 6.0 from PDFTron does a reasonable job. It produces OpenType (.otf) fonts by default. Use --preserve_fontnames to preserve "the font/font-family naming scheme as obtained from the source file."

    PDF2SVG is a commercial product, but you can download a free demo executable (which includes watermarks on the SVG output but doesn't otherwise restrict usage). There may be other PDFTron products that also extract fonts, but I only recently discovered PDF2SVG myself.

    0 讨论(0)
  • 2020-11-28 17:53

    Even though this question is 10 years old, it is still valid and as technology changes so does a valid answer.

    In searching the current answers noticed none of them note WOFF (Web Open Font Format) (W3C) (Wikipedia) which can be used to recreate the individual characters (glyphs) and display them in a web page accurately.

    Using the free online web page by IDR Solutions, PDF to HTML5 (link), convert a PDF to a zip file. In the resulting zip will be a font directory of woff file types. Current Internet browsers support woff files if you were not aware. (reference) These can be examined at the online site FontDrop! (link).

    WOFF files can be converted to/from OTF or TTF at WOFFer – WOFF font converter

    Also the zip file from PDF to HTML5 will contain an HTML file for each page of the PDF that can be opened in an Internet browser and is one of the best and most accurate PDF translations I have found or seen.

    While I am just learning how to use WOFF files, this is worth passing along. Enjoy.

    PS, I will probably update with more info as I learn more about using woff file types, but as this is creative commons, feel free to edit this answer if you have something of value to pass along.

    0 讨论(0)
  • 2020-11-28 17:58

    http://www.verypdf.com/app/pdf-font-extractor/pdf-font-extracting-tool.html IMO easiest way to extract fonts (Windows).

    0 讨论(0)
  • 2020-11-28 18:02

    Use online service http://www.extractpdf.com. No need to install anything.

    0 讨论(0)
提交回复
热议问题