Initial Query

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?

LLM Generation

Query

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?

Output

For printing PostScript (.ps) files directly on a Mac, you can try these approaches: 1. Using lpr with the -o raw flag:

1
lpr -o raw filename.ps
2. Using ps2pdf to convert to PDF first, then print:
1
2
ps2pdf filename.ps filename.pdf
lpr filename.pdf
3. Specifying the PostScript printer driver:
1
lpr -P printername -o document-format=application/postscript filename.ps
If these don't work, you might need to ensure you have PostScript support installed on your system. You can also try using the CUPS web interface (http://localhost:631) to configure your printer properly for PostScript printing. As a last resort, you could also open the .ps file in Preview.app and print from there. Which printer model are you using? That information might help provide a more specific solution.

Check if any of the following conditions are true:

Substring Evaluation

Testing if the previous output contains the string -l: False

Substring Evaluation

Testing if the previous output contains the string -o raw: True

Final Answer: True

Initial Query

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?

LLM Generation

Query

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?

Output

To properly print a PostScript (.ps) file on a Mac using the command line, you should use either of these approaches: 1. Using `lpr` with the `-P` option and specifying PostScript mode:

1
lpr -P printer_name -o raw file.ps
2. Using `lp` command:
1
lp -d printer_name file.ps
If you don't know your printer name, you can find it using:
1
lpstat -p
or
1
lpstat -a
If you're still having issues, you might need to convert the PostScript file to PDF first using:
1
ps2pdf file.ps file.pdf
And then print the PDF:
1
lpr file.pdf
The conversion approach often works better on modern systems since PDF is more widely supported than PostScript these days.

Check if any of the following conditions are true:

Substring Evaluation

Testing if the previous output contains the string -l: False

Substring Evaluation

Testing if the previous output contains the string -o raw: True

Final Answer: True

Initial Query

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?

LLM Generation

Query

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?

Output

For printing PostScript (.ps) files directly on a Mac, you can try these approaches: 1. Use `lpr` with the `-o raw` option:

1
lpr -o raw filename.ps
2. If that doesn't work, try using `enscript`:
1
enscript -r filename.ps
3. You can also convert the PS file to PDF first using `ps2pdf` and then print:
1
2
ps2pdf filename.ps filename.pdf
lpr filename.pdf
If you don't have `ps2pdf` installed, you can install it via Homebrew:
1
brew install ghostscript
The conversion to PDF method (option 3) is often the most reliable approach on macOS, as PDF handling is better integrated into the system. Make sure your printer supports PostScript directly if you're trying to print the PS file without conversion. If it doesn't, the PDF conversion method will be your best option.

Check if any of the following conditions are true:

Substring Evaluation

Testing if the previous output contains the string -l: False

Substring Evaluation

Testing if the previous output contains the string -o raw: True

Final Answer: True

Initial Query

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?

LLM Generation

Query

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?

Output

To properly print a PostScript (.ps) file on a Mac using the command line, you should try one of these approaches: 1. Using `lp` with the `-o` option:

1
lp -o raw filename.ps
2. Using `lpr` with the `-l` flag (which tells it to treat the file as raw data):
1
lpr -l filename.ps
3. If those don't work, you can try converting the PS file to PDF first using `ps2pdf`, then print the PDF:
1
2
ps2pdf filename.ps filename.pdf
lpr filename.pdf
If you don't have ps2pdf installed, you can install it via Homebrew:
1
brew install ghostscript
The `-l` flag with `lpr` or the `-o raw` option with `lp` should prevent the printer from treating the PostScript file as plain text, which is why you're seeing the raw bytes printed instead of the actual document.

Check if any of the following conditions are true:

Substring Evaluation

Testing if the previous output contains the string -l: True

Substring Evaluation

Testing if the previous output contains the string -o raw: True

Final Answer: True

Initial Query

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?

LLM Generation

Query

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?

Output

To properly print a PostScript (.ps) file on macOS using the command line, you should try one of these approaches: 1. Using `lpr` with the `-o raw` option:

1
lpr -o raw filename.ps
2. Using `lp` with the `-o raw` option:
1
lp -o raw filename.ps
If those don't work, you can also try converting the PS file to PDF first using `ps2pdf` (if you have Ghostscript installed), and then print the PDF:
1
2
ps2pdf filename.ps filename.pdf
lpr filename.pdf
To install Ghostscript if you don't have it, you can use Homebrew:
1
brew install ghostscript
The key is using the `-o raw` option, which tells the printer to treat the input as raw PostScript data rather than trying to interpret it as plain text.

Check if any of the following conditions are true:

Substring Evaluation

Testing if the previous output contains the string -l: False

Substring Evaluation

Testing if the previous output contains the string -o raw: True

Final Answer: True