Tiono
2005-07-19 03:08:41 UTC
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>
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>