Skip to content
ComPDF

Output Font Option

Overview

In some output formats, you can set the preferred font name to unify the default font style in the output document.

Supported Formats

The FontName option currently applies to the following formats:

  • PDF to Word
  • PDF to Excel
  • PDF to PowerPoint
  • PDF to Searchable PDF
  • PDF to OFD

Example

The following example demonstrates how to set the preferred font name for the output document.

go
inputFilePath := "***"
password := "***"
outputFileName := "***"

wordOptions := compdf.NewWordOptions()
wordOptions.FontName = "Arial"
err := compdf.StartPDFToWord(inputFilePath, password, outputFileName, wordOptions, nil)