UseProjectDefaultFont

PdfSaveOptions.UseProjectDefaultFont property

Gets or sets a value indicating whether the default font must be used for rendering.

public bool UseProjectDefaultFont { get; set; }

Remarks

When the value is False and DefaultFontName is specified, the rendering engine will utilize the font specified by DefaultFontName as a fallback font. Otherwise ‘Arial’ (if installed) or ‘Generic Sans Serif’ fonts are used as a fallback font. The fallback font is utilized during the rendering of project view when a text style references a font that is not installed on the current operating system. For greater control over font resolution you can use FontResolveCallback callback.

Examples

Shows how to set custom font that will be used for print of output pdf.

var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");

var options = new PdfSaveOptions
                  {
                      PresentationFormat = PresentationFormat.GanttChart, FitContent = true, UseProjectDefaultFont = false, DefaultFontName = "Segoe UI Black"
                  };
project.Save(OutDir + "CreateProject2_out.pdf", options);

See Also