Skip to main content
pintuk86858408
Participant
May 6, 2024
질문

Issue when we are using font calibri - It is not displayed in PDF

  • May 6, 2024
  • 1 답변
  • 2011 조회
We are using cfhtmltopdf and inside calibri font block, content is not displaying in PDF
 

 

<cfhtmltopdf destination="FILEPATH" overwrite="true" orientation="portrait" unit="in" marginbottom="0.25" marginleft="0.25" marginright="0.25" margintop="0.25">
  <cfprocessingdirective pageencoding="utf-8">

	DISPLAYED IN PDF

	<div style="font-family:calibri;font-size:13pt;">
		THIS IS NOT DISPLAYING IN PDF
	</div>

	DISPLAYED IN PDF
</cfhtmltopdf>	

 

We have installed calibri font. and coldfusion server: 2018.

이 주제는 답변이 닫혔습니다.

1 답변

BKBK
Community Expert
Community Expert
May 7, 2024

A test to try:

  1. Place the cfprocessingdirective tag out of the cfhtmltopdf tag.
  2.  Use calibri,sans-serif in place of calibri.

That is:

<cfprocessingdirective pageencoding="utf-8">
<cfhtmltopdf destination="FILEPATH" overwrite="true" orientation="portrait" unit="in" marginbottom="0.25" marginleft="0.25" marginright="0.25" margintop="0.25">

	DISPLAYED IN PDF

	<div style="font-family:calibri,sans-serif;font-size:13pt;">
		THIS IS NOT DISPLAYING IN PDF
	</div>

	DISPLAYED IN PDF
</cfhtmltopdf>

 

 

pintuk86858408
Participant
May 8, 2024

Hi @BKBK 

 

We are facing still same issue:

 

<cfhtmltopdf destination="FILEPATH" overwrite="true" orientation="portrait" unit="in" marginbottom="0.25" marginleft="0.25" marginright="0.25" margintop="0.25">
	Start PDF
	<div style="font-family:calibri,sans-serif;font-size:13pt;">
		WELCOME
	</div>
	END PDF
</cfhtmltopdf>

 

PDF View Attached

 

BKBK
Community Expert
Community Expert
May 9, 2024

What happens when you add a space after the colon(:), like this:

<div style="font-family: calibri, sans-serif; font-size: 13pt;">
    WELCOME
</div>

Something else to try

<span style="font-family: calibri, sans-serif; font-size: 13pt;">
    WELCOME
</span>