Posted on 2013-02-01
Last Modified: 2013-02-05
I've been playing around with cfdocument and it's driving me absolutely nuts!  I have a simple page that looks something like this

<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="styles.css">

<cfinclude teamplate="title.cfm">

Tjos os a test


When i wrap  a cfdocument around this, it creates the PDF just fine, however the problem I'm having is that the included template does not pickup my stiles.   I don't know what to do to get this fixed.  I want Aial.  Any thoughts.  Thanks in advance
Question by:trifecta2k
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 36

Assisted Solution

SidFishes earned 500 total points
ID: 38845391
You can't use  link to the style sheet. You need to use @import

It's also picky about doctype

more here

Author Comment

ID: 38847650
I will try that and let you know. Probably won't be able to get to it until Monday.

Author Comment

ID: 38851223
I did everything and it works for the most part.  I still have one weird issue.  In my PDF I use <cfimage>.  This block isn't hit all the time because some reports have a chart and some don't.  When it hits the <cfimage> tag the font size seems to resize.  Any ideas?  These reports need to look uniform and right now they change size when I add an image.
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

LVL 36

Expert Comment

ID: 38851345
not specifically but there are a couple of things to try

1) make sure you are fully patched. There have been many, many cfdocument issues fixed since the tag was introduced.
2) unless there's a compelling reason, don't use cfimage within the tag. Do whatever image manipulation you need to, write it to disk and then load with a simple <img> tag.

Author Comment

ID: 38851905
I am fully patched.  I tried just using a regular img and my pdf still looks like it's scaling down.
LVL 36

Accepted Solution

SidFishes earned 500 total points
ID: 38855924
From what I've seen images with resolution higher than 96 dpi may cuase this scaling issue - you could see if making sure that is the case helps.

you also may want to try forcing the page size of cfdocument by adding the pagetype="letter" attribute (I'd try this one first if you haven't already)

Author Comment

ID: 38856569
That was it!  Between the pagetype and the css doc I got it to work.  Thanks!

Featured Post

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question