Tech Blog

CFPRINT Tag -New in Scorpio (ColdFusion 8)

by Rolando on Jun.01, 2007, under ColdFusion

Ben Forta mentioned a couple of days a go a new tag introduced with Scorpio, called CFPRINT.  If you don’t run Intranet applications this tag might not be of your interest, however if you do, you might need to perform tasks such as printing nightly sales reports, monthly inventory reports or just print customer’s orders as they come in.  CFPRINT automates this process for you, so that now human intervention is needed or hacks.

The ColdFusion service must be running under a user with rights to print through the Network or Local computer depending on your setup.  Remember this will work as long as you have your printer available to your Local Network where the CF Server resides.  This means that if you have multiple locations for your business and have a remote printer available to your local network you should be able to print then to that remote location.  This is great if you receive all your orders in a central location but then redistribute those depending on the proximity of the customer or just depending on inventory availability, etc.

You can see a list of all available printers through the ColdFusion Administrator.  Ben also mentioned in his post a new function that came along with the CFPRINT tag, called GetPrinterInfo().  As the name suggests this will return information pertinent to the requested printer.

You can read Ben’s Post here

:

2 Comments for this entry

  • Lori

    We have a ColdFusion page that queries a database for ‘drawing numbers’. The numbers found are displayed on the screen to the user. When the user clicks on the drawing number, the drawing number is embedded into a link with a .pdf suffix on drawing number which then goes out to another directory on the server and opens the PDF. What we want to do is have a ‘Print’ button on the screen on which the users will click on and rather than the PDFs opening on the screen, have all of the PDFs found in the query automatically print to a local printer. Will work in this scenario?

  • charlie arehart

    Lori had asked the same question on Ben’s blog entry on CFPRINT, and for those who haven’t seen it, his answer was “Lori, sounds like you want client-side printing, and if so, then no, is for server-side printing. What you’d want is a “print me” option in the PDF itself, I think.— Ben “

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...