Got it working...

2007-02-09 Thread Torrent Girl
Here is what I used

cfscript
context = getPageContext();
context.setFlushOutput(false);
response = context.getResponse().getResponse();
out = response.getOutputStream();
response.setContentType(application/pdf);
response.setContentLength(arrayLen(#docLite2#));
out.write(#docLite2#);
out.flush();
out.close();
/cfscript






 Is there more to their example?  This line doesn't make much 
 sense(again the special characters, and where is webserivce defined
   mPdf = webserivce.getPolicyDocument(…);
 
 Can you send this to them, maybe they can help you out with the rest?
 cfsilent
   cfscript
   mPdf = createObject(java, java.io.ByteArrayOutputStream).
 init();
   mPdf = webserivce.getPolicyDocument(…);
   MyVariable = mPdf.toString(ISO-8859-1);
   /cfscript
 /cfsilent
 cfcontent type=application/pdf; charset=ISO-8859-1
 cfheader name=Content-Disposition value=filename=RM.pdf
 
 
 -Original Message-
 From: Torrent Girl [mailto:[EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] ] 
 Sent: Thursday, February 08, 2007 1:08 PM
 To: CF-Talk
 Subject: Re: binary to PDF
 
 yes it is with an outside vendor.
 
 they are sending me the contents of a PDF in an array of bytes 
 
 this code sample was how they do it with java
 
 resp.setHeader(Content-Disposition, filename=RM.pdf);
 
 resp.setContentType(application/pdf);
 

 
 
 byte[] mPdf = webserivce.getPolicyDocument(…); // This is what you 
 are getting
 
 ServletOutputStream out = resp.getOutputStream();
 
 out.write(mPdf);
 
 out.close();
 
 
= =
 Please access the attached hyperlink for an important electronic 
 communications disclaimer: 
 
 http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
= =

~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269302
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Got it working...

2007-02-09 Thread Rick Root
On 2/9/07, Torrent Girl [EMAIL PROTECTED] wrote:

 Here is what I used

 cfscript
 context = getPageContext();
 context.setFlushOutput(false);
 response = context.getResponse().getResponse();
 out = response.getOutputStream();
 response.setContentType(application/pdf);
 response.setContentLength(arrayLen(#docLite2#));
 out.write(#docLite2#);
 out.flush();
 out.close();
 /cfscript



 Shoot, I wish I would've seen this thread earlier, I do almost that exact
code in CFOpenMail, since imap.cfc returns attachments as ByteArrays, and if
you don't want to write a temp file, that's the only way to do it.

Rick


~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269303
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Vspider, got it working

2002-05-06 Thread Robert Everland

Just in case anyone has wanted to get this working right, the sites
listed below include a new style file so that it maps the fields correctly.
This works great if you include a lot of files to make your final outcome
look like a decent website, this will be great for us fusebox folks.

http://www.daemon.com.au/navitron/display.cfm?objectid=5B7F8B4D-4260-4C46-A5
431EC7DDC5A06E

http://webforums.macromedia.com/coldfusion/messageview.cfm?catid=7threadid=
211850

Robert Everland III
Dixon Ticonderoga
Web Developer Extraordinaire
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists