• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 499
  • Last Modified:

cfdocument not embedding images or fonts.

I have the following cfdocument tag that is not embedding the CSS style fonts or the images into the pdf.  I am using macromedia MX package.

<cfdocument format="pdf" fontembed="yes" filename="pdfs/travel/#date#_#time#_#name#_travel.pdf" marginbottom=".25" margintop="1" marginleft=".25" marginright=".25" pagetype="letter" orientation="portrait" overwrite="yes">
  <link href="forms.css" rel="stylesheet" type="text/css">
<img src="images/head.jpg">
   <p class="pagehead" align="left">Travel Request Form</p>
  <p class="greyital">Date submitted: #Form.date#</p><br>
  <table width="700" border="1" align="left" cellpadding="2" cellspacing="2">
    <tr>
      <td class="blackparag" bordercolor="##FFFFFF">Destination: #form.dest# <br>
        <br>
        Inclusive dates of travel - From: #form.datestart# &nbsp;&nbsp;To: #form.dateend# <br>
        <br>
        Purpose of Travel<br>
        #form.purpose#
        <hr>
        <span class="blackital"><strong>Travel arrangements requested</strong></span>
        <hr>
        Travel type: #form.traveltype# <br>
        <br>
        Depart from (city,state): #form.departfrom# <br>
        Departure date: #form.departdate# &nbsp;&nbsp;Departure time: #form.departtime# <br>
        <br>
        Return from (city,state): #form.returnfrom# <br>
        Return date: #form.returndate# &nbsp;&nbsp;Return time: #form.returntime# <br>
        <br>
        Frequent traveller number: #form.frequent# <br>
        Preferred company: <em>(Continental, Amtrak, MetroNorth, etc.)</em> #form.preferred# <br>
        <hr>
        <span class="blackital"><strong>Registration</strong></span>
        <hr>
        Name of Conference:<br>
        #form.confname# <br>
        Address:<br>
        #form.confaddress# <br>
        Phone Number: #form.confphone# <br>
        Fax Number:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #form.conffax# <br>
        Registration Fee: #form.fee#
        <hr>
        <span class="blackital"><strong>Hotel</strong></span>
        <hr>
        Hotel Name: #form.hotelname# <br>
        Hotel Address:<br>
        #form.hoteladdress# <br>
        Hotel Phone Number: #form.hotelphone# <br>
        Hotel Fax Number:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #form.hotelfax# <br>
        Check in date: #form.checkin# Check out date: #form.checkout# <br>
        Hotel rate: #form.hotelrate#
        <hr>
        Account to be charged: #form.account# </td>
    </tr>
  </table>
  </cfdocument>
0
bjv211
Asked:
bjv211
  • 3
1 Solution
 
bwasyliukCommented:
Have you tried using the full web path to the css and img files?

ex: <img src="http://www.yourdomain.com/images/head.jpg">
0
 
73SpyderCommented:
I had this same issue,  I found that I had to have the styles on the page.  Not linked.

and the styles had to be within the cfdocument tags
0
 
bjv211Author Commented:
bwasyliuk, this did not work

73spyder - works great for the styles, any idea about the image?
0
 
73SpyderCommented:
I have not had any issues with the images as long as you use the full path.

0
 
73SpyderCommented:
Follow up,  we use this:  http://www.easysw.com/htmldoc/

to create our pdf with images.   We found it more reliable than the standard tags.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now