|
|
Hello.
I have a sample that you might be looking.
http://codfusion.shigeru-nakagaki.com/cf_samples/
Tree menu
=> cfpdf
=> pdfForm01
thanks
Shigeru ( Shigeru-Nakagaki.com )
On Aug 29, 4:36 am, "Daemach2" <webforumsu...@xxxxxxxxxxxxxx> wrote:
> I had a situation where I had to create a PDF containing a dynamic cover sheet
> and supporting documents, which are in pdf format. I used CFDocument to
> create
> the cover sheet, stored it in a variable, then used cfpdf with cfpdfparam to
> specify that cover sheet variable, then looped over the files. CFDump says
> that worked correctly.
>
> I then tried using cfcontent to display the resulting file. I would have
> expected that to work. Intead it throws this:
>
> [b]Attribute validation error for tag cfcontent.[/b]
>
> [i]coldfusion.pdf.PDFDocWrapper is not a supported variable type.[/i] The
> variable is expected to contain binary data.
>
> The error occurred in
> E:\WebRoot\www.missionincrease.com\wwwroot\active\Admin\MinistryGrants\fundingRe
> quest.cfm: line 99
>
> 97 :
> 98 : <cfheader name="Content-Disposition" value='inline;
> filename=#URLEncodedFormat("FundingRequest.pdf")#'>
> 99 : <cfcontent reset="yes" variable="#pdfOut#" type="application/pdf">
> 100 : </cfif>
>
> Is this a bug or am I doing something wrong?
>
> <cfdocument format="pdf" marginbottom=".15" margintop=".15" marginleft=".15"
> marginright=".15" name="report">
> ...
> <tbody>
> <tr><td colspan="2"><hr /></td></tr>
> <tr class="bold"><td align="right">Total: </td><td
> align="right"><cfoutput>#DollarFormat(grandTotal)#</cfoutput></td></tr>
> </tbody>
> </table>
> </body>
> </html>
> </cfdocument>
>
> <cfpdf action="merge" name="pdfOut">
> <cfpdfparam source="report">
> <cfloop query="getFiles">
> <cfpdfparam
> source="#Application.DocumentRoot##iif(Len(FilePath),DE('\#FilePath#'),DE(''))#\
> #fileName#">
> </cfloop>
> </cfpdf>
>
> <cfheader name="Content-Disposition" value='inline;
> filename=#URLEncodedFormat("FundingRequest.pdf")#'>
> <cfcontent reset="yes" variable="#pdfOut#" type="application/pdf">
|
|