[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to create a PDF-Printer from the command line



On 2018-01-06, Brian <ad44@cityscape.co.uk> wrote:
> On Sat 06 Jan 2018 at 05:54:00 +0100, john doe wrote:
>
>> On 1/6/2018 4:06 AM, Jason wrote:
>> > On a RasperryPi with Raspbian, I would like to create a PDF Printer to
>> > print files to. I only know how to do this with the GUI program
>> > system-config-printer but I don't want to install that on this
>> > Pi. What shell command do I need to create a PDF printer on the Pi (or
>> > on any Debian, for that matter)?
>> > 
>> 
>> Why do you want to"print" if you can convert to pdf using the command line?
>> Based on the original file extension you simply search for a utility that
>> will convert your original file to pdf.
>
> How does one convert a text file to a PDF using the command line?
>

 unoconv -f pdf text.txt
 cupsfilter text.txt > text.pdf
 enscript text.txt -o - | ps2pdf - text.pdf

The above works here.

-- 
"An autobiography is only to be trusted when it reveals something disgraceful.
A man who gives a good account of himself is probably lying, since any life
when viewed from the inside is simply a series of defeats."
— George Orwell


Reply to: