PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
In some output formats, you can set the preferred font name to unify the default font style in the output document.
The fontName option currently applies to the following formats:
For Searchable PDF and OFD, fontName controls the font used for the invisible (or visible) text layer that is overlaid on the page background. For Word, Excel and PowerPoint, it sets the preferred default font of the generated document.
The following example demonstrates how to set the preferred font name for the output document.
$option = new ConvertOption();
$option->fontName = 'Arial';
Conversion::convert('Word', 'word.pdf', 'password', 'output.docx', $option);