At 06.04.2002 17:51, you wrote: >Hi! > >I have this website with a webshop that customers can order some products. >And when the products are listed up in the cart on the screen, would I like >to get the output >into a new txtfile and save it on the server. Then it is possible to get it >faxed, and that is the goal. > >Anyone who has done this before? Assuming you have a Linux box running, I did the following, writing the data you got from cart to a .txt file using fopen(), fputs() then translate this with a2ps (takes time to get the commandline, so I post it here)
a2ps -q -r --footer="nothing" -B --borders=1 --font-size=10.0 --tabsize=3 (cutted here, space between -- parameters) --left-title="Your Title" -oout1.ps YourInput.txt Then use Ghostscript to make a faxfile (as above) gs -q -dBATCH -sDEVICE=faxg3 -sOUTPUTFILE=send -sPAPERSIZE=a4 -dNOPAUSE out1.ps then sendfax (package mgetty+sendfax) to send this file I used sendfax, as it is easy to configure, and the commandline is not so big ;-) the commands to a2ps, gs and sendfax are transmitted via exec() HTH Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php