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?
You're on the right track with `lpr`, but you need to tell it to treat the file as raw PostScript data. Here's how to do it:
1 | lpr -o raw filename.ps |
Testing if the previous output contains the string -l
: False
Testing if the previous output contains the string -o raw
: True
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?
You're absolutely right, seeing raw PostScript data instead of your intended document is frustrating! Here's how to fix it and get your .ps file printing correctly from your Mac: **Understanding the Issue:** The problem is that your printer isn't interpreting the PostScript code; it's treating it as plain text. This usually happens when the communication method with your printer isn't set up to handle raw PostScript. **The Solution:** You generally *don't* send PostScript directly to most modern printers. Instead, you use a program that converts the PostScript into a format the printer understands. Here's the most reliable approach: 1. **Open with Preview:** - **Double-click your .ps file.** Preview, your Mac's built-in image and document viewer, can handle PostScript files. - **Go to File > Print.** 2. **Choose Your Printer:** - Make sure the correct printer is selected in the print dialog. 3. **(Optional) Adjust Settings:** - Preview's print dialog lets you adjust settings like paper size, orientation, and scaling if needed. 4. **Print:** - Click "Print" to send the job to your printer. Preview will handle the conversion process behind the scenes. **Why This Works:** Preview acts as an intermediary. It understands the PostScript code, converts it into a format your printer can understand (likely PDF or a printer-specific language), and then sends the converted data for printing. **Important Notes:** * **Older Printers:** If you have a very old PostScript printer, the direct `lpr` method might still be necessary. You'd need to configure `lpr` to use the correct port and potentially specify a PostScript interpreter. However, this is less common today. * **Ghostscript (Advanced):** For very fine-grained control over PostScript processing, you could install Ghostscript (a powerful PostScript interpreter). However, this is usually overkill for simple printing tasks. Let me know if you have any more questions or if you're still having trouble printing your file!
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?
You're right, simply using `lpr` without any options might send the raw PostScript data to your printer instead of interpreting it. Here's how to fix it and some additional tips: **Understanding the Issue** PostScript (.ps) files are like programs written in the PostScript language. Your printer needs to understand and execute these instructions to produce the intended output. If you simply send the raw file, it treats the code as text. **Solutions** 1. **Let Your Mac Handle It (Easiest)** - **Double-click:** The easiest way is to simply double-click the .ps file. macOS usually associates .ps files with Preview or another suitable application. This should open the file, and you can then print it normally. - **Open with Preview:** If double-clicking doesn't work, right-click the .ps file, select "Open With," and choose "Preview" (or another compatible viewer). 2. **Using `lpr` with the Correct Options (For Advanced Users)** - **Specify the Interpreter:** Some printers might require you to explicitly tell `lpr` to use a PostScript interpreter. You can try:
1 2 | lpr -P "your_printer_name" -o interpreter=postscript filename.ps |
1 2 | lpr -P "your_printer_name" -o raw filename.ps |
Testing if the previous output contains the string -l
: False
Testing if the previous output contains the string -o raw
: True
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?
You're absolutely right; seeing the raw PostScript data means your printer isn't interpreting the file correctly. Here's how to fix it and get your .ps file to print as intended: **Understanding the Issue** The problem is that your system is treating the .ps file as plain text rather than sending it directly to the printer for interpretation. **Solution: Using `lpr` Correctly** The `lpr` command is designed to handle this, but you need to make sure you're using it with the right options. Here's the command you should use:
1 | lpr -o raw filename.ps |
Testing if the previous output contains the string -l
: False
Testing if the previous output contains the string -o raw
: True
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?
You're right, simply using `lpr` without any options will treat the .ps file as plain text. To print a PostScript file directly, you need to tell `lpr` to interpret it as such. Here's how: **Using the `-l` option with `lpr`:**
1 2 | lpr -l your_file.ps |
Testing if the previous output contains the string -l
: True
Testing if the previous output contains the string -o raw
: False