Anyone know how to set the printing area, margin, paper size, print directly with php?? Please email me the example coding also.
Thank you
PHP print setting!!!
no, neither can you do that.
you have to change settings like that in html, and you cant guarantee they'll work with netscape.
you can setup pagebreaks with relative ease, i suggest you do a google or look on microsofts developer network for help in this area.
page breaks are relatively easy...
if you want a print page break before some text
<br style="page-break-before:always;">
or if you want a print page break AFTER some text
<br style="page-break-after:always;">
use one of these options at any one time, or youll have a blank page for a pagebreak, not ideal.
there are a lot class function for print in php, anyone know or have the example?
"print" in php is to output a string to the screen, like 'echo'.
all the variations on this function all print to the screen, just in a different manner.
cough makes bad attempt at hiding ignorance
now rtfm, cause ur clearly just ignoring me...
i not ignoring you, but i found the php printer function
at: http://www.php.net/manual/en/ref.printer.php
I need more example and coding
The contents as below:
XC. Printer Functions
Introduction
These functions are only available under Windows 9.x, ME, NT4 and 2000. They have been added in PHP 4.0.4.
Installation
Add the line extension=php_printer.dll to your php.ini file.
Runtime Configuration
The behaviour of these functions is affected by settings in php.ini.
Table 1. Printer configuration options
Name Default Changeable
printer.default_printer "" PHP_INI_ALL
For further details and definition of the PHP_INI_* constants see ini_set().
Table of Contents
printer_abort -- Deletes the printer's spool file
printer_close -- Close an open printer connection
printer_create_brush -- Create a new brush
printer_create_dc -- Create a new device context
printer_create_font -- Create a new font
printer_create_pen -- Create a new pen
printer_delete_brush -- Delete a brush
printer_delete_dc -- Delete a device context
printer_delete_font -- Delete a font
printer_delete_pen -- Delete a pen
printer_draw_bmp -- Draw a bmp
printer_draw_chord -- Draw a chord
printer_draw_elipse -- Draw an ellipse
printer_draw_line -- Draw a line
printer_draw_pie -- Draw a pie
printer_draw_rectangle -- Draw a rectangle
printer_draw_roundrect -- Draw a rectangle with rounded corners
printer_draw_text -- Draw text
printer_end_doc -- Close document
printer_end_page -- Close active page
printer_get_option -- Retrieve printer configuration data
printer_list -- Return an array of printers attached to the server
printer_logical_fontheight -- Get logical font height
printer_open -- Open connection to a printer
printer_select_brush -- Select a brush
printer_select_font -- Select a font
printer_select_pen -- Select a pen
printer_set_option -- Configure the printer connection
printer_start_doc -- Start a new document
printer_start_page -- Start a new page
printer_write -- Write data to the printer
oh er, my bad! many apologies...
yes, you're right. are you running php on your local machine then, or a windows server that has a printer attached to it?
I am running a php on a intranet server and each local machine will have a printer.
The example provided in documentation is limited, yet still not understand with it.
Anyone got idea with the printer setting? I am headache with it, because even search engine result also limited.
php will only print to the machine php is actually running on. i dont think you can, for example, have php (running on a cobalt raq4 on my desk) print to a printer connected to my pc.
also seems like the functions that do exist there give no options for print margin etc...
Hi i'm printing raw to a panasonic kp-2130 dot printer, i need to print a Invoice, i can manipulate de position of each field using printer_draw_text but I just can find a way to manipuilate the page lenght, i now i have to use printer_set_option but i dont now how :queasy: could anybody helo me???????