Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
use only
<style type="text/css">
@import url("../../../comun/file_name.css");
</style>
Copy link to clipboard
Copied
I wrote a chapter in LearnCFInAWeek.com that may be of great help to you: http://learncfinaweek.com/week1/cfdocument/
Copy link to clipboard
Copied
This works for me:
<cfoutput>
<cfdocument
format="PDF"
pagetype="A4"
orientation="portrait"
fontEmbed="true"
unit="cm"
localUrl="true">
<html>
<head>
<title>Test mit cfdocument</title>
<cfinclude template="./css/style.cfm"/>
</head>
<body>
<img src="#localUrl("images/pay.png")#" />
<img src="#localUrl("images/prowin.png")#" />
<p id="backky" class="test">Say something</p>
</body>
</html>
</cfdocument>
<cffunction name="localUrl" >
<cfargument name="file" />
<cfreturn "file:///#ExpandPath(file)#">
</cffunction>
</cfoutput>
style.cfm
<style>
.test {
color: red !important;
background-color: black !important;
}
#backky {
color: red !important;
background-color: black !important;
}
</style>
Copy link to clipboard
Copied
you don´t need !important in style.cfm
Copy link to clipboard
Copied
The original question is no longer relevant. It was asked 14 years ago, when CFDocument was still in its infancy. CFDocument has developed substantially since.