LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Password
Puppy This forum is for the discussion of Puppy Linux.

Notices


Reply
  Search this Thread
Old 03-22-2016, 04:33 PM   #1
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Rep: Reputation: 169Reputation: 169
Print rtf file from command line


I used lp to print an rtf file, but it printed the formatting as well.

Any way of printing an rtf file from the command line ?
 
Old 03-22-2016, 04:55 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,350

Rep: Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908
There are various ways to convert RTF to something else. Then it should be printable from the command line. Here are a few.

I think you can install libreoffice.
libreoffice4.2 --headless --invisible --norestore --convert-to pdf test.rtf

I have never used unrtf or ted nor do I know if then can be installed on puppy. unrtf can convert to PS then use ps2pdf. ted is a x11 RTF text processor that can print from the command line.
 
Old 03-22-2016, 05:18 PM   #3
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
I do not wish to convert.

I am guessing that lp can only deal with text files as they are simple.
 
Old 03-22-2016, 06:23 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,350

Rep: Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908
I'm not all that familiar with puppy and so I assume you are using cups. If so, lp and lpr are actually cups command line utilities.

In a nutshell cups will try to determine the type of file with the default being either PS or PDF and apply whatever filter(s) required to convert as necessary to the format required by your printer.

I have not found anything that indicates cups supports rtf files. There are many file types that can not be directly printed from the command line and have to be converted i.e. saved as either by its "native application" or some utility first.

Last edited by michaelk; 03-22-2016 at 06:25 PM.
 
Old 03-22-2016, 07:20 PM   #5
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Thanks.

I will look for a command line method to convert rtf to pdf.
 
Old 03-22-2016, 10:31 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 17,101

Rep: Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552
Maybe. http://unix.stackexchange.com/questi...s-in-text-mode


Might be able to install or use Ted.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cups print to file on command line kairen Slackware 2 01-30-2008 03:05 AM
how to print a html file with css from command line? Lokiji Linux - Software 4 09-17-2007 04:42 AM
Command to print last line of a text file Micro420 Linux - General 3 01-25-2007 02:17 AM
command or shell script to print line range from file minil Programming 3 12-28-2005 09:05 AM
command line utility to convert between formats like .doc, .sxw, .rtf and others? bigtpumped Linux - Software 1 09-12-2005 10:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy

All times are GMT -5. The time now is 10:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration