Back to Devexpress

PdfExportOptions.NonEmbeddedFonts Property

officefileapi-devexpress-dot-docs-dot-presentation-dot-export-dot-pdfexportoptions-bf5a9fac.md

latest2.6 KB
Original Source

PdfExportOptions.NonEmbeddedFonts Property

Gets or sets a list of font names that should not be embedded in the resulting PDF file.

Namespace : DevExpress.Docs.Presentation.Export

Assembly : DevExpress.Docs.Presentation.v25.2.dll

NuGet Package : DevExpress.Docs.Presentation

Declaration

csharp
public string NonEmbeddedFonts { get; set; }
vb
Public Property NonEmbeddedFonts As String

Property Value

TypeDescription
String

A semicolon-delimited string of non-embedded font names.

|

Remarks

Use the NonEmbeddedFonts property to specify which fonts should not be embedded into the resulting PDF file. Set NonEmbeddedFonts to * to exclude all fonts.

Detach fonts from your PDF to reduce file size. Make sure that the client machine has the non-embedded fonts installed. Otherwise, the system substitutes symbols from these fonts with default font symbols, or displays these symbols incorrectly.

The following code snippet specifies non-embedded fonts for the exported PDF file:

csharp
using DevExpress.Docs.Presentation;
using DevExpress.Docs.Presentation.Export;
//...
using (var presentation = new Presentation(File.ReadAllBytes("C:\\Documents\\Presentation.pptx")))
{
    var options = new PdfExportOptions();
    options.ExportHiddenSlides = true;
    options.NonEmbeddedFonts = "Helvetica;Aptos;Tahoma";
    presentation.ExportToPdf("C:\\Documents\\Presentation_upd.pdf", options);
}
vb
Imports DevExpress.Docs.Presentation
Imports DevExpress.Docs.Presentation.Export
'...
Using presentation = New Presentation(File.ReadAllBytes("C:\Documents\Presentation.pptx"))
  Dim options = New PdfExportOptions()
  options.ExportHiddenSlides = True
  options.NonEmbeddedFonts = "Helvetica;Aptos;Tahoma"
  presentation.ExportToPdf("C:\Documents\Presentation_upd.pdf", options)
End Using

See Also

PdfExportOptions Class

PdfExportOptions Members

DevExpress.Docs.Presentation.Export Namespace