PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
is there a way of controing document printing with php
//i appreciate your replies but what i really want is (
select data from my database and after doing this, print out the information
roll by roll to an A4 paper. pleas i am still very much a beginer in php so pleas be very comprensive thanks in advance.
Last edited by shaun112 on Mon Jul 07, 2008 12:34 pm, edited 1 time in total.
When you link to a CSS style sheet you need to specify a media type, options are...
all - Suitable for all devices
aural - Intended for speech synthesizers. See the section on aural style sheets for details.
braille - Intended for braille tactile feedback devices.
embossed - Intended for paged braille printers.
handheld - Intended for handheld devices (typically small screen, monochrome, limited bandwidth).
print - Intended for paged, opaque material and for documents viewed on screen in print preview mode. Please consult the section on paged media for information about formatting issues that are specific to paged media.
projection - Intended for projected presentations, for example projectors or print to transparencies. Please consult the section on paged media for information about formatting issues that are specific to paged media.
screen - Intended primarily for color computer screens.
tty - Intended for media using a fixed-pitch character grid, such as teletypes, terminals, or portable devices with limited display capabilities. Authors should not use pixel units with the "tty" media type.
tv - Intended for television-type devices (low resolution, color, limited-scrollability screens, sound available).
So just use the print option and code the CSS to how you want it to print, if at all, as you can do display none on the body and nothing will print.