No not using iText

here is the java equivilant of what i need to do in CF


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();





> Are you using iText? In the past, I created pdf's on the fly using 
> byte arrays, so that I don't have to write to disk.
> 
> To display them, I did the following
> <cfscript>
> //all of my itext code
> 
> MyVariable = baosPDF.toString("ISO-8859-1");
> </cfscript>
> <cfcontent type="application/pdf; charset=ISO-8859-1"><cfheader 
> name="Content-Disposition" value="filename=blahblah.
> pdf"><CFSCRIPT>writeOutput(MyVariable);</cfscript>
> 
> Hope this helps
> Seth
> 
> -----Original Message-----
> From: Torrent Girl [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, February 08, 2007 9:02 AM
> To: CF-Talk
> Subject: Re: binary to PDF
> 
> Ok I will look at binaryDecode()
> 
> 
> The formal term for what I am receiving is "array of bytes (byte[])"
> 
> Specifically - "an array of bytes (byte[]) having contents of the 
> PDF(s) requested"
> 
> 
> >Anyways, you will need to know the encoding format in order to encode 
> 
> >the data back into it's binary format. Take a look at binaryDecode()
> >
> >Doug B.
> >
> >
> >
> >----- Original Message -----
> >From: "Leitch, Oblio" <[EMAIL PROTECTED]>
> >To: "CF-Talk" <[email protected]>
> >Sent: Thursday, February 08, 2007 6:48 AM
> >Subject: RE: binary to PDF
> >
> >
> >>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:269194
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to