Crikey !! However, this is still server-side, and the impression I got was that the printing was going to be client-side. I may be wrong though, in which case, this seems to do the trick just fine !!!!
BTW, its also on the PHP site ... printer module. Ronan e: [EMAIL PROTECTED] t: 01903 739 997 w: www.thelittledot.com The Little Dot is a partnership of Ronan Chilvers and Giles Webberley On 28 May,2003 at 15:55 Catta Rodolphe wrote: > Good start but in french, hope u know a little of French but it is not > hard to understand ! > > > ### tire de : function.printer-set-option.html > printer_set_option > > 6.84.31 printer_set_option()Configure la connexion a` l'imprimante > [ Exemples avec printer_set_option ] CVS uniquement > > bool printer_set_option ( resource handle , int option , mixed value ) > > printer_set_option modifie les options suivantes pour la connexion a` > l'imprimante handle . handle doit e^tre une ressource d'imprimante > valide. option peut e^tre l'une des constantes suivantes : > > * PRINTER_COPIES : indique le nombre de copie a` imprimer. value doit > e^tre un entier . > * PRINTER_MODE : spe'cifie le type de data ("text", "raw' ou "emf"), > value doit e^tre une chai^ne de caracte'res . > * PRINTER_TITLE : spe'cifie le nom du document, value doit e^tre une > chai^ne de caracte'res . > * PRINTER_ORIENTATION : spe'cifie l'orientation du papier, value peut > e^tre PRINTER_ORIENTATION_PORTRAIT ou PRINTER_ORIENTATION_LANDSCAPE > * PRINTER_RESOLUTION_Y : spe'cifie la re'solution en ordonne'es, en DPI, > value doit e^tre un entier . > * PRINTER_RESOLUTION_X : spe'cifie la re'solution en absisse, en DPI, > value doit e^tre un entier . > * PRINTER_PAPER_FORMAT : spe'cifie un format de papier pre'de'fini : > donnez a` value la valeur de PRINTER_FORMAT_CUSTOM si vous souhaitez > utiliser un format de papier personnalise', gra^ce aux constantes > PRINTER_PAPER_WIDTH et PRINTER_PAPER_LENGTH . value peut alors e^tre > l'une des constantes suivantes : > > o PRINTER_FORMAT_CUSTOM : vous laisse spe'cifier le format de papier. > o PRINTER_FORMAT_LETTER : spe'cifie le format standard "letter" (8 1/2 > par 11 pouces (2.54cm)). > o PRINTER_FORMAT_LETTER : spe'cifie le format standard "legal" (8 1/2 > par 14 pouces (2.54cm)). > o PRINTER_FORMAT_A3 : spe'cifie le format standard "A3" (297 par 420 > millime`tres). > o PRINTER_FORMAT_A4 : spe'cifie le format standard "A4" (210 par 297 > millime`tres). > o PRINTER_FORMAT_A5 : spe'cifie le format standard "A5" (148 par 210 > millime`tres). > o PRINTER_FORMAT_B4 : spe'cifie le format standard "B4" (250 par 354 > millime`tres). > o PRINTER_FORMAT_B5 : spe'cifie le format standard "B5" (182 par 257 > millime`tres). > o PRINTER_FORMAT_FOLIO : spe'cifie le format standard "FOLIO" (8 1/2 par > 13 pouces (2.54cm)). > * PRINTER_PAPER_LENGTH : si PRINTER_PAPER_FORMAT vaut > PRINTER_FORMAT_CUSTOM , PRINTER_PAPER_LENGTH spe'cifie une longueur > personnalise'e de papier, en millime`tres. value doit e^tre un entier . > * PRINTER_PAPER_WIDTH : si PRINTER_PAPER_FORMAT vaut > PRINTER_FORMAT_CUSTOM , PRINTER_PAPER_WIDTH spe'cifie une largeur > personnalise'e de papier, en millime`tres. value doit e^tre un entier . > * PRINTER_SCALE : spe'cifie le facteur de mise a` l'e'chelle du > document. La taille physique de la page imprime'e est alors mise a` > l'e'chelle avec un facteur e'gal a` value /100. Par exemple, si vous > donnez un facteur d'e'chelle de 50, l'impression sera de la moitie' de > la taille du document original. value doit e^tre un entier . > * PRINTER_BACKGROUND_COLOR : spe'cifie la couleur de fond pour le > contexte actuel. value doit e^tre une chai^ne de caracte'res contenant > une couleur au format RGB hexade'cimal : par exemple, "005533". > * PRINTER_TEXT_COLOR : spe'cifie la couleur du texte pour ce contexte > d'imprimante. value doit e^tre une chai^ne de caracte'res contenant une > couleur au format RGB hexade'cimal : par exemple, "005533". > * PRINTER_TEXT_ALIGN : spe'cifie l'alignement du etxte pour le contexte > d'imprimante. value peut e^tre une combinaison, avec l'ope'rateur OR, > des constantes suivantes : > > o PRINTER_TA_BASELINE : le texte sera aligne'e sur la ligne de base. > o PRINTER_TA_BOTTOM : le texte sera aligne'e sur la ligne de fond. > o PRINTER_TA_TOP : le texte sera aligne'e sur la ligne de haut. > o PRINTER_TA_CENTER : le texte sera aligne'e au centre. > o PRINTER_TA_LEFT : le texte sera aligne'e a` gauche. > o PRINTER_TA_RIGHT : le texte sera aligne'e a` droite. > > Exemple avec printer_set_option > > > <?php > $handle = printer_open(); > printer_set_option($handle, PRINTER_SCALE, 75); > printer_set_option($handle, PRINTER_TEXT_ALIGN, PRINTER_TA_LEFT); > printer_close($handle); > ?> > > Ronan Chilvers wrote: > > >Hi Carol > > > >I don't think you'll strike lucky here !! PHP is a server-side, not client-side > >language and therefore doesn't know anything about the client's printer or its > >settings. You can use PHP to create a page that is formatted nicely and will > >therefore print well. There are also some IE specific CSS properties that you can > >use to control line breaks, etc. (These may be supported by other 6+ series > >browsers but I'm not sure). > > > >As far as controlling the printer, you're out of luck. You can use JavaScript to > >start the printing, so that people don't have to go via the menu, but again this > >isn't well supported in older 4.x series browsers. > > > >If anyone knows different I'd be really interested to know about it, but I think > >you're out of luck!! PHP is good, but it can't do the impossible (unless you have > >the php_do_impossible.so module installed!!). > > > >;-) > > > >Ronan > >e: [EMAIL PROTECTED] > >t: 01903 739 997 > >w: www.thelittledot.com > > > >The Little Dot is a partnership of > >Ronan Chilvers and Giles Webberley > > > > > >On 28 May,2003 at 14:03 carol carol wrote: > > > > > > > >>Hy there, > >>I have a problem... > >>I have a linux server, apache, php, and mysql instaled. I can make all kind of > >>queries but I nedd to printed them (using the browser but not usig > >>file->print->page setup-.>.......) in a specified format (like A3, landscape, > >>border=2cm, and all kind of things like that... usin php) > >>Could enyone help? > >>Thanks! > >> > >> > >> > > > > > > > > > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php