Re: Re[2]: [PHP] printing
| From: | Bill MacAllister | Date: | Thu, 23 Aug 2001 17:57:22 +0000 |
| Subject: | Re: Re[2]: [PHP] printing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-64149@lists.php.net to get a copy of this message | ||
The way that I do it on Linux is to generate TeX output, invoke TeX using system(), and then just lpr the output to the printer. The current production system that I am using actually uses a perl script invoked from a php script, really ugly, but I had the perl script from another project.
Here is a PHP example:
$tex_file = "/tmp/file.tex";
$dvi_file = "/tmp/file.dvi";
$fp = fopen ($tex,"w");
fputs ($fp, "This is a short story.\n");
fputs ($fp, "\\end\n");
fclose($fp);
system ("tex --output-directory /tmp $tex_file >> $log_file");
system ("dvips -P el4050 $dvi_file");
You have to understand TeX/LaTeX. The good news is that if you use TeX you will end up with output that the fools that use Crystal Reports will drool over.
Bill
--On Tuesday, August 14, 2001 2:47 PM +0100 Fernando Avila <fano@inter-k.com.ar> wrote:
Hello Matthew, Friday, August 10, 2001, 8:55:24 PM, you wrote: ML> If you run windows, then see: ML> http://www.php.net/manual/en/ref.printer.php ML> -----Original Message----- ML> From: Fernando Avila [mailto:fano@inter-k.com.ar] ML> Sent: Friday, August 10, 2001 10:18 AM ML> To: php-general@lists.php.net ML> Subject: [PHP] printing ML> Hello php-general, ML> I was thinking about my problem about printing reports ML> CAn i do something like connecting a printer to the server where php ML> and mysql runs.. And when someone send the comand to print the quote ML> get printed in the server's printer? ML> if it's posible maybe i will be albe to print a good quote And if i run linux? because I have a redhat 6.2 server Thanks -- Best regards,+------------------------------------------------------- | Bill MacAllister, Senior Programmer | PRIDE Industries | 10030 Foothills Blvd., Dept 1150 | Roseville, California 95747 | Phone: +1 916-788-2402Fernando mailto:fano@inter-k.com.ar-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net