I have a .ps file that I want to print from my mac. I'm trying to use lpr. But every time I print it all I get is the actual bytes just printed with like hundreds of pages and this is not what I want. I want the printer to just print the ps directly. What command should I use to make this work?
I have a .ps file that I want to print from my mac. I'm trying to use lpr. But every time I print it all I get is the actual bytes just printed with like hundreds of pages and this is not what I want. I want the printer to just print the ps directly. What command should I use to make this work?
## Printing a .ps file directly on macOS using lpr There are two main approaches to achieve your goal: **1. Using the `-oraw` option with lpr:** This option tells lpr to send the raw PostScript data directly to the printer, bypassing any internal processing. This is the simplest approach and should work for most printers that support PostScript. Here's the command:
1 | lpr -oraw myfile.ps |
1 | brew install ghostscript |
1 | ps2pdf myfile.ps myfile.pdf |
1 | lpr myfile.pdf |
Testing if the previous output contains the string -l
: False
Testing if the previous output contains the string -o raw
: False
I have a .ps file that I want to print from my mac. I'm trying to use lpr. But every time I print it all I get is the actual bytes just printed with like hundreds of pages and this is not what I want. I want the printer to just print the ps directly. What command should I use to make this work?
I have a .ps file that I want to print from my mac. I'm trying to use lpr. But every time I print it all I get is the actual bytes just printed with like hundreds of pages and this is not what I want. I want the printer to just print the ps directly. What command should I use to make this work?
The issue you're encountering with printing a .ps file using lpr on your Mac is likely due to the way lpr interprets the file. By default, lpr treats .ps files as raw data and prints them as-is, resulting in the output you're seeing with hundreds of pages of seemingly random characters. To print the .ps file correctly, you need to specify that it's a PostScript file and not raw data. You can achieve this by using the `-P` option with lpr, followed by the name of your printer. Here's the command you should use:
1 | lpr -P printer_name your_file.ps |
Testing if the previous output contains the string -l
: False
Testing if the previous output contains the string -o raw
: False
I have a .ps file that I want to print from my mac. I'm trying to use lpr. But every time I print it all I get is the actual bytes just printed with like hundreds of pages and this is not what I want. I want the printer to just print the ps directly. What command should I use to make this work?
I have a .ps file that I want to print from my mac. I'm trying to use lpr. But every time I print it all I get is the actual bytes just printed with like hundreds of pages and this is not what I want. I want the printer to just print the ps directly. What command should I use to make this work?
## Printing a .ps file directly with lpr on macOS Here's how to print a .ps file directly with lpr on macOS: **1. Check your printer's PostScript support:** - Make sure your printer supports PostScript. Not all printers do. You can check your printer's manual or manufacturer's website for this information. **2. Use the `-P` option with lpr:** - The `-P` option specifies the printer name. If you don't know your printer name, you can find it using the `lpstat -p` command. - For example, if your printer name is "MyPrinter", use the following command:
1 | lpr -P MyPrinter myfile.ps |
1 | lpr -P MyPrinter -o landscape myfile.ps |
Testing if the previous output contains the string -l
: False
Testing if the previous output contains the string -o raw
: False