using <cfcontent>, if you wish to get the file save as.. dialog you need to
add this line of code BEFORE the cfcontent tag

<cfheader name="content-disposition" value="attachment;filename=#filename#">

 if you wish for the file to open in the browser use this:

<cfheader name="content-disposition" value="inline;filename=#filename#">

#filename# can be a dynamically created name or you can just place a static
filename to save as "myFile.whatever"

-chris.alvarado
[application developer]
4|Guys Interactive, Inc.
------------------------------------
http://www.4guys.com

----- Original Message -----
From: "Steve Oliver" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, February 01, 2002 1:27 PM
Subject: RE: cfcontent and PDF's


> Using cfcontent like that wouldn't give you the file save as dialog, it
> should open the PDF in your browser.
>
> Depending on which version of CF server you are running, it may be
> making whitespace at the top of the document, causing it to not print
> out right.
>
> <cfsetting enablecfoutputonly="yes">
> <cfcontent type="application/pdf" file="c:\inetpub\wwwroot\test.pdf">
>
> You may try encapsulating like so if that still doesn't work.
>
> <cfprocessingdirective suppresswhitespace="Yes">
> <cfcontent type="application/pdf" file="c:\inetpub\wwwroot\test.pdf">
> </cfprocessingdirective>
>
>
> ______________________
> steve oliver
> atnet solutions, inc.
> http://www.atnetsolutions.com
>
>
> -----Original Message-----
> From: Matthew R. Small [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 01, 2002 2:20 PM
> To: CF-Talk
> Subject: RE: Print Friendly Web Site
>
>
> Hi Everybody,
> I'm trying to use CFCONTENT to push a pdf file to the client,
> but it's not working.  Is there anything wrong with what I've written?
> I'm not getting an error message at all, but I'm not getting the file
> save as dialog either.
>
> <cfcontent file="c:\inetpub\wwwroot\intranet\reports\doc.pdf"
> type="x-application/pdf">
>
> I've tried it with and without the 'x-' part in the type attribute.
>
> Thanks
> - Matt Small
>
>
>
> -----Original Message-----
> From: Carlisle, Eric [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 01, 2002 2:08 PM
> To: CF-Talk
> Subject: RE: Print Friendly Web Site
>
> Interesting suggestion.  Since the site has already been released, I
> don't
> want to pull it up by the roots too much.
>
> I've considered a few things like using CSS to make cetain parts
> visible on
> the screen and invisible on the printer (leaving more space for
> content).
> That doesn't work for netscape.  Same case for using a meta tag to
> point to
> a print version.
>
> BTW, I'm sorry I forgot to put "OT" on the subject line. :/
>
> Thanks for the help :)
>
> EC
>
>
> -----Original Message-----
> From: John B. White [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 01, 2002 2:03 PM
> To: CF-Talk
> Subject: Re: Print Friendly Web Site
>
>
> One nice thing about frames is that they allow the user to print out
> the
> content
> of interest.  Maybe on the main page you just use frames for items that
> would
> print...
>
> --JW
>
> "Carlisle, Eric" wrote:
> >
> > I'm working with a Web site obtimized for 800x600 displays.  As it
> stands,
> > pages are horizontally cropping on a printout.  This has concerned
> one of
> my
> > managers.  I'm not too bothered because pages that are more likely to
> > printed (press releases, for instance) have seperate "print friendly"
> > versions (stripping out logos, navigation, etc...).  Who really
> prints the
> > homepage of a Web site? :)
> >
> > Is it a bad thing to have printouts crop like that?  Should good
> designs
> > accomodate printers?
> >
> >         Eric Carlisle
> >         Web Site Developer
> >         Progress Energy IT Systems Delivery
> >         E-mail: [EMAIL PROTECTED]
> >         Phone: (919) 546-4739
> >
>
>
>
> 
______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to