Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Embedded TrueType font being replaced when displaying PDF file on client computers

$
0
0
Hi 

We are using the Aspose.Pdf.Generator.Pdf class to create a simple PDF document from an xml template by calling BindXML

The template has text objects using a custom "Santos" true type font
The font is installed on the box where the pdf generation code is running.
When we display the pdf file on a different computer the font is automatically replaced by Adobe Reader 

We have attached the xml template, font file and resulting pdf. Also copied xml template in post body
Could you let us know why the font file is not being embedded in the pdf output ? Thanks

<?xml version="1.0" encoding="utf-8" ?>
<Pdf xmlns="Aspose.Pdf">
  <Section PageWidth="29.7cm" PageHeight="21.0cm"  PageMarginRight="0" PageMarginTop="0" PageMarginLeft="0" PageMarginBottom="0" >

      <Text MarginTop="2.0cm" MarginLeft="2.0cm" FontSize="18" Color="Black" >
            <Segment IsTrueTypeFontBold="true" FontName="Santos" IsFontEmbedded="True" >Santos</Segment>
      </Text>

    <Table MarginTop="1.0cm" MarginLeft="2.0cm" ColumnWidths="12 9" FontSize="18" FontName="Santos" IsFontEmbedded="True" IsTrueTypeFontBold="true" Color="Blue"
     DefaultCellPaddingTop="0" DefaultCellPaddingLeft="0" DefaultCellPaddingRight="0" DefaultCellPaddingBottom="0">
      <DefaultCellBorder>
        <All LineWidth="0"></All>
      </DefaultCellBorder>
      <Border>
        <All LineWidth="0"></All>
      </Border>
      <!-- Workaround to get Santos font displaying properly -->
      <Row>
        <Cell>
          <Text>
            <Segment>S</Segment>
          </Text>
        </Cell>
        <Cell>
          <Text>
            <Segment>a</Segment>
          </Text>
        </Cell>
      </Row>
    </Table>
  </Section>
</Pdf>

Viewing all articles
Browse latest Browse all 3131

Trending Articles