Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 598239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:22:02+00:00 2026-05-13T16:22:02+00:00

Is it possible to extract fonts that are embedded in a PDF file to

  • 0

Is it possible to extract fonts that are embedded in a PDF file to an external ttf file using some utility or script?

  1. If the fonts that are embedded (or not embedded) to a PDF file are present in system. Using pdf2swf and swfextract tools from swftools I am able to determine names of the fonts used in a PDF file. Then I can compile respective system font(s) at run-time and then load to my AIR application.

  2. BUT if the fonts used in the PDF are absent in the system there are two possibilities:

    2.1. If they are absent in the PDF files as well (not embedded), we can only use similar system font basing on the font name.

    2.2. If they are embedded in the PDF file, then I want to know is it possible at all to extract them to external ttf file so that I can compile each of them to separate swf files at run-time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:22:03+00:00Added an answer on May 13, 2026 at 4:22 pm

    I know it’s been a while since you asked this, but I figured I might be able to help.

    I don’t know if there is any utility that will allow you to extract the Font files, but you can do it manually.

    Basically a PDF file is a text file with different objects. You can open it with any text editor and look for the fonts.

    The fonts are specified in FontDescriptor objects, e.g:

    <</Type/FontDescriptor/FontName/ABCDEE+Algerian ... /FontFile2 24 0 R>>
    

    This basically says, a font with the name Algerian is specified on the object 24. You can search the document for the object 24 with the line “24 0 obj”, after this line, it displays the properties of the stream with the font file and after the “stream” keyword it starts (its length is defined in the line after the obj).

    This stream contains the ttf file, compressed, to decompress it you can use this method:

      private static byte[] DecodeFlateDecodeData(byte[] data)
      {
         MemoryStream outputStream;
         using (outputStream = new MemoryStream())
         {
            using (var compressedDataStream = new MemoryStream(data))
            {
               // Remove the first two bytes to skip the header (it isn't recognized by the DeflateStream class)
               compressedDataStream.ReadByte();
               compressedDataStream.ReadByte();
    
               var deflateStream = new DeflateStream(compressedDataStream, CompressionMode.Decompress, true);
    
               var decompressedBuffer = new byte[1024];
               int read;
               while ((read = deflateStream.Read(decompressedBuffer, 0, decompressedBuffer.Length)) != 0)
               {
                  outputStream.Write(decompressedBuffer, 0, read);
               }
               outputStream.Flush();
               compressedDataStream.Close();
            }
            return GetStreamBytes(outputStream);
         }
      }
    

    I hope this helps you… or helps somebody else

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know its probably possible, but is it practical and doable to try and
I know its probably possible, but is it practical and doable to try and
I'm trying to build a Chrome browser extension, that should enhance the way the
This is beyond both making sense and my control. That being said here is
I have several USB mass storage flash drives connected to a Ubuntu Linux computer
I am trying to load a html page through UIWebview.I need to disable all
I'm trying to write test harness for part of my Android mapping application. I
I am writing a query to fetch results for all the values in a
My question is about memory use and objects in actionscript 2. If I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.