Question
ColdFusion 2021, cfhtmltopdf & SegoeUI Font
ColdFusion 2021 and cfhtmltopdf fail to correctly render a PDF that uses the SegoeUI font. ColdFusion Admin indicates the font is installed. The PDF is generated but there is no visible text. Inspection of the generated PDF indicates there are no embedded fonts.
Code to Reproduce Problem
<cfset fntPsName = "SegoeUI">
<cfsavecontent variable="pdfContent">
<!DOCTYPE html>
<html>
<head>
<style>
body {
<cfoutput>
font-family: #fntPsName# ;
</cfoutput>
font-size: 18px;
color: black;
font-style: normal;
font-weight: normal;
background-color: white;
}
</style>
<title><cfoutput>#fntPsName#</cfoutput></title>
</head>
<body>
<cfoutput>
<h1>#fntPsName#</h1>
</cfoutput>
<!--- https://www.lipsum.com/ --->
<h1>What is Lorem Ipsum?</h1>
<p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</body>
</html>
</cfsavecontent>
<cfhtmltopdf
name="pdfDoc"
pageType="letter"
orientation="portrait"
destination="#fntPsName#.pdf"
overwrite="true"
>
<cfoutput>#pdfContent#</cfoutput>
</cfhtmltopdf>
Environment
| Server Product | ColdFusion 2021 |
| Version | 2021,0,01,325996 |
| Edition | Developer |
| Operating System | Windows 7 |
| OS Version | 6.1 |
Question
How do I get ColdFusion 2021 to generate a PDF using the SegoeUI font?
