cfhtmltopdf不使用googleapis字体
为什么cfhtmltopdf不显示googleapis字体cfhtmltopdf不使用googleapis字体,pdf,coldfusion,Pdf,Coldfusion,为什么cfhtmltopdf不显示googleapis字体 <cfhtmltopdf encryption = "AES_128"> <html> <head> <!--Add GoogleFonts--> <link href="https://fonts.googleapis.com/css?family=Aguafina+Script|Alex+Brush|Bilbo|Condiment|Great+Vibes|Herr+V
<cfhtmltopdf encryption = "AES_128">
<html>
<head>
<!--Add GoogleFonts-->
<link href="https://fonts.googleapis.com/css?family=Aguafina+Script|Alex+Brush|Bilbo|Condiment|Great+Vibes|Herr+Von+Muellerhoff|Kristi|Meddon|Monsieur+La+Doulaise|Norican|Nothing+You+Could+Do|Parisienne|Permanent+Marker|Sacramento|Yellowtail" rel="stylesheet">
</head>
<body>
<p id="displaySignature" style="font-family: Meddon, cursive; font-size: 30px;">Test</p>
</body>
</html>
</cfhtmltopdf>
它忽略字体样式 如果您查看,请使用
将CSS文件的内容导入HTML。使用@import实际上会延迟加载包含的资源,直到获取文件为止,这可能正是您所需要的 您可以转到ColdFusion管理员->服务器设置->字体管理,导入所需的字体,然后重试。这可能是时间问题。Google web字体需要先加载才能使用,我猜cfhtmltopdf不会等到加载,或者可能不会加载外部字体。我认为它不会加载外部字体。你知道使用ColdFusion在pdf中显示它的方法吗?请查看下面的答案。。。也许这样行。看起来您应该能够使用外部字体,但您可能需要使用cfhtmltopdf之外的其他字体。这也可能取决于您使用的ACF/Lucee版本。Ortus刚刚为Lucee推出了一个PDF生成器。我刚刚使用WKHTMLTOPDF.exe测试了初始HTML示例w/GoogleFonts,我使用了WKHTMLTOPDF.exe,而不是CFPDF&CFHTMLTOPDF,它生成了一个完美的PDF,而无需跳转添加JS延迟,甚至在传统web服务器上托管HTML文件。语法:wkhtmltopdf.exe test.htm test.pdfDo我需要在我的服务器中安装wkhtmltopdf吗?谢谢,但仍然无法工作。我认为cfhtmltopdf不支持外部fontsCan,您可以添加需要更改的内容的屏幕截图,并且可以正常工作吗?
@import url('https://fonts.googleapis.com/css?family=Open+Sans');