Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFDocument PDF - Images lost when floated

New Here ,
Dec 13, 2010 Dec 13, 2010

Hi folks,

I'm using the CFDocument tag to create a PDF from a block of HTML.  There are images in this block, and everything works well, including some inline CSS formatting directiongs, until I include:

  #featured img {
    float: left;
    margin: 0 15px 0 0;
  }

To allow my text to appear to the right of my images on every row.  This formatting works fine in the HTML version, but as soon as I wrap it with my CFDocument tags, the images vanish.

I'm willing to believe that there may be a larger spacing issue or CSS problem that I've not yet discovered that is causing this problem, but have not yet found it.  I felt I would post here and ask if there were any known issues (that I could not find in a search of available forum topics) wherein the CFDocument tag fails to display images when using the float CSS directive.

Thanks!

Charlie

717
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Dec 16, 2010 Dec 16, 2010

Hi,

When you call the images inside your CFDOCUMENT its taking lot of time for Process, at the end the user will get frustrated.

Try to include all your styles and process the content in CFSAVECONTENT tag and use this variable.

It helped me.

<CFSAVECONTENT variable = test>

     <table style="margin-bottom: 0%" width="150%" >
     
            <tr>
                <td class=rtitle>Corrective Actions Summary</td>
                <td class=orgid align=right><img style="vertical-align: text-bottom" alt=Honeywell
                src="<cfoutput>#Request.root#feedback/images/small.gif</cfoutput>"
                border=0></td>
            </tr>
            <tr>
                <td style="height: 1px; background-color: black" colspan=2></td>
            </tr>

</table>

</CFSAVECONTENT>

<CFDOCUMENT format = "pdf">

     <cfoutput>#test#</cfoutput>

</CFDOCUMENT>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 16, 2010 Dec 16, 2010
LATEST

Thank you for the tip - much appreciated!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources