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

# Printing PostScript Files on Mac It sounds like your printer isn't interpreting the PostScript code properly and is instead treating it as plain text. Here are some solutions: ## Best Options 1. **Convert to PDF first (recommended)**:

1
2
3
   ps2pdf your_file.ps your_file.pdf
   lpr your_file.pdf
   
2. **Open in Preview app**:
1
2
   open -a Preview your_file.ps
   
Then print using the standard print dialog (⌘P) 3. **Use the raw option**:
1
2
   lpr -o raw your_file.ps
   
4. **Try the literal option**:
1
2
   lpr -l your_file.ps
   
## Why This Is Happening Your printer or print system is treating the PostScript file as regular text instead of interpreting the PostScript commands. Converting to PDF first is often the most reliable solution since macOS has better built-in support for PDF printing. If you frequently need to print PostScript files, you might want to check if your printer supports PostScript natively in its driver settings.

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

# Printing PostScript Files on Mac When printing PS files with `lpr` directly, macOS often treats them as text files, which results in the raw PostScript code being printed instead of the rendered document. ## Solution Options 1. **Specify the document format (recommended)**:

1
2
   lpr -o document-format=application/postscript your_file.ps
   
2. **Convert to PDF first**:
1
2
3
   pstopdf your_file.ps
   lpr your_file.pdf
   
3. **Use the raw option**:
1
2
   lpr -o raw your_file.ps
   
4. **Open with Preview and print from there**:
1
2
   open -a Preview your_file.ps
   
Then use the print dialogue from Preview. The first option should work in most cases. If you have multiple printers, you can specify which one to use with the `-P` flag:
1
lpr -P printer_name -o document-format=application/postscript your_file.ps
Let me know if you need more specific help for your printer setup!

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