HTTP Error 502.2 - Bad Gateway The specified CGI application misbehaved by not returning complete set of HTTP headers. The headers it did return are "ERROR: Cannot create printer object! þÿÿÿ8­w4­w at testprinter.pl line 4 ". Detailed Error Information Module CgiModule Notification ExecuteRequestHandler Handler perl script map Error Code 0x00000009 Requested URL testprinter.pl Physical Path testprinter.pl Logon Method Anonymous Logon User Anonymous #### #!perl use Win32::Printer; my $dc = new Win32::Printer( height => 214, width => 288, printer => 'emtags', unit => 'pt' ); my $font = $dc->Font('Arial Bold', 24); $dc->Font($font); $dc->Color(0, 0, 255); $dc->Write("Hello, Mars!", 50, 50); $dc->End(); $dc->Close(); exit 0;