like I already said, look at addprinter():
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=83350