Hello,

I am running php 4.3.8 on a Windows 2000 server.
The printer is a Ricoh 3800c

I can print to servers printer using php:

$handle = printer_open("Itinerary");
printer_write($handle, "Text to print");
printer_close($handle);

The problem is that I want the printer to staple the pages.

I have the default settings on the printer to staple and if I print on the server from a program (word, the net) it automaticly staples. However if I print from the php code it does not staple, is there a way to force php to print to a "saved printer profile"?

Many Thanks
Chris W.

    heres an update, I went to print from a program on the server and choose to print to file, this is the file so how do I in the php pass these varables?

    %-12345X@PJL JOB
    @ SET JOBNAME = "Untitled - Notepad"
    @ SET DATE = "2004/09/28"
    @ SET TIME = "11:34:58"
    @ SET JOBOFFSET = OFF
    @ SET COPIES = 1
    @ SET QTY = 1
    @ SET FRONTCOVERPRINT = OFF
    @ SET BACKCOVERPRINT = OFF
    @ SET SLIPSHEETPRINT = OFF
    @ SET IMAGEDIRECTION = NORMAL
    @ SET HOSTCHARSET = "iso-8859-1"
    @ SET DISPCHARSET = "iso-8859-1"
    @ SET HOSTPRINTERNAME = "Itinerary"
    @ SET MEMORYSIZE = 192
    @ SET DUPLEX = OFF
    @ SET AUTOTRAYCHANGE = OFF
    @ SET TABPOSITION = OFF
    @ SET TABSTOCKSHIFTPRINT = OFF
    @ SET STAPLE = LEFTTOPSLANTPORT
    @ SET PUNCH = OFF
    @ SET USERID = "?"
    @ COMMENT OTHER = "0100870207d014"
    @ SET PRINTINFO = "DUPLEX_NUP=00000000/SCALING=3/OTHER=00000000"
    @ SET HOSTNAME = "SERVER"
    @ SET HOSTLOGINNAME = "Administrator"
    @ SET HOSTPORTNAME = "IP_10.184.150.10"
    @ SET TRACKID = "AUv8aAAAJPFxdIQ"
    @ SET PAPERFEEDADJUST = ON
    @ SET PAPERERRORCHECK = OFF
    @ SET TRAY = TRAY3
    @ SET MEDIATYPE = SPECIAL
    @ SET OUTBIN = FINISHERSHIFT
    @ SET WHITEPAPERSUPPRESS = OFF
    @ SET DRAWLINEBOLD = OFF
    @ SET SMOOTHING = OFF
    @ SET ECONOMODE = OFF
    @ SET DATAMODE = COLOR
    @ SET PLANESELECTK = ON
    @ SET PLANESELECTC = ON
    @ SET PLANESELECTM = ON
    @ SET PLANESELECTY = ON
    @ SET FIRSTPAGEORDER = ON
    @ SET MIXEDDIRROTATION = LEFT
    @ ENTER LANGUAGE = RPCS
    ðRPCS driver post process version 2.65.0ÿ %-12345X@PJL SET APLPAGELAYOUT = PORTRAIT
    @ SET PAPER = LETTER
    @ SET APLPAGESIZE = LETTER
    @ SET RESOLUTION = 600
    @ SET BITSPERDOT = 1
    @ SET PAGEORIGINX = 100
    @ SET PAGEORIGINY = 100
    @ SET ROTATE = RIGHT
    @ ENTER LANGUAGE = RPCS
    "garbage was here"

    I tried this and it did not work:

    $handle = printer_open("Itinerary");
    printer_set_option($handle, STAPLE, LEFTTOPSLANTPORT);
    printer_write($handle, "Text to print\r\n");
    printer_close($handle);
    
      6 days later
      Write a Reply...