PHP has an extension that allows you to print to a printer connected to the server using the printing features ( sadly the documentation is not available in Spanish and the extension is only for Windows).
The most difficult thing about this extension is to make it work (I tried it in the past with WampServer and I did not get it), you can find the necessary files in official PHP page and instructions on how to install them here (although the basic idea is to copy the DLL to the PHP extensions folder and activate it in php.ini).
Once you have the extension installed and running, you can use the method printer_draw_text
to put text in the specified coordinates (my translation):
Description
void printer_draw_text ( resource $printer_handle , string $text , int $x , int $y )
The function draws text in the x position, and using the selected font.
Parameters
printer_handle
printer_handle must be a valid driver for a printer.
text
The text to write.
x
x is the x coordinate of the position.
and
and it is the y-coordinate of the position.
And here is an example of how it is used taken from that same php.net page (I have renamed some variables to make it easier to follow and added comments to facilitate understanding):
<?php
// conectamos a la impresora y comenzamos un documento de impresión
$controlador = printer_open();
printer_start_doc($controlador, "Mi Documento");
printer_start_page($controlador);
// seleccionamos una fuente Arial con 72x48 pixels de alto x ancho y sin negrita
$fuente = printer_create_font("Arial", 72, 48, 400, false, false, false, 0);
printer_select_font($controlador, $fuente);
// escribimos el texto "Test" en la posición 10,10 de la página
printer_draw_text($controlador, "Test", 10, 10);
printer_delete_font($fuente);
// finalizamos el documento y cerramos la conexión con la impresora
printer_end_page($controlador);
printer_end_doc($controlador);
printer_close($controlador);
?>