CFPrint with URL variables

531 views Asked by At

I have a question about <CFPrint>.

I currently have a CFM page that I link to in my application which outputs a receipt to the screen. Users then print that web page and hand the receipt to the customer.

I would like to instead automatically print that CFM page so the user doesn't have to manually do it.

I though I could accomplish that with <CFPrint> but it doesn't seem to want to accept my source with all my URL variables.

Here is what I tried:

 <cfprint 
                source = "c:\inetpub\wwwroot\serviceticket\reports\dropoff_receipt.cfm?ticket_id=#url.ticketID#&signature_id=#check_signature.id#" 

                printer = "\\EZServiceTrax\Dell">

But I receive an error that the source file doesn't exist. Can I accomplish what I want to do using this method? If so, what am I doing wrong? If not, is there a better way?

1

There are 1 answers

2
Viv On

Have you tried creating a PDF using CFDocument and then used variable as source to CFPrint? This is what the CFPrint documentation says about attribute 'source':

source = "absolute or relative pathname to a PDF file|PDF document variable"".... A PDF document variable in memory that is generated by the cfdocument tag or the cfpdf tag.