Skip to content
ComPDF
DemoFAQ
New Release

Open-Source PDF SDK & AI Document Processing

Get the full self-hosted SDK and AI document processing on GitHub. One-click deploy to quickly build your document workflows.

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.

kotlin
val wordOptions = WordOptions()
wordOptions.fontName = "Arial"
val error = ComPDFKitConverter.startPDFToWord("word.pdf", "", "output.docx", wordOptions)