Discussion:
CFDocument PDF text style format not working
(too old to reply)
Tiono
2005-07-19 03:08:41 UTC
Permalink
I try to output HTML as PDF using CFDOCUMENT tag, but result PDF document
didn't keep the style format of HTML. When I output as Flashpaper or preview
output as HTML in web browser, the style format is correct.

Output PDF document always use "Times New Roman" font-face where it should be
Arial. Anyone know why this happen?

Here is my code :




<cfdocument format="PDF" overwrite="yes" filename =
"#Application.stApp.upload_dir[1]#/document/pdf/test.pdf"
pagetype="#selPaper#" margintop="#voritop#" marginbottom="#voribottom#"
marginleft="#vorileft#"
marginright="#voriright#" unit="cm">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Print Template</title>
<link rel="stylesheet" href="include/default.css" type="text/css"
id="idTemplateStyle">
<script>
this.moveTo(0,0)
this.outerWidth = screen.availWidth
this.outerHeight = screen.availHeight
</script>
</head>

<body style="font-family:Arial; font-size:10pt">
<FONT face=Arial>
?berstunden: Nach Erreichen der t?glichen Normalarbeitszeit
<BR>Zulagen: Lt. gesetzlichen Bestimmungen
</FONT>
</body>
</html>
</cfdocument>
Tiono
2005-07-21 02:42:47 UTC
Permalink
Is it only me who ever get this problem? I've tried using <FONT> , using CSS
that define font-family, but still PDF generated by cfdocument always use times
new roman font. :(
font-size work when i use CSS.

somebody please tell me what is wrong
Stressed_Simon
2005-07-21 11:40:31 UTC
Permalink
It will only use fonts that are installed on the CF App Server, you can check what is available in the CF Administrator.
Tiono
2005-07-25 03:05:28 UTC
Permalink
You are correct. I must installed the font first at CF administrator. Thanks a lot for your help Mr. Simon.
Loading...