CFLib.org – Common Function Library Project

GetPrinters()

Last updated September 7, 2007

author

Ben Forta

Version: 1 | Requires: CF8 | Library: UtilityLib

Description:
Uses internal ColdFusion Java object to obtain an array of printers available to CF.

Return Values:
Returns an array.

Example:

<cfdump var="#GetPrinters()#">

Parameters:

No arguments.

Full UDF Source:

<!---
 Get array of available server printers (for use with CFPRINT).
 
 @return Returns an array. 
 @author Ben Forta (ben@forta.com) 
 @version 1, September 7, 2007 
--->
<cffunction name="GetPrinters" returntype="array" output="no">
   <!--- Define local vars --->
   <cfset var piObj="">

   <!--- Get PrinterInfo object --->
   <cfobject type="java"
         action="create"
         name="piObj"
         class="coldfusion.print.PrinterInfo">

   <!--- Return printer list --->
   <cfreturn piObj.getPrinters()>
</cffunction>
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson