Saturday, March 27, 2010

Inbedding images with cfcontent

I am using cfcontent to provide a form in Word format. I need
to include an image in the final document, but I'm not sure how to
do that, or if it is possible. The form comes up just fine, but
there is an 'X' where the image should be. Any ideas?Inbedding images with cfcontent
Post your problematic code please.Inbedding images with cfcontent
make sure the image src is an ABSOLUTE path, not relative.

--



Azadi Saryev

Sabai-dee.com


http://www.sabai-dee.com


Absolute path was the trick. I wonder also, is it possible to
somehow set Word margin widths and page breaks using cfcontent, of
some other cf tag?
To set the margin you can try this,





%26lt;CFCONTENT type=''application/msword''%26gt;

%26lt;HTML%26gt;

%26lt;HEAD%26gt;

%26lt;STYLE TYPE=''text/css''%26gt;

TD.formhead {

font-family : Arial, Helvetica, sans-serif;

font-weight : normal;

font-size : 10pt;

}

@xxxxxxxxxxx Section1 {

size:6.5in 9.5in;

margin:.75in .75in .75in .75in;

mso-header-margin:.5in;

mso-footer-margin:.5in;

mso-paper-source:5 5;}

div.Section1 {

page:Section1;

page-break-before : always;

}

%26lt;/STYLE%26gt;

%26lt;/HEAD%26gt;

%26lt;BODY%26gt;

%26lt;CFOUTPUT QUERY=''Your_query''%26gt;

%26lt;div class=Section1%26gt;

%26lt;TABLE BORDER=''0'' CELLSPACING=''1'' CELLPADDING=''3''%26gt;

%26lt;TR VALIGN=''TOP''%26gt;%26lt;TD
CLASS=''formhead''%26gt;#Field1#%26lt;/TD%26gt;

%26lt;TD class=''conthead''
COLSPAN=2%26gt;#Field2#%26lt;/TD%26gt;%26lt;/TR%26gt;

%26lt;/TR%26gt;

%26lt;/TABLE%26gt;

%26lt;/div%26gt;

%26lt;/CFOUTPUT%26gt;

%26lt;/BODY%26gt;

%26lt;/HTML%26gt;

No comments:

Post a Comment