1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Coldfusion: Adding printing and/or PDF export capability to website

Discussion in 'Programming' started by lespaul00, Nov 14, 2007.

  1. #1
    I have a website that displays database query results on my dynamic coldfusion page. My question is, how can I add an print icon to the page, and have it print the results is a printer friendly format. I mean, I don't want it to just print my website, but rather, a nice list of the database results.

    Even better, it'd be nice if it opened a nice list of the recipes in Adobe reader (as a .pdf). It'd give the user the option of saving it as a .pdf, or just printing it right through Adobe Reader.

    Let me know your thoughts!
     
    lespaul00, Nov 14, 2007 IP
  2. unitedlocalbands

    unitedlocalbands Well-Known Member

    Messages:
    246
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    128
    #2
    unitedlocalbands, Nov 14, 2007 IP
  3. unitedlocalbands

    unitedlocalbands Well-Known Member

    Messages:
    246
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    128
    #3
    One way you could do this is Place a link on the page that you may want the user to be able to print.

    
    
    <a href="whatyouwantpritd.html">Printer Friendly Version</a>
    
    
    Code (markup):
    the link should point to a page with this tag:

    
    
    <cfdocument format="pdf">
    
    Everything you want to be printed needs to go here nested inside the <cfdocument> tag
    
    </cfdocument>
    
    
    Code (markup):


    Not sure this is the best way but it work. When the user clicks the link to the page with the cfdocument tag the page will load in Abobe. then they will be able to hit the print button.
     
    unitedlocalbands, Nov 14, 2007 IP