Images, CFDocument, anc CFContent

We have some "secure", non-web accessible, images that we
display inline on our site using the CFCONTENT tag like so:
<img
src="../logoexport.cfm?dlfilename=#urlEncodedFormat(thumbfilename)#">
The logoexport.cfm page looks like this:
<cfcontent type="image/jpg"
file="#materials_thumb_directory##url.DLFilename#"
deletefile="No">
This works perfectly fine for us when displaying in a
browser. However, when using CFDocument the images do not display.
It seems CFDocument simply renders the page as HTML rather than
returning the 'logoexport.cfm' page to the CF engine. Anyone else
have this issue? Know any workarounds?

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>

Similar Messages

  • Closing seperate browser after cfcontent

    Hi all,
    I would like to get some help on cfcontent.
    I use cfcontent to open a pdf in a seperate browser,
    which works.I have a close button on the parent
    window, along with other information related to the document.
    When I hit the close button, I would like the pdf
    browser(window)
    to close. It doesn't seem to recognize that the PDFImage
    window is open.
    Below is my code to display the image
    <cfheader name="Content-Disposition"
    value="#URL.Image#">
    <cfcontent type="application/pdf" file="#URL.Image#">
    //Code to close the image window in the parent window close
    button.
    function closepage(){
    //one way
    if (window.PDFImage && window.PDFImage.open
    && !window.PDFImage.closed){
    window.PDFImage.close();
    //other way
    if (PDFImage != null && PDFImage.open){
    PDFImage.close();
    The next issue is, I am trying to display a jpg in a
    <table, the image must
    be within the table. It works when I have the <img tag,
    but I Would
    like to replace it, due to some sharing violation of the
    image being displayed.
    cfcontent seems to work, but it takes the whole browser,
    other codes(like buttons)
    are ignored.
    <table align="left" cellpadding="0" cellspacing="0"
    class="withborder">
    <tr> <td><span id="List3">
    <cfheader name="Content-Disposition"
    value="#Form.image_file#">
    <cfcontent type="image/jpeg" file="#Form.image_file#">
    <!---<img border="2" id="img1" src="#Form.image_file#"
    width="250">--->
    </span></td>
    </tr>
    </table>
    I am using MX 7. Any suggestions/solutions are welcome.
    Thanks all for your time.

    The online help for the onClick Javascript field says
    "In the link generated for this icon include the following onClick javascript.  Use of the onclick javascript could popup a help page in a new window (see example 1).
    Example 1:
      window.open('US/asfhhome.htm','Help','scrollbars=yes,resizable=yes,width=625,height=350,left=25,top=150');return false
    Set the Icon Target attribute to # if you are using OnClick JavaScript. Set the Image Alt Text attribute to the text the user will see to click on."So, try putting "#" in the Target and window.close() in the onClick Javascript box.
    Message was edited by:
    Vikas

  • Tracking another blog's stats

    Can someone tell me how or give me a tutorial link that
    explains how I can monitor the # of visits to someone else's
    blog?

    Keep in mind that statistics of another web site or blog is
    private data and usually inaccessible unless that site/owner has
    provided access to stats in someway or other, which is usually done
    for some reason that enhances the owner's web site, either
    visually, such as a widget, serving up ads, or general reporting
    such as Google Analytics. The owner of the website/blog usually
    places some JavaScript on the page which calls the monitoring agent
    on another server.
    If you're placing ads on the target website and you want to
    know how many visits, you'll either have to trust what the owner is
    reporting to you, get access to the web logs (assuming they are not
    doctored), or create your own type of script that the owner places
    on the blog that calls back to your site each time the page is
    visited. You could also use an older method where the owner links
    to your image on your site, similar to a script, except that the
    image URL calls your ColdFusion template, such as <img
    src="yoursite.com/image.cfm">, then in your image.cfm, you track
    the statistics on the hit and deliver up your image using the
    cfcontent tag.

  • Cfdocument type pdf - image

    I am trying to get an image to display from side to side on a
    pdf from cfdocument. I have left/right margins at 0 and the image
    is fully 8.5" wide but I still get a right/left margin on the
    display. Is this even possible??

    Does adding the following code at the top force IE's hand?
    <cfheader name="Content-Disposition" value="inline;
    filename=myDoc.pdf">
    <cfcontent type="application/pdf">

  • Creating PDF with IMAGE using CFDOCUMENT TAG

    Hi Guys,
    I m facing problem while creating the PDF using CFDOCUMENT
    tag.
    Actually my clients want the IMAGEs in PDF document.
    Problem is most of the images in JPG format and while I am
    going to attach images in PDF document it takes lots of time for
    creating PDF. In most of time it cause timeout.
    I have try to convert images JPG to PNG, yes I some what
    better performance than JPG format but still it is work for 20 - 25
    images. In my case I want to attach normally 50-100 images in PDF
    (sometimes it is more 200).
    PLZ, Help me.. F1...F1...F1
    thanks in advance
    Pritesh
    Coldfusion Programmer

    I am having a similar and more serious problem. It takes a
    long time to execute, but even attaching a small image balloons the
    pdf to 6MB plus. After a few images it gets up to 20MB. These are
    100k jpeg files being attached. The resulting PDF is too large to
    email or process effectively. Does anyone know how to reduce
    size/processing?

  • Images not displaying in CFDOCUMENT PDF

    Hi there,
    Has anyone notice any problems with images in dynamic PDF
    using CFDOCUMENT? I have a site where I create several dynamic PDF
    document (with images) and all of a sudden, they stop displaying.
    The only new addition was a SSL for the site.
    Any help would be greatly appreciated.

    Thanks, Isaac.
    My reason for posting that I was trying the src="file://E:\ solution before putting it in CFDocument was that I figured if it didn't work with the browser, it probably wouldn't work with CFDocument, which was probably presumptuous of me.  I just tried using the IP Address instead of E:\etc and it shows up in the browser.  Good news, the IP Addresses fix the logo problem, but not the CFChart problem.
    Here's the failed img tag:
    <img src="logo_30.jpg" width="96" height="50" border="0" alt="">
    Here's the successful img tag:
    <img src="http://ipaddress/portal/PROD/Forms/monthly_reports/logo_30.jpg" width="96" height="50" border="0" />
    Here's the chart code:
    <CFQUERY NAME="GrabData" datasource="admi-prod">
              sql goes here
    </CFQUERY>
    <cfset gwidth = 450>
    <cfset gheight = 320>
    <cfset min = int(arrayMin(grabData["total_inventory"])) - 1>
    <cfif int(arrayMin(grabData["total_idle_capital"])) LT min>
            <cfset min = int(arrayMin(grabData["total_idle_capital"])) - 1>
    </cfif>
    <cfset max = ceiling(arrayMax(grabData["total_inventory"])) + 1>
    <cfchart scalefrom="#min#" scaleto="#max#" title="Total Closing Inventory & Total Idle Capital" format="jpg" chartheight="#gheight#" chartwidth="#gwidth#">
            <cfchartseries type="line" query="grabData" valuecolumn="total_inventory" itemcolumn="xlabel"/>
            <cfchartseries type="line" query="grabData" valuecolumn="total_idle_capital" itemcolumn="xlabel"/>
    </cfchart>

  • Images in Excel with CFContent

    I'm trying to insert some gifs into an excel spreadheet created with cfcontent. The essence of the code is this...
    <cfcontent type="application/msexcel">
    <cfheader name="Content-Disposition" value="attachment; filename=myexcelfile.xls">
    <table>
    <tr>
         <td>
         <img src="https://www.mydomain.com/images/mypic.gif">
         </td>
    </tr>
    </table>
    ...so when the spreadsheet comes up, it shows the images, but they aren't saved in the spreadsheet itself - they're just linking to the image file online. So if I unplug my network cable, the images will disappear, despite the xls file being saved on my local machine.
    Does anyone know how to embed the image files themselves into an excel file created through ColdFusion?

    You might try creating a spreadsheet containing an image using the Microsoft Excel program then save it as HTML.  Examining the HTML Excel generates may give you an idea how to structure your HTML to conform to Excel's format.

  • CFDOCUMENT with Images = Huge File

    I've been looking through the forum and google and can't find
    a straight answer. Has Adobe responded to the issue? My PDF is 10x
    that of the image. I know there are alternatives to CFDOCUMENT, I
    know the PDF's can be optimized out of CF, but why isn't this
    fixed? Maybe at least an optimize option in CFPDF
    Anyone found a work around in CF? Any response from
    Adobe?

    not that I've heard yet. Hopefully someone will respond...
    even better if Adobe responds.

  • Cfdocument only displaying one image

    Hi all,
    Im trying to use the cfdocument tage to print certificates. I
    have 2 types of certificate each has a different jpg. First a run a
    query to select the names of the people and which type of
    certificate they need.
    I then loop the query and include a page with the relevant
    image using cfinclude template. The included page cfouts the name
    in the correct position and the certificate image is a background
    image in a table.
    So i should end up with a pdf with lots of certificates, very
    cool, well it would be but the image disappears after the first
    page.
    So Iend up with a perfect certificate on the first page and
    just the names on all the other pages with no certificate image
    Any ideas on what the problem is anyone ?

    Either that or you've somehow turned on the single-app preference in the Dock. Various programs can set this, or you can use the Terminal. I use Secrets. There is a link to a prefpane there that installs as a system preference.
    Terminal command to disable it is:
    defaults write com.apple.dock single-app -bool no

  • JPG images bloat CFDocument PDF 10X

    We're creating PDF files using the CFDocument tag. We're
    including JPG images in the document. The JPG files are 1MB in file
    size total but the resulting PDF file is 11+ MEGs (10X). I've been
    searching the forums and Internet but I'm having trouble finding
    anything about this. All I could find on the topic is something
    about duplicate color spaces but it didn't solve anything.
    Note that if I open the file in Acrobat, I can
    compress/optimize it down to less than 1 MEG but that's not a
    practical solution programming-wise. I wish there was a way to call
    Acrobat from CF to take advantage of the optimization feature.
    Does anyone know of a fix or work around for this? We'll be
    generating thousands of PDFs and this will be a big problem. Do you
    know of an alternate way to generate PDF files from CF. OR how
    about a command line utility or CFX for compressing PDF files?

    How do you use it, as a service on the server watching a
    folder and doing bulk optimizations, or file-by-file from
    CF?

  • cfdocument background image

    I am creating an appliaction that generates a pdf mock up for
    a catalog
    cover with custom content. I tried various methods to get
    this to work
    and none of them worked. I tried using both css and html, and
    referencing the image with an absolute path, relative path,
    and full
    url. I have backgroundvisible="yes" in my cfdocument tag. Is
    there
    somehting im missing, or some alternate method to get this to
    function
    correctly? Thanks in advance.

    Background image works for me.
    What exact version, from the CF administrator, are you
    running?
    Please attach code that demonstrates the problem.

  • Send image to browser with cfcontent not download prompt

    I'm sending an image to be downloaded using cfcontent
    <cfheader name="Content-disposition" value="attachment;filename=#getit.file#">
    <cfcontent type="image/jpg" file="#physicalpath#\#getit.file#">
    Can I have the image sent to the browser instead of a download prompt?

    If the image isn't accessible directly via HTTP, you can use CF to serve it. Your CF page would have the CFCONTENT tag as you showed in your original post, then you'd use IMG tags in other pages pointing to that CF page:
    <img src="myimage.cfm?id=whatever"/>
    You wouldn't need the CFHEADER to specify it as an attachment, though - that's only for when you want to prompt the user to download a file without having it handled natively by the browser.
    Dave Watts, CTO, Fig Leaf Software
    http://www.figleaf.com/
    http://training.figleaf.com/

  • CFDocument Image Maps

    We've run into issues using client image maps in CFDocument.
    We're able to render the image maps fine, and when we use a fixed
    image size like 800x600, they work fine:
    <img src="/express/cache/#imagename#" class="map"
    usemap="##map1" border="1" width="800" height="600"/>
    However, when we attempt to use percentages to get the image
    to scale to the size of the whole page,
    <img src="/express/cache/#imagename#" class="map"
    usemap="##map1" border="1" width="100%" height="100%"/>
    we get a ColdFusion error, as follows:
    An exception occurred when performing document processing.
    The cause of this exception was that:
    coldfusion.document.spi.DocumentExportException:
    java.lang.NumberFormatException: For input string: "100%".
    Taking out the map reference makes this work as expected.
    So, okay, the parser must be getting confused because it
    doesn't know how to lay out the image map with the x% scaling.
    We'll just use the exact size of the image to scale it to the size
    we want... This is when we run into another issue: We can't seem to
    accurately size images in CFDocument. When we set the image to
    1024x768 (or something like that), the image renders at the exact
    same size! (The underlying PNG is actually 2400 x 1800).
    So, the questions are:
    1) Is there any way to dynamically scale the image and use
    image maps in CFDocument, or
    2) How in the world does the image scaling work (in the black
    box)?
    We just want to have a full screen mapped image that we can
    use as a TOC for our CFDocument.
    Thanks!

    John,
    the Robohelp built-in editor messes the code up, so I never
    use it. However, not even Dreamweaver supports interactive effects
    in image maps. I wanted the hot spots to hover like hyperlinks.
    Seems to me much more convenient for the user.
    quote:
    I'm not sure what you are trying to do when you say "the area
    tag cannot be formatted using CSS." What kind of formatting do you
    want on a piece of an image?
    Unfortunately, you cannot use the hover attribute in css for
    the <area href> tag. That is, why you need a more complicated
    solution for interactive hot spots in image maps.
    My first solution had some flaws. Eventually, I found this
    smart piece of Javascript:
    http://www.netzgesta.de/mapper/
    This really did the trick and works great. The script is free
    of charge for non-commercial use only.
    Mike

  • Troubles with cfdocument | cfcontent tag after cf update

    I'm having some issues with the cf document and cfcontent
    tags, they do not function correctly, the cfdocument hangs when
    calling a PDF file and the cfcontent throws a server 500 error when
    I call an Excel file. Is there a Hotfix to solve this issue or is
    there anything I can do to solve this problem.

    I ran the CC Cleaner tool but there are failed records. The instructions say I should contact customer service if that happens.
    Exactly how/where do I do that?
    I need to get this all fixed so I can get back to work! Sorry for thee rant, its been a rough week...
    Thank you for your help.

  • Images not rendred properly in a pdf CFDOCUMENT

    Hi,
    I'm creating a pdf document which contains color and greysacle jpg image.
    About half of the greyscale images are much whiter than the original.
    I've read about some problem with image scaling, but not about this one.
    Any idea ?

    Hi Dana,
    Which settings are you considering and what are the performance issues?
    You can optimize for certain workflows that will adjust processor intensive work, such as only generating large previews when displayed. If you're strictly talking about video card accelerated features, I think it's more a matter of On or Off as opposed to performance tuning. I just did a quick look and with video card acceleration enabled, in Full Screen Preview you can pan the image at magnifications much smoother.
    regards,
    steve
    Message was edited by: steve guilhamet

Maybe you are looking for

  • Error installing E-Bussiness Suite (EBS) R12 on Windows 2003 Server x32

    I am trying to install EBS R12 and i am getting error at stage 3 of 5 on 53% I followed steps from below link http://supportuae.wordpress.com/2013/01/26/installing-oracle-e-business-suite-r12-on-microsoft-windows-server-2003/ My Setup Win 2003 Server

  • Source directory changed every month?

    Hi Experts, my scenario is File to proxy message protocol for file adapter is NFS according to my scenario every month is changed source directory... for ex : for this month my source directory is Source Directory:\xyz\abc\1\daily next month source d

  • Generating PDF from DA and continue to execute

    Hi All, need your help... I have a DA with couple of steps: somewhere in the middle i have to generate PDF report and after that refresh one of the regions on the page well the problem is that after i generate the report using window.location.href =

  • SendStation iPod / iPhone Dock Extender  from GadgetLocker doesn't work!

    Ok I went to the Gadget Locker and bought iPod / iPhone Dock Extender [URL="http://www.thegadgetlocker.com/productinfo.php/cPath/223/productsid/2787"]http://www.thegadgetlocker.com/productinfo.php/cPath/223/productsid/2787[/URL] and than I bought an

  • How to consume data model adf library in view project?

    Hello, I am using Jdev 11.1.1.6. I have a Jdev workspace containing business component (entity objects, view objects and application module exposing the VOs). This workspace is deployed to an ADF Library. This library is packaged with DB connection d