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.
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Coldfusion CFMESSAGEBOX Passing Variables 6 138
multi page pdf 4 100
<cffile cannot delete a file 4 66
segregating a list into two lists 4 82
PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below.…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

733 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