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();
> Well this is really a shot in the dark. But that failed because you
> overwrote the Java Object with a Coldfusion data type, which is a
> double datatype.
>
> So this compiles, but I'm pretty sure this won't work since docLite2
> has been converted to store in a CF variable, so I think it's probably
> not a byte[] anymore. You were probably on the right path before,
> taking the output from the webservice call and piping it straight into
> mPdf. Where is the webservice, is it an outside vendor or something?
>
> <cfsilent>
> <cfscript>
> mPdf = createObject("java", "java.io.ByteArrayOutputStream").
> init("#docLite2#");
> MyVariable = mPdf.toString("ISO-8859-1"); </cfscript> <cfcontent
> type="application/pdf; charset=ISO-8859-1"> <cfheader
> name="Content-Disposition" value="filename=RM.pdf"> </cfsilent>
>
> -----Original Message-----
> From: Torrent Girl [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 08, 2007 12:51 PM
> To: CF-Talk
> Subject: Re: binary to PDF
>
> oK THANKS
>
> I made the change and get the following:
>
>
> The selected method toString was not found.
>
>
>
> here's my code:
>
> <cfsilent>
> <cfscript>
> mPdf = createObject("java", "java.io.ByteArrayOutputStream").init();
> mPdf = #docLite2#;
> MyVariable = mPdf.toString("ISO-8859-1"); </cfscript> <cfcontent
> type="application/pdf; charset=ISO-8859-1"> <cfheader
> name="Content-Disposition" value="filename=RM.pdf"> </cfsilent>
>
>
=========> =====================================================================
> 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:269218
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4