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?
To print a PostScript (.ps) file directly from your Mac using the `lpr` command in the terminal, you should ensure that your printer supports PostScript. Many modern printers do, but some lower-cost models might not, or might require manual configuration to enable PostScript support. Given your printer supports PostScript, the basic command to print a .ps file would be straightforward, like so:
1 | lpr filename.ps |
1 | lpr -P printer_name filename.ps |
1 | brew install ghostscript |
1 | gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf input.ps |
1 | lpr output.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?
When you're trying to print a PostScript (.ps) file directly from a Mac using the command line tool `lpr`, you need to ensure that the printer understands PostScript. If the printer doesn't natively support PostScript or is not properly configured to recognize the format, it may just print out the raw data of the file, leading to pages of unreadable text. Here's how you can attempt to print a .ps file directly: ### Step 1: Check Printer Compatibility First, ensure your printer supports PostScript. Most office and professional printers do, but many consumer-level printers do not. You can usually find this information in your printer's manual or by looking up its specifications online. ### Step 2: Use the Correct Command If your printer supports PostScript, you can use the `lpr` command in the Terminal to print your `.ps` file. Navigate to the directory containing your file, then use:
1 | lpr -P [Printer_Name] [file_name.ps] |
1 | ps2pdf file_name.ps output_name.pdf |
1 | lpr -P [Printer_Name] output_name.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?
To print a PostScript (.ps) file directly from a Mac using the `lpr` command, you should be able to do so without any issues since `lpr` and the underlying CUPS (Common UNIX Printing System) support PostScript natively. However, the behavior you're experiencing suggests that the printer or its driver might not be interpreting the PostScript file correctly, treating it as plain text instead. Here's how you can attempt to print your .ps file correctly using `lpr` from the terminal: 1. **Ensure Your Printer Supports PostScript**: First, make sure your printer supports PostScript. Most office and many high-end home printers do, but some budget or older printers might not. If your printer doesn't support PostScript files natively, it will treat them as plain text, leading to the output you described. 2. **Use the Correct Printer Queue**: If you have multiple printers, ensure you're sending the job to the right one. You can list all available printers and their statuses with `lpstat -p`. 3. **Print Using `lpr`**: Navigate to the folder containing your .ps file using the `cd` command. Use the `lpr` command to send the file to the printer. If your printer supports PostScript and is the default printer, you can print the file directly with:
1 2 | lpr filename.ps |
1 2 | lpr -P Office_Printer filename.ps |
1 2 | lpr -P Office_Printer -o document-format=application/postscript filename.ps |
1 | ps2pdf filename.ps filename.pdf |
1 | lpr filename.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?
It sounds like the printer is not recognizing the PostScript (.ps) file format and is instead treating it as plain text. This usually happens when the printer is not directly PostScript-capable or the job isn't being sent in a way that the printer can recognize as PostScript. To print a `.ps` file from a Mac using the `lpr` command in Terminal and ensure it is correctly interpreted as PostScript, you should: 1. Ensure your printer supports PostScript. Not all printers understand PostScript natively. If your printer doesn't support PostScript, you might need to convert the `.ps` file to a PDF or another format your printer understands. You can use a tool like `ps2pdf` which is part of Ghostscript to convert your `.ps` file to a `.pdf` file, then print the PDF instead. 2. If your printer does support PostScript, then ensure you are specifying the correct printer queue and options. You might need to explicitly tell `lpr` to treat the file as PostScript using the `-o raw` option, which sends the file directly to the printer without any modification or filtering:
1 2 | lpr -P printer_name -o raw yourfile.ps |
1 2 | ps2pdf yourfile.ps yourfile.pdf |
1 2 | lpr -P printer_name yourfile.pdf |
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?
To print a PostScript (.ps) file directly on a Mac using the `lpr` command, you need to ensure that the command is used correctly so that the printer recognizes and processes the .ps file as PostScript commands rather than plain text. The behavior you're experiencing typically occurs when the printer or print system interprets the .ps file as plain text instead of processing the PostScript commands contained within the file. Here's a step-by-step guide to print a .ps file using `lpr` from the Terminal on a Mac: 1. **Open Terminal**: You can find Terminal in Applications > Utilities. 2. **Navigate to the Directory Containing Your .ps File**: Use the `cd` command to change directories to where your .ps file is located. For example, if your file is on the desktop, you could type:
1 2 | cd ~/Desktop |
1 2 | lpr -P printer_name file_name.ps |
1 2 | lpstat -p -d |
1 2 | lpr file_name.ps |
1 2 | ps2pdf file_name.ps output_file_name.pdf |
Testing if the previous output contains the string -l
: False
Testing if the previous output contains the string -o raw
: False