Nicely Printing Plain Text [SOLVED]

Hey, this is a question that has been bugging me for a while. When I print plain-text files the type is large, the margins are too thin, and the text is split up. Is there a way to pretty-print ascii files? I use CUPS with lp.
I do use LaTeX quite a bit, but I am still a beginner. I have a script that converts a text file to use the minimal document class but it isn't quite minimal enough for me. I suppose I could try a inserting the text into a verbatim block, but I wanted to ask how other people print text files.
Surely there is some sort of filter that makes a reasonable text size, page layout and such?
Any help is greatly appreciated.
Last edited by egan (2009-09-01 02:29:51)

hey, i'll throw in a protip!
enscript -p - "/path/to/file.txt" | psselect -r | lp
to print a document in reverse page order.  it's my default print command out of mutt (set pipe_decode and it prints emails beautifully).

Similar Messages

  • Why can't I print "plain text"

    When I receive email in plain text it prints in random numbers and letters. If I use Internet explorer there is no problem

    Try using the Print Preview and see if those text messages display properly there. If so, try to Print from that Preview window and see if it prints properly.
    orange Firefox button > Print -> Print Preview

  • When i try to print an e-mail, it print it on script. How I can get back to print in plain text

    I try to print an e-mail but it print in script, how I can back to print in plain text. I need to print some important documents.
    Please help
    This question was solved.
    View Solution.

    Download Smart Web Printing software for your printer found here:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01812475&tmp_task=useCategory&cc=au&dlc=en&lc=e...
    Although I am working on behalf of HP, I am speaking for myself and not for HP.
    Love Kudos! If you feel my post has helped you please click the White Kudos! Star just below my name : )
    If you feel my answer has fixed your problem please click 'Mark As Solution' and make it easier for others to find help quickly : )
    Happy Troubleshooting : )

  • [SOLVED] Thunar sees both '.doc' and '.txt' as plain text files...

    Hello,
    I'm using Thunar as my file manager. However, it sees both '.doc' and '.txt' files as "plain text files".
    This means that I can't make the .doc files open with OpenOffice and the .txt files open with a plaintext editor, because whenever I change the program association of one, the other changes.
    How to fix that? (looks like a MIME-type issue).
    Thanks.
    Last edited by Renan Birck (2009-08-14 15:57:05)

    DaVince wrote:Open /usr/share/mime/globs and /usr/share/mime/globs2, find the lines that assign *.doc to the plaintext mime type, and remove them. Restart Thunar, problem solved.
    Finally it works. Thanks!

  • [SOLVED] Printer prints garbage text - Error with pstoraster

    I have a Epson Stylus C43SX printer, which is connected to LPT#1.
    When I try to print something, the printer will print garbage text.
    From cups manager browser interface ( http://localhost:631 ), if I try to print the test page, it prints out garbage.
    If I select 'Print self-test page', the cups manager reports an error -
    "/usr/lib/cups/filter/pstoraster failed"
    The description of printer, as seen on cups manager page -
    Description: Epson Stylus C43SX
    Location:
    Printer Driver: Epson Stylus C43SX - CUPS+Gutenprint v5.0.1
    Printer State: idle, accepting jobs, published.
    Device URI: parallel:/dev/lp0
    Cups package version                      cups 1.3.4-1
    Gutenprint package version              gutenprint 5.0.1-3
    Thanks in advance!
    Edit: Added [SOLVED] to the subject
    Last edited by d2v (2007-11-17 08:21:25)

    I can print properly again. I reinstalled arch and added the printer using cups http interface.

  • Plain text print speed thru lpr vs. BBEdit

    When I send a plain text file to the Unix lpr command, it prints slowly; when I print with, say, BBEdit, the same text comes out much faster.
    I'm using an iBook G3 600 MHz with USB 1.0, OS X 10.4.11, and
    an Epson Stylus CX6000--a recent, non-Postscript inkjet printer with recent driver from Epson.
    Example: a one-page, 897-byte file. Counting from the time the paper starts to move:
    lpr: 120 sec (7.5 characters per second, slower than a teletype)
    enscript: 90 sec
    BBEdit: 20 sec
    (To top it off lpr uses an awful 14-point narrow font...but I already can print slowly in a better font.)
    It doesn't seem to be simply a matter of communication speed. Printing through lpr, the print head is constantly moving, but the paper advances very slowly, as if by scan lines. Printing from BBEdit, the paper advances like an inch at a time.
    My guess is that BBEdit gives the text to the printer driver which basically sends it on as text to the printer, which has a fast way to print text, while lpr goes through a postscript/bitmap process. In fact lpr is slower than enscript, which explicitly converts to postscript (which has to be rendered in the computer) before printing. (The lpr/enscript speed difference may be because lpr uses a bigger default font.)
    So: how can I access that fast text printing ability from Unix? Is there some sample Unix-style C source code out there that calls the same API that BBEdit is calling, that would be easy to adapt to printing text from a file or stdin?
    Or, an option or utility already in Mac OS X? A third-party utility that's already out there?
    --Steve
    P.S. Camino printing the edit page for this post (multiple fonts, boxes, sidebar, etc.): 28 sec. Also, inch-at-a-time.

    YES!!
    The BBEdit command line tool was apparently introduced in version 6.5, which is the version I have. In the BBEdit folder (the folder BBEdit.app is in) there is a "BBEdit Extras" folder with a "BBEdit Unix Tools Installer.dmg".
    Once installed there's a Unix command "bbedit", and you can do "man bbedit".
    Besides -p for print there's -b for background, so you never even see anything happen on the screen.
    It prints with the defaults set in BBEdit's preferences. I like Courier 10.
    I do appreciate enscript. That's what I meant when I said I already knew how to print nice fonts slowly. Also, 2-up is nice, I have my own script for it!
    Thanks a lot, etresoft!
    --Steve

  • Printing, DocumentRenderer bold my plain text, why?

    Hi,
    I use the DocumentRenderer class from (*) to print a plain text report.
    (*) http://www.fawcette.com/javapro/2002_12/online/print_kgauthier_12_10_02/
    i load the plain text report from a string into a jEditorPane. (it's only a string, no styled, no html tags)
    inside the print methord, i usegraphics2d.setFont(new Font("monospaced",Font.PLAIN,8)) to set the font. i expect it to be very plain, but it gives me the following result, it's a screenshot from my post script viewer.
    http://earth2yu.spymac.com/snapshot7.png
    why the documentRenderer bold the stuff for me?

    Crosspost:
    http://forum.java.sun.com/thread.jspa?threadID=633835&messageID=3677081#3677081

  • How do I save e-mail content on my MacBook Air,so I may print them as plain text?

    How do I save e-mail content on my MacBook Air, so I may ptint the content as plain text?

    10.7 Lion
    http://support.apple.com/kb/PH4858
    10.8 Mountain Lion
    http://support.apple.com/kb/PH11746

  • With "Download Headers" option checked, opening plain text emails results in cropped body text

    When I open raw plain text emails (i.e. not formatted as HTML) I only see the first
    255 characters of the email body; all of the remainder is chopped off, and never appears no matter how many times I re-open the email.
    I have narrowed this down to my somewhat unusual download preferences in Outlook. They are configured as follows:
      Send/Receive -> Download Preferences -> Download Headers (checked).
    I know the email text is there in full, because when I point my web browser at OWA, I can see the full body.
    If at first I choose Mark to Download and then Process Marked Headers, I can then open the plain text email and see the body in full.
    When I open HTML emails I have no problems, regardless of whether the email download was forced or not.
    This issue existed on my old Office 2010 installation for XP too. It persists now I have upgraded to Office 2013 on Win 7.
    This is not an acknowledged issue yet within the Outlook team (in fact, a possibly related issue was
    reported by someone else 3 months ago but suggested to be a font corruption issue, which is incorrect).
    It seems like Outlook just forgets to download the full text for plain text emails when opening them. It's repeatable every time, so it doesn't seem like a race condition. (To reproduce: set your Inbox download preferences as above, then send
    yourself a plain text email, wait for the Inbox headers to finish refreshing and then open the new email).
    We use a 3rd party provider (Cobweb) for our email service and I believe they are using Exchange 2013.
    We use ESET Smart Security Suite and I have tried disabling the scanner for that but see no change in the outcome. I would appreciate if anyone without ESET could try to reproduce these steps for themselves and confirm.
    Starting Outlook in Safe Mode does not solve it.
    Note: I already asked this
    question at the Office Community site and it was suggested I
    post on the Exchange Server Outlook Clients forum. The feedback there suggested it to be client related, so now I've been directed to post here!
    Thanks,
    Marcel

    Hi Melon, thanks for your response.
    My plain text font is set up as the default, Automatic.
    In any case, I can see the first 255 characters of the plain text body, so plain text font colour can be eliminated as a potential problem.
    After the 255th character, the body text then stops. There are no "hidden characters". If I shrink the window height to accommodate just what I see, the vertical scrollbar does not appear. This confirms that there are no hidden lines of text
    below.
    The mail is simply not downloaded from the server correctly. If I drag the mail onto my desktop, then view that file in Programmer's Notepad, I can see that after the position representing the 255th character in the body of the email, there is garbage (control
    characters).
    If, instead, I first mark the email for downloaded and then click the "process marked headers", wait for it to download and then drag it onto my desktop, by contrast, the body contents look complete and this is reflected in the fact that I can
    see the whole email when I open it in Outlook.
    This problem has so far affected me on four different PC setups (1xWinXP, 3xWin7) and two versions of Outlook (2010 and 2013). However, Cobweb -- our cloud email provider -- did recently upgrade to Exchange 2013, so that might be an important factor.
    I don't think I can remember seeing these plain text issues in the 10 years previous to that upgrade during which I've been using various flavours of Outlook.
    I have supplied repro steps in the original report above. Could someone please try these? I have expanded them in full below for simplicity:
    To reproduce:
    1. Change your download preferences in Outlook. They are configured from the ribbon bar as follows (assuming you are using Outlook in Cached Exchange mode, connecting to Exchange 2013):
      Send/Receive -> Download Preferences -> Download Headers (checked).
    2. Send yourself a plain text email containing more than 300 characters of text.
    3. Wait for the Inbox headers to finish refreshing.
    4. Open the new email.
    Result: The email body will be truncated at the 255th character.
    Expected: The email body should show all the characters.

  • How to get plain text out of a multi line text field in Client Side Object Model?

    I am trying to read plain text from a MultiLineTextField in a List. This is how my code looks so far:
    //Get connection
    ClientContext context = new ClientContext("URL");
    Web site = context.Web;
    context.Load(site);
    context.ExecuteQuery();
    //Get list collection
    ListCollection lists = context.Web.Lists;
    context.Load(lists);
    context.ExecuteQuery();
    //Get specific list
    List menu = lists.GetByTitle("menu");
    CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXML = "<View/>";
    ListItemCollection dishes = menu.GetItems(camlQuery);
    context.Load(menu);
    context.Load(dishes);
    context.ExecuteQuery();
    //Iterate through all dishes
    foreach(ListItem dish in dishes)
    Console.WriteLine("Dish: {0}:", dish.FieldValues["Name"]);
    Console.WriteLine("Price: {0}:", dish.FieldValues["Price"]);
    //Here I get my problem
    Console.WriteLine("Ingredients: {0}:", dish.FieldValues["Ingredients"]);
    In the last line where I try to read the ingredients, I am reading from a MultiLineTextField which is set to RichText. It is also supposed to stay in RichText format, as hyperlinks are supposed to be added there. The problem is that the output not only contains
    div-tags but also some weird question marks I never added to the field. I am trying to solve this issue for a couple of days now but it seems that there are only two possible solutions.
    Set the field from RichText to PlainText, which is not an option in my case.
    Use Regex to remove the div-tags. Please do not suggest this option. Mainly because I do not consider this to be a clean solution for this issue. Plus, I tried it and it removes the tags but those weird question marks stay.
    There seems to be a third option I found
    here. It is also mentioned in this
    question and it seems to work. But I can not get it to work for me. This is how it looks:
    string myString = item.FieldMultiLineText[Field_Name];
    So I wonder what is item supposed to be here? I suppose it is not a
    ListItem because in my case it does not offer a FieldMultiLineText-property.
    A short, informative code snippet would be great if you decide to help me with this issue.
    Thanks in advance.
    Algorithmen und Datenstrukturen in C#:
    TechNet Wiki

    Thank you for your reply. Unfortunately ListItem does not contain a definition for the Fields method.
    Algorithmen und Datenstrukturen in C#:
    TechNet Wiki
    You need to use the Microsoft.SharePoint class library and then use the sharepoint version of all the list objects you are using. See below.
    //Get connection
    ClientContext context = new ClientContext("URL");
    Web site = context.Web;
    context.Load(site);
    context.ExecuteQuery();
    //Get list collection
    SPListCollection lists = context.Web.Lists;
    context.Load(lists);
    context.ExecuteQuery();
    //Get specific list
    SPList menu = lists.GetByTitle("menu");
    CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXML = "<View/>";
    SPListItemCollection dishes = menu.GetItems(camlQuery);
    context.Load(menu);
    context.Load(dishes);
    context.ExecuteQuery();
    //Iterate through all dishes
    foreach(SPListItem dish in dishes)
    Console.WriteLine("Dish: {0}:", dish.FieldValues["Name"]);
    Console.WriteLine("Price: {0}:", dish.FieldValues["Price"]);
    //Here I get my problem
    SPFieldMultiLineText multilineField = dish.Fields.GetField("Ingredients") as SPFieldMultiLineText;
    string ingredients = "";
    if (multilineField != null)
    ingredients = multilineField.GetFieldValueAsText(dish["Ingredients"]);
    Console.WriteLine("Ingredients: {0}:", ingredients);}
    I hope this helps
    Alex

  • How to print hardcode text in alv

    hi folks,
    i am working on a report to display data using ALV.
    i want to print some text and its correspodning value. (corresponding value is calculated value).
    i am able to print calculated value using fieldcatalog but unable to understand how can i print the text(which is a hardcoded text).
    ex:
    statement      value
    select*                   0
    using macros         1
    in my example select* and using macros are hard coded texts so can anyone tell me how can i print do this.
    thanks in advance.

    hi
    thanks for the reply.
    my report has got 14 stmnts and has 14 error message types.
    earlier it text was hardcoded and displayed correspondingly but now we want to remove write statements.
    so i am not able to understand how can i send the hardcoded text as the output is not in the desired way.
    i want to know how can i add into fieldcatalog record by record i.e. stmnt1, value-1 record
    stmnt2,value-2nd record and so on. as this would definitely solve my problem

  • HP C6150 All-In-One Will Not Print Black Text But Does Partial Test Print

    Hi.  Thanks in advance for any help anyone can proffer.
    I've read through the forum and I think there are some similar issues, but none exactly the same as ours.
    This HP C6150 does print pictures, but suddenly stopped printing black text.
    HOWEVER, the test prints will print in black with the Windows Logo, but will not print any associated text.
    Odd.  It just suddenly stopped printing.
    Variables:
    C6150 All in One - No other problems for two years.
    Using refilled ink cartridges from outside source. (not my decision)
    Ink is full.  No other changes made in last three days.
    Troubleshooting Steps:
    Uninstalled and then re-installed software in entirety.
    Put in 'new' (refilled) cartridge for black and magenta.
    Tried (not sure if successful) soft reset.
    Tried cleaning the print cartridge with 'Q-Tip' and distilled water.
    Have not yet spent money on new OEM print cartridges.  That is next step unless other suggestions merit.
    Possibilities:
    It may be the refilled cartridges, but they've worked so well in the past.
    The cartridge prior to the recent replacement was working fine and was not yet out of ink.
    The print head might be damaged.  But this should/would affect all black printing and this is not the case.
    Were the driver corrupt, the reinstall should have fixed it ... you'd think.
    So, we're looking for some suggestions prior to going out and getting a new printer.
    Thanks again, in advance, for constructive non-judgmental suggestions.
    MackNC

    The likely cause is the black ink is not printing at all.  When printing graphics (like the Windows Test Page) black is made from mixing the color ink.  I would suggest printing an internal diagnostic test page as shown in this page.  Does the black block print?  If not then clean the printheads as described here.  
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Printing a PDF document to virtual PDF printer converts text to image in output PDF-file

    When I "print" any regular PDF document to a PDF virtual printer, it always converts a source regular (textual) PDF document into an image only document. It applies even to pure plain text documents (say, HTML source code etc.)
    (I often need to create a PDF document from the existing PDF. Yes, I know, it might seems quite pointless, but actually it makes sense.)
    Thus I have 2 questions:
    1) Is such sonvertion normal or I do anything wrong myself?
    2) It is by design, is there any woraround to prevent conveting text to image?
    Many thanks in advance!

    Have you checked to see if the "Print As Image" option is inadvertently checked? In the Print dialog, click the Advanced button then look for the checkbox.

  • Need to generate check writing output in plain text format in 12.1.3.

    In 11.5.10.2 a plain text file output can be created which is then used with a third-party software from Secure32 to create AP checks. Now in 12.1.3 I cannot get this same plain text output for check writing. The XML output contains flags which cannot be used with older version of Secure32 (upgrading Secure32 is not an option)
    Go-live is 30 days away and AP check cannot print. Because of time constraints theire is no time to set up and use the embedded R12 check writing features.
    Any help of tips would be appreciated - thanks.
    Edited by: user702225 on Dec 20, 2011 9:24 AM

    In 11.5.10.2 a plain text file output can be created which is then used with a third-party software from Secure32 to create AP checks. Now in 12.1.3 I cannot get this same plain text output for check writing. The XML output contains flags which cannot be used with older version of Secure32 (upgrading Secure32 is not an option)
    Go-live is 30 days away and AP check cannot print. Because of time constraints theire is no time to set up and use the embedded R12 check writing features.
    Any help of tips would be appreciated - thanks.
    Edited by: user702225 on Dec 20, 2011 9:24 AM

  • How can I export a mailbox of messages as plain text?

    I have a mailbox filled with correspondence from a colleague. About 150 messages in all, some with attachments. I'd like to print out all the messages in that folder but not one at a time. I was hoping to be able to save them all as plain text and convert them to a PDF for two-sided printing. Examining individual messages in Text Wrangler, I see that they are all XML-based messages and, so, filled with XML codes. Is there any simple way to convert or export these without manipulating each individual message?
    Yes, I could print each message individually, but that's going to take a long time and waste a lot of paper.
    robert

    Select the messages. Choose File > Save As…. You'll get a pop-up menu to select Rich Text, Plain Text, or Raw Source.
    If you choose rich text or plain text, the messages will appear in TextEdit as if they run together. Select Format > Wrap to Page, and you will see each message starts a new page.

Maybe you are looking for