Skip to main content
April 27, 2006
Question

Printing a PDF (CFMX6)

  • April 27, 2006
  • 1 reply
  • 265 views
I'm working on an app that prints forms and was wondering if there was a way to print a PDF that was stored on CF webserver to a users default printer or printer of their choice ??

I'm just trying to explore is there a simpler way than lauching the PDF in a broswer window and prompting the user to hit the print icon in the PDF Reader toolbar. Is there a way to script the generation of the print command ?? Or am I barking up the wrong tree??

Cheers
    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    April 27, 2006
    I wonder whether it is possible to do that through the usual scripting. Coldfusion ignores all HTML and CFML outside the <cfdocument format="pdf"> </cfdocument> tag pair. But that is precisely where we would want to put the code that instructs the browser to print.

    To illustrate, the following (browser-independent?) code will call up the printing interface. However, it wont anymore when you activate the cfdocument tag.