Re: Printing from euphoria on OSX box

new topic     » goto parent     » topic index » view thread      » older message » newer message
ChrisB said...
jimcbrown said...

For Linux and FreeBSD, you can replace "LPT1" with "/dev/lp" or "/dev/lp0" if you are using an old parallel port printer.

If you are using USB, it is tricker. You need to have a good understanding of the OS's device node naming conventions (devfs on FreeBSD and probably udev on Linux) to figure it out.

It is probably easier to print on Linux and FreeBSD by writing to a temporary file (e.g. "/tmp/temp.txt") and then running lpr (e.g. system("lpr /tmp/temp.txt", 2) ) than trying to open and write to the printer directly.

Hi

I use enscript to format and print text files. ie

1. write out a temp text file. 2. enscript [options] text_file 3. delete the temp text file

enscript will print to the default printer using CUPS, but first converts a text file to an intermediate postscript file, but makes it a lot easier to do other stuff, like add borders, page numbers, orientation etc.

http://www.codento.com/people/mtr/genscript/enscript.man.html

If you want to print graphics then use the netpbm utilities to convert various types to output to a printer. I use this to convert and output fax images to a ps file for printing on a windows machine.

http://netpbm.sourceforge.net/

ppmdarw and ppmlabel would seem to have tha ability to add text to a graphic file, though I haven'e usedthem myself.

Chris

I solved the issue buy taking both yours and Jim's advice. Using system("enscript <file_name>", 2) or system("lpr <file_name", 2) works just fine on *nix boxes. Should this be written up somewhere - Tips-N-Tricks / Hints / HOWTOs?

Thanks again U 2! duke

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu