I have Microsoft Word 2010 and I am trying to use it to create a PDF document with a catch. I do NOT want any of the fonts used embedded. However, all the save options I have tried result in "Embedded Subset" fonts. Is there any way to save as PDF without embedding ANY fonts?

  • 1
    What are you currently using to create these PDFs? PDFs are basically meant to be printed electronic documents and more or less immutable. Also, what are you reading them with that you don't want the fonts actually printed onto the document? What are you using them for? – Austin T French Jun 15 '13 at 1:02
  • I am testing conversion to other image formats (e.g. tiff), and need to test scenarios where the fonts were NOT embedded to be sure they are mapped to something that doesn't throw off alignment and spacing. It's easy enough to generate a word doc that includes all installed system fonts, but I want to save/export as a pdf without the fonts being embedded. – slipsec Jun 17 '13 at 12:45

It is possible to remove all the fonts forming xml document type WordML.

<?xml version="1.0" encoding="UTF-8"?>
<?mso-application progid="Word.Document"?>
    <w:wordDocument xml:space="preserve" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">

        <w:tblW w:w="9570" w:type="dxa"></w:tblW>
         <w:tblBorders> <w:top w:val="nil" /><w:left w:val="nil" /><w:bottom w:val="nil" /><w:right w:val="nil" />

    <w:tcPr><w:tcW w:w="4785" w:type="dxa" /></w:tcPr>  <w:p></w:p>  </w:tc>
    <w:tcPr><w:tcW w:w="4785" w:type="dxa" /></w:tcPr>  <w:p></w:p>  </w:tc>

          <w:tcPr><w:tcW w:w="0" w:type="auto" /></w:tcPr>  <w:p><w:pPr><w:jc w:val="right" /></w:pPr>
       <w:r><w:t>Company: </w:t></w:r> 

          <w:tcPr><w:tcW w:w="0" w:type="auto" />
           <w:tcBorders>      <w:top w:val="single" w:sz="2" w:color="0070C0" />    <w:left w:val="single" w:sz="2" w:color="0070C0" /> <w:bottom w:val="single" w:sz="2" w:color="0070C0" /> <w:right w:val="single" w:sz="2" w:color="0070C0" />
         <w:p><w:pPr><w:jc w:val="left" /></w:pPr><w:r><w:t></w:t></w:r></w:p>

But, even if you delete all the styles and fonts of the original document, Word will assign during the opening of the document style by default. Also, at least one font will be in the Acrobat document when you open it, as if you did not act.

Office WordML XML File, Word load default style:

Office WordML XML File

After save as PDF in Acrobat view one font

Acrobat document font prop

A good solution is to choose at least one font that will still be in the pdf file and use it.

Way 2: Removing Unused Styles from Word

enter image description here

Sub DeleteUnusedStyles()
    Dim oStyle As Style
    For Each oStyle In ActiveDocument.Styles
        ‘Only check out non-built-in styles
        If oStyle.BuiltIn = False Then
            With ActiveDocument.Content.Find
                .Style = oStyle.NameLocal
                .Execute FindText:=””, Format:=True
                If .Found = False Then oStyle.Delete
            End With
        End If
    Next oStyle
End Sub 

See Format Fonts for Text Field Default Values

Style almost always includes the font and font size used for the determination of other sizes. Paragraph, line spacing, and so on ... If you need a different style mechanics generate the document itself. Including substitute fonts. If the final PDF document then use the built-in Adobe JavaScript. Or Adobe LiveCycle Designer ES and XDP XML.

Font at Adobe LiveCycle Designer XDP XML

Using Acrobat JavaScript in Forms: Importing and Exporting Form Data

XML Forms Architecture PDF!

|improve this answer|||||
  • Won't this remove the style settings themselves not the embedded fonts? I want to retain the style, but remove the embedded fonts to force a "guess" for mapping by the conversion software I'm trying to test. – slipsec Jun 17 '13 at 12:47
  • @slipsec May be need create PDF manualy? – STTR Jun 17 '13 at 14:16
  • @slipsec, You might need to use a paid third party component to achieve this. – Adam Jun 18 '13 at 10:13
  • used iText, will post when I have it finished. – slipsec Jun 18 '13 at 15:55
#by default fonts are NOT embedded
#[iTextSharp.text.FontFactory]::DefaultEmbedding -eq false

$doc = New-Object iTextSharp.text.Document
$fileStream = New-Object IO.FileStream("C:\foo\test\allFonts2.pdf", [System.IO.FileMode]::Create)
[iTextSharp.text.pdf.PdfWriter]::GetInstance($doc, $filestream)

#iTextSharp provides a class to work with fonts, but first we have to register them:

#Phrase is the smallest bit of text that will understand a newline if needed.  it is a chunk[] and paragraph is a phrase[]
$phrase = new-object iTextSharp.text.Phrase 
$paragraph = New-Object iTextSharp.text.Paragraph

#Different fonts for mapping tests
$fN = [iTextSharp.text.Font]::NORMAL
$fB = [iTextSharp.text.Font]::BOLD
$fI = [iTextSharp.text.Font]::ITALIC
$fBI = [iTextSharp.text.Font]::BOLDITALIC

#Sample string
$string = "The quick brown fox jumps over the lazy dog 1234567890 ?.,:;!@#$%^&*()`"'`n"
#something I know maps nicely (I love fixed width fonts!)
$consolas = [iTextSharp.text.FontFactory]::GetFont("consolas", 9)

#create all the nesting needed.
[iTextSharp.text.FontFactory]::RegisteredFamilies | %{

    $chunk = new-object iTextSharp.text.Chunk("`n$_`n", $consolas)
    $phrase.Add($chunk) | out-null

    $a = [iTextSharp.text.FontFactory]::GetFont($_, 9, $fN)
    "adding font: $_"
    $chunk = new-object iTextSharp.text.Chunk($string, $a)
    $phrase.Add($chunk) | out-null

    $b = [iTextSharp.text.FontFactory]::GetFont($_, 9, $fB)
    $chunk = new-object iTextSharp.text.Chunk($string, $b) 
    $phrase.Add($chunk) | out-null

    $c = [iTextSharp.text.FontFactory]::GetFont($_, 9, $fI)
    $chunk = new-object iTextSharp.text.Chunk($string, $c) 
    $phrase.Add($chunk) | out-null

    $d = [iTextSharp.text.FontFactory]::GetFont($_, 9, $fBI)
    $chunk = new-object iTextSharp.text.Chunk($string, $d) 
    $phrase.Add($chunk) | out-null

$paragraph.add($phrase) | out-null
$doc.add($paragraph) | out-null
|improve this answer|||||
  • Can you explain, what is it? – turbanoff Oct 1 '15 at 20:21
  • @turbanoff Looks like Powershell with the itextsharp PDF library (for .NET). – Bob May 13 '16 at 6:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.