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

Similar Messages

  • Print email address as plain text, not as link?

    How can I do this? I don't want my email address to appear underlined and in blue on my business cards, but Pages keeps converting it into a link. How can I prevent this?

    I would suggest you get the free WordService from Devon Technologies. It has many useful actions and works in all apps that recognize Services.
    Walt

  • 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

  • Text prints as bold when it's not bold :(

    Hi,
    I'm using Windows 7 and InDesign CS6. When I print PDF documents from files that have been created in InDesign some lines of the text print out bold when they are not bold and they also look a little fuzzy. I am creating the PDf using the "[High Quality Print]" option. I have tried changing several settings on the printer but nothing makes a difference. The problem doesn't occur when I print in black and white nor does it occur on PDF's I create from word or other applications. Can someone please help? Thanks Mel

    Try updating the driver to a newer version for your printer.
    And if you can get a Postscript Driver for your printer.
    I had a similar issue last year and installing a postscript driver fixed the issue for me.
    What printer are you using?

  • 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 : )

  • 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

  • Screen View has changed to plain text and I don't know why or how to get it to return to a normal view

    My screen view has changed to a plain text yesterday and I do not understand why. I did not make any changes. I did not install any new programs. I did install to updates from Neat Works and Quick Time. Also ran PC clean up by AVG.

    -> Tap '''ALT''' key or press '''F10''' to show the Menu Bar
    -> go to View Menu -> '''Zoom''' -> click '''Reset''' -> '''Page Style''' -> select '''Basic Page Style'''
    -> go to Tools Menu -> Clear Recent History -> '''Time range to clear: select "EVERYTHING"''' -> click Details (small arrow) button -> place Checkmarks on '''Cookies, Cache, Site Preferences''' -> click '''Clear Now'''
    -> go to Tools Menu -> Options -> Security -> place Checkmarks on:
    1) Warn me when sites try to install add-ons 2) Block reported attack sites 3) Block reported web forgeries
    -> go to Tools Menu -> Options -> Advanced -> Network -> Offline Storage (Cache): click '''Clear Now''' button
    -> Click OK on Options window -> Restart Firefox
    Check and tell if its working.

  • 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).

  • 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

  • Why is Apple Mail sending in plain text even when rich text is set as preference?

    I have Verdana selected as my Message Font and the Composing Message Format preference set as Rich Text, yet Apple Mail sends new messages in plain text (Monaco). When I type the message it shows in Verdana. When I check it in Sent Mail, it is in Monaco. When I choose Send Again, the new massage appears in Verdana again, but after sending it is in Monaco. Also, The received message in in Monaco. I've tested this with other fonts and font sizes and the same thing happens.
    How do I fix this?
    Note: Mail correctly replies in the same format as received messages. Only new mail has the plain text problem.

    I suspect that for each one you need to go to Format > Make Plain Text

  • Text Edit Question:  How Do I Create/Save PLAIN TEXT??

    I've been using Macs now for over a year, and this is still an annoying quibble that I haven't sorted out. I don't know if this is the right place to raise this question or not, but there don't seem to be any other places for it, so it goes here.
    How do create and save a simple, plain text, no code, no embellishments, file using this "TextEdit" program?
    I'm familiar with Notepad in Windows. Used it for a million things for years and years. All it would do is "plain" (i.e. ascii) text. No frills whatsoever.
    No I guess TextEdit is the Mac equivalent of Notepad? But it wants to do both "plain text" and "Rich Text Format," and apparently I haven't learned how to keep them separate.
    I created a new file. I told it to make the file "plain text." Then I typed some stuff, saved and closed the file.
    But when I reopened the file, I found all this crap in the header:
    {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330
    {\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 LucidaGrande;}
    {\colortbl;\red255\green255\blue255;\red41\green81\blue169;}
    \margl1440\margr1440\vieww9000\viewh8400\viewkind0
    \deftab720
    \pard\pardeftab720\ql\qnatural
    \f0\fs24 \cf0 \
    And all these slashes and other code-type crap that makes the actual text I typed unreadable.
    So, somebody, please, tell me: how do I create a simple plain text file like I used to be able to do with Notepad, and not have to worry about it being all garbled when I go to re-open it.
    Should be easy, but it's not.
    --PS

    If I format fonts, even in a "plain text" document, am I going to wind up with code again when I reopen it?
    Not unless you save it as rich text.
    Why is a "plain text" document even offering me bold and italics or any other kind of formatting?
    Why would someone wanting to write plain text use bold or italics options? On the other hand, I'm sure many people would like to print and compose formatted text now and then even when they prefer to keep TextEdit in plain text mode for most of their work.
    I miss notepad. All it did was plain text. No options to confuse things. Where is the Mac equivalent of THAT??
    Try TextWrangler

  • JEditorPane with text/html content-type still displaying as plain-text?

    Hello all,
    I recently started work on a very basic HTTP GET program that gets the HTML source of a page and, using a JEditorPane, displays the page as normal (i.e. like a browser would).
    Anywhoo, the HTTP GET is fine, and the source is loaded into a String called "html". Then I do this:
    displayArea.createEditorKitForContentType("text/html");
                        displayArea.setText(html);However the content appears in the editor pane as plain-text (i.e. the HTML code appears as-is, not in a 'compiled' form).
    Any ideas why this is?
    Thanks,
    Tristan

    Thanks for the replies, however the setContentType didn't work either. When I changed the code to what you suggested, nothing got inserted into the editor pane at all (i.e. no HTML - nor plain-text?). More of the code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    import java.net.Socket;
    import java.util.Scanner;
    public class ClassName extends JFrame implements ActionListener
         public JTextField urlIn, pageIn;
         public JButton go;
         public JScrollPane scrollPane;
         public JEditorPane displayArea;
         public JPanel topPanel;
         public String url, page, html;
         public int index;
         public ClassName()
              setSize(1230,680);
              setLayout(new BorderLayout());
              JPanel topPanel = new JPanel();
              topPanel.setLayout(new FlowLayout());
              urlIn = new JTextField(18);
              pageIn = new JTextField(18);
              JButton go = new JButton("Go!");
              topPanel.add(urlIn);
              topPanel.add(pageIn);
              topPanel.add(go);
              add(topPanel, BorderLayout.NORTH);
              displayArea = new JEditorPane();
              displayArea.setEditable(false);
              add(displayArea, BorderLayout.CENTER);
              go.addActionListener(this);
              urlIn.addActionListener(this);
              setVisible(true);
         public static void main(String args[])
              new ClassName();
         public void actionPerformed(ActionEvent e)
              if( e.getActionCommand() == "Go!" )
                   url = urlIn.getText();
                   page = pageIn.getText();
                   if (url != null && page != null )
                        try
                             final int HTTP_PORT = 80;
                             Socket s = new Socket(url, HTTP_PORT);
                             InputStream inStream = s.getInputStream();
                             OutputStream outStream = s.getOutputStream();
                             Scanner in = new Scanner (inStream);
                             PrintWriter out = new PrintWriter(outStream);
                             out.print("GET " + page + " HTTP/1.0\n\n");
                             out.flush();
                             while( in.hasNextLine() )
                                  String input = in.nextLine();
                                  html = html + input;
                             s.close();
                        catch (Exception exception)
                             System.out.println("Error: " + exception);
                        displayArea.setContentType("text/html");
                        displayArea.setText(html);
                        urlIn.setText("");
                        pageIn.setText("");
                 else
                      System.out.println("Please enter something!");
    }Am baffled as to what the problem is? :-(
    Thanks,
    Tristan

  • Steps to configuring log4j with plain text file

    can anyone help me with the steps involved with configuring log4j with a plain text configuration file...Where should log4j.properties file be stored?.....do you have a simple example of a config file using a file appender?.....do I have to make changes within the startWebLogic.cmd script?.....Is it possible for you to lay out the procedure for me to begin logging?.....nothing I have tried thus far has worked.....Any help you may be able to provide will be greatly appreciated.

    i am using sun jsf implementaion version 1.2
    can i know do we need to specify anything for application bean to be called. beacause when i tried to print in sample application also my log was not getting printed.
    i have mentioned in my managed bean
    <managed-bean>
    <managed-bean-name>ApplicationBean1</managed-bean-name>
    <managed-bean-class>webapplication3.ApplicationBean1</managed-bean-class>
    <managed-bean-scope>application</managed-bean-scope>
    </managed-bean>
    i my page class
    protected webapplication3.ApplicationBean1 getApplicationBean1() {
    return (webapplication3.ApplicationBean1)getBean("ApplicationBean1");
    can i know why it is not getting called.

  • Keyboard command-b works, return to plain text via command-t doesnt work

    I am helping my Dad out here, we have figured out a couple of glitches he is having using the Word Processing thanks to Discussions.
    The last thing we cannot figure out is that he has been used to typing keyboard command-b, then a string of bold words, then command-t to go back to regular text, but it is not returning to plain text anymore, it is printing super text. he has to change it 2x via the menu bar. Time consuming and annoying because command-t used to work.
    Any advice on this one?
    Thank you.

    Is the behavior specific to one document or a few documents, or does it affect all word processing documents?
    *+It is happening to two very long documents that i tried it on, but not to a couple of shorter ones he has.+*
    Is the behavior specific to one account? Test by opening and working on an affected document using a different account. (You may need to Get Info on the file and change Ownership and Permissions to allow "Others" to "Read and Write", and you may need to create a second account on the machine.)
    *+There is only one account being used.+*
    What version of the Mac OS is your dad using?
    +*Mac OSX 10.2.8 on an iMac PowerPC G4*+
    What version of AppleWorks?
    +*AppleWorks 6.2.7 (he is 87 and understandably doesn't want to upgrade unless absolutely necessary. He is working on something relatively important, and wants to finish it up. If it were me,...*+
    Maybe a glimmer: What happens if you're typing plain text, press command-T (once), continue typing another word, press command-T again, and continue typing?
    +*In one of the offending documents, I tried that, it went from plain text to SUPERIOR text, back to plain. It seems to be toggling between plain and SUPERIOR on some of the documents (the two longest, hundreds of pages documents.*+
    **He is very happy this is getting worked out, at least things are better. I will be here tonight, then I go back home for several weeks at least, so will check back again later. If something comes up I can do it tonight, or maybe talk him through it next week. In any event, I will keep up with the post.**
    **Thanks for all the time.**

  • DECODING MAIL FROM WEB SERVER IN PLAIN TEXT FORMAT(THE MAIL BEING SENT BY LABVIEW APPLICATION)

    Hi All
    I have a labview application that send mail every hour automatically.
    But actually the mail has to be decoded from the web server(by another application).But now when that application decode the data in the mail(that is send by labview application)its getting some funny characters inside that can not be detected by the decoding application
    (When open the mail no problem.)But actually our goal is to decode the mail from the web server.
    Why the extra characters are appearing when decoding from the server?Is it because of the HTML format?
    Is there option to send the mail in plain text format(not like attachment)?
    In outlook we can change the setting (tools->options->send->mail sending format->....here we can set as HTML format/Plain Text format)
    Like that at the sending time can i chenge the sending option as plain text format in my labview application?
    Thanks...

    smercurio_fc wrote:
    Then it sounds to me like this other application is not decoding the attachment correctly, especially if you looked at the attachment yourself after you received it and verified it's correct.
    No, no, smercurio. This is charcter encoding here. In older versions of LabVIEW you could specify what character encoding to use when sending an email through the SMTP VIs. But that gave problems since people in certain locales used certain characters that where not transfered right when the wrong encoding was specified, and that encoding stuff is not understood by most people at all, so the wrong selected encoding was rather the rule than the exception. In newer versions of LabVIEW do the SMTP VIs handle the encoding automatically based on the currently used locale on the system.
    This change is documented in the Upgrade Notes of LabVIEW and probably happened around LabVIEW 7.1 or 8.0.
    A decent mail client will recognize the encoding and convert it back to whatever is necessary before presenting it to the user. The OPs posters server application obviously isn't a smart mail client but probably just some crude text file parser that has no notion of proper mail character encoding and how to deal with it.
    I would suppose that there is a chance to dig into the SMTP VIs itself and try to manipulate or disable that encoding altogether in there but that may open a whole can of worms somewhere else. The proper way would be to process the incoming mail by a character encoding aware mail client before passing it to the text parser. On Unix setting up something like this would be fairly trivial.
    Rolf Kalbermatter
    Message Edited by rolfk on 01-23-2008 10:21 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • Display a cell in ALV report as Pushbutton

    Hi, I am having an ALV report. I want to display one cell of the ALV report as a Pushbutton. How is it possible ? Thanks and regards.

  • I can't update to iOS5

    I keep getting message saying that iTunes can't update to iOS5 because applesoftwareupdate.msi cannot be found. I've tried extracting the files from iTunes setup using winRAR, but I'm still getting an error because the old applesoftwareupdate.msi can

  • Validate Configuration

    I am running http://localhost/reportserver and getting: Reporting Services Error The report server has encountered a configuration error. (rsServerConfigurationError) Get Online Help SQL Server Reporting Services What should I be looking into? Thanks

  • KeyListener problem

    Hi, In a GUI, i am setting FITS image (Used in Astronomy) on a label. Now i need to move the image by using arrow keys. Not able to handle KeyListener for that image label. Please suggest me how to proceed. Thank you

  • Direct Delta, Queued and Unseralized V3

    HI FOR IM datasources, BF and UM, the guide mentions Direct Delta as the preferred selection. How do we decide this? Also for LO cockpit DS in SD, what selection is chosen? Thanks Harie