CFLib.org – Common Function Library Project

GetPrinters()

Last updated September 07, 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>

Search CFLib.org


Latest Additions

Raymond Camden added
QueryDeleteRows
November 04, 2017

Leigh added
nullPad
May 11, 2016

Raymond Camden added
stripHTML
May 10, 2016

Kevin Cotton added
date2ExcelDate
May 05, 2016

Raymond Camden added
CapFirst
April 25, 2016

Created by Raymond Camden / Design by Justin Johnson