Help With HP Network Printer

Hello,
Just got my new Imac 21" and it is awesome. Issue I am having is that it is replacing a Windows PC that had a wired network printer attached and worked fine. Printer is a HP All In One 6100C. I can ping the printer ip, I can also bring up the printer in a browser with ip. But when I go to add the printer, I enter the IP address, and it comes back as not seeing the printer? I have tried protocol Line Printer and IPP? I must be missing something. Any help would be appreciated.
Thanks JR

So is the printer attached directly to your iMac, or is it attached to a router? Mine is attached to the Mac with USB and then shared with the other computers in the house over the LAN. Works great.
Dah•veed

Similar Messages

  • Desperately need help with a networked printer and SMB sharing for windows

    Complete xServ newbie here. I'm a windows/novell admin, with limited experience in Unix and Linux.
    Against my advice, a client of mine that owns a small office of 20 people bought an XServG5 to act as a server for 20 mixed Windows PCs. File sharing services are working fine. I've created the users, set up groups and rights - that's all good.
    I cannot get an SMB shared printer to work from the windows machines. They run through the network printer install just fine, it shows up online, etc. However, when print jobs are submitted they DO show up in the printer queue on the server, sit there for a while, and then get moved to the completed box.
    They never print. There's not any indication that the job is even submitted to the printer. I can print to the printer just fine from the server itself, but the windows clients don't work, but they don't return an error message.
    Print services are running on the server, I've configured the printer name to be less than 12 characters for the share, and indeed it does pop right up during the "add network printer" routine.
    Ideas? I'm not even sure what questions I'm supposed to be asking, such is my ignorance of the OS. I do know that I followed the documentation to a T, and according to Apple this should work.
    Thanks in advance for the help. I'm extremely frustrated.

    We have the same problem. Our printer worked for about 2 years but failed similar to yours after a system update.
    Can you go into the Windows service, Logs, Printer Service. Copy and paste the log here. What I am looking for is a line like lpr: CANNOTCONNECTCLIENT or something similar to this.
    What I expect is that you have a problem where the cups defined printer is not usable. We can't get our problem fixed either - but am just curious if you have the same thing. We reloaded our server, applied all of the update and still cannot get it to work.
    Again, I think it stems from the update.

  • Help with a network printer

    I'm at the end of my knowledge level here. I am trying to hook up a network printer that my IMac can print to. I have it connected to a printer sharing unit (Linksys PSUS4 named LK8295C2) at address 192.168.0.105. The printer is a Brother 1240 Laser printer. It's not listed in the printer lists or printers that are provided with OSX Tiger so I downloaded a PPD file from Brother but I still can't get it to work. Can anyone tell me what files (drivers) I need, where the file has to be and how I can get the IMac to use it? I tried to print to it and all I get are 2 sheets of paper with a diamond on each one. Helpppp! I've been at this for over a week.
    Thanks!!

    Thanks Tom. I tried that but all I get out of the printer is trash and lots of pages of it. I'm not sure what the problem is. Anyway, I got frustrated enough that I bought a $49 printer and installed it directly on the iMac (not the best solution but the only one that works for now). I even tried using the $49 printer on the printer sharing device and it said it printed but nothing came out. I'm very frustrated with my Macs. they are really good machines but nothing is simple with them. I have to have a couple of windows systems and they just seem to work so much better as far as being able to see things on a network and hooking things up. It's probably my lack of knowledge on how to trouble shoot, knowing where things go, and generally knowing how the OS works. I've been in computers since around 1975 and this is the first time I have felt like a newbie without any idea on what I am doing. I'm also trying to figure out why my iMac 2.0Ghz with 1G of memory runs circles around my PowerMac dual 1.8Ghz with 3G of memory and 2 Sata drives. The same operations in Photoshop take much longer on the PowerMac. Argggggg... frustration!

  • HT4199 I need help with getting my printer to print, PLEASE.

    I need help with getting my printer to print, Please.

    What have you done so far?
    I suggest you connect it via a usb  cable first.  Once you get the printer working, move to wifi.  You will have to use an existing printer usb cable or purchase a cable.  Be sure to get the correct cable.  Ask for help.
    The warrenty indicates there is phone support.  Give HP a call.
    Warranty
    One-year limited hardware warranty; 24-hour, 7 days a week phone support
    Robert

  • Help with HP Laser Printer 1200se

    HP Support Line,
    Really need your assistance.  I have tried both contacting HP by phone (told they no longer support our printer via phone help), the tech told me that I needed to contact HP by e-mail for assistance.   I then sent an e-mail for assistance and got that reply today, the reply is as follows  "Randall, unfortunately, HP does not offer support via e-mail for your product.  However many resources are available on the HP web site that may provide the answer to your inquiry.  Support is also available via telephone.  A list of technical support numbers can be round at the following URL........."  The phone numbers listed are the ones I called and the ones that told me I needed to contact the e-mail support for help.
    So here I am looking for your help with my issue.
    We just bought a new HP Pavillion Slimline Desk Top PC (as our 6 year old HP Pavillion PC died on us).  We have 2 HP printers, one (an all-in-one type printer, used maily for copying and printing color, when needed) is connected and it is working fine with the exception of the scanning option (not supported by Windows 7).  However we use our Laser Printer for all of our regular prining needs.  This is the HP LaserPrinter 1200se, which is about 6 years old but works really well.  For this printer we currently only have a parallel connection type cord and there is not a parallel port on the Slimline HP PC.  The printer also has the option to connedt a USB cable (we do not currently have this type of cable).
    We posed the following two questions:
    1.  Is the Laser Jet 1200se compatible with Windows 7?
    and if this is the case
    2.  Can we purchase either a) a USC connection cord (generic or do we need a printer specific cord)? or b) is there there a printer cable converter adapater to attach to our parallel cable to convert to a USB connection?
    We do not want to purchase the USB cable if Windows 7 will not accept the connection, or if doing this will harm the PC.
    We really would appreciate any assitance that you might give us.
    Thank you,
    Randy and Leslie Gibson

    Sorry, both cannot be enabled by design.  That said, devices on a network do not care how others are connected.  You can print from a wireless connection to a wired (Ethernet) printer and v/v.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Need help installing Canon network printer on Mountain Lion

    I am trying to install a Canon MF4270 network printer with my Macbook Air running Mountain Lion.
    I added the printer using its IP, and selected the MF4200 driver from the list that came installed with the OS.  The printer worked, but it would not allow me to print double-sided (the option was greyed out). Some research showed that other people with similar problems simply updated the printer driver. 
    I checked the driver version and it said 2.0. I went to the Canon website and downloaded the newest version of the driver, which said 2.43.
    I re-added the printer with the new driver. Same problem.
    So I deleted the driver and the list of associated files, given to me by Canon tech support (I verified then that the MF4200 driver was no longer on the list), then installed the new driver (restarting my computer at every step).  I re-added the printer.
    Now, it doesn't work at all. When I try to print, I get the following message: "Canon UFR II Printer Driver / Cannot communicate with the printer, or the printer is not supported. If the printer is supported, check the printer connection and add it again, then start Printer Utility to get the printer information."
    I tried adding the printer using the Generic PostScript Printer driver, and when I print, it says that it is printing and I get no errors, but nothing prints.
    Now, I can't print at all, and no one at Canon or Apple has been able to solve the problem.
    Please help.

    First, delete the print queue in the Print & Scan preference pane, if you haven't already done so.
    Back up all data.
    Triple-click the line below on this page to select it:
    /Library/Caches/Canon/CUPSCAPT/CCPD/ccpd.conf
    Right-click or control-click the highlighted line and select
    Services ▹ Reveal
    from the contextual menu. A Finder window should open with a file selected. Move the selected file to the Trash. You may be prompted for your login password.
    Recreate the print queue.
    Credit for this solution to ASC user PAHU.

  • Help with home network.

    Not sure if this is the proper forum for this question, just point me in the right direction if I'm wrong.
    I am a new student in networking, taking the CCNA courses, and now want to rewire my home.  I currently have a cable modem and E2500 setup running my network.  I want to get the modem and router out of my computer room and in the basement where the cable enters the house.  I want to do this to clean up the computer room wiring a bit and to run line drops to different rooms in the house where the internet will be utilized.
    Currently there are two PC's, a laptop, a tablet, sometimes a phone, and an XBOX using the internet.  I want to get my printer back up and running on the network but thats another story. Only one PC is currently hardwired.  I would like to run two cables into the room with the PC and XBOX that are currently using wireless, at least two into the computer room for the PC and network printer, and one or two into the living room for the blue ray player and possibly an internet tv. 
    If these classes are paying off, I believe I can have the modem and router in the basement with a small switch connected to the router to add more ports for my needs.  I was going to use a patch panel to manage and label my cables.
    My first concern is for the wireless signal.  I feel as though I shouldn't have a problem, but I just wanted someone elses opinion.  The only real use will be by the laptop, tablet, and phones mostly on the first floor above the basement.  The wireless signal shouldn't be affected by just one floor, right?
    My next question would be about using the other 3 ports on the router before using ports on the switch.  Should I be using the ports on the router first or should that not matter?  
    Also if anyone could point me in the direction of a fairly cheap(less than $100) switch that would fit my needs I would be grateful.

    Most home routers are omni directional. Technically it is best to have it in a central location. But in good circumstances 1 floor won't make a difference. That is subject to change based on interference though.
    Doesn't matter if you use the rest of the ports on router or a switch first.
    If you run into issues with wireless signal you could run a wire up to a second wireless router and setup a roaming wireless network. Basically turn off dhcp on second router, give it the same SSID and passkey, and a different channel. Clients should roam between whichever signal is stronger after it goes below a certain signal strength.
    If you don't need any link aggregation or vlans and just want a plug in and go unmanaged switch, it is pretty cheap. At that point a switch is a switch is a switch. There's no noticable difference other than port speed.

  • Photoshop CS3 crashes with a Network Printer

    Regarding issue kb402704:
    Our company only uses network printers. It is completely ridiculous that we have to set the Adobe printer as our default printer in order for Photoshop to run without crashing. We pay all this money for CS3 and your only fix is to set a different printer as default. This is a huge bug that should be looked at. Kinda stupid that CS2 doesnt have this problem with the EXACT same printer.

    There are some issues with some users of network printers. The problem
    is that it's hit or miss and not easily reproducible. I'm using a
    network printer as my default with no problems at all.
    I'll also point out that this is a user to user forum, not a direct link
    to Adobe. You're simply ranting at other users.
    Bob

  • Need help connecting to network printer using xfce and cups

    Hello
    please can someone assist me with setting up a printer.
    I am running arch and xfce desktop.
    I have an Epson Stylus Photo R800 USB printer connected to a wireless Belkin all-in-one Print Server.
    I do not know how to connect to this printer.
    I am not conversant in CUPS or network printing and would very much like to use the printer.
    My arch box is connected through cable to a wireless router.
    The print server is connected to the wireless router and the router confirms the print server is attached to the network.
    The print server IP address is 192.168.0.100.
    The printer server has a web interface which I used to set wireless and TCP settings. I should say that I went into this interface and configured the print server which is totally usable and fine from a Vista laptop using wireless - vista laptop "sees" the print server and prints over wireless, therefore I know the server and printer are working together and all the print server settings are fine. I dont know how Vista connects, it just does!
    I tried installing gutenprint and foomatic, went into the CUPS server page (localhost:631) and found my printer but I'm not sure if my connection string (socket://192.168.0.100:9100) is correct. I've tried several values and several Epson drivers from the CUPS web interface, all to no avail. I just get this message:
    bash-3.2# lpstat -t
    scheduler is running
    system default destination: Epson
    device for Epson: socket://192.168.0.100:9100
    Epson accepting requests since Sat 26 Jul 2008 22:53:35 BST
    printer Epson now printing Epson-0. enabled since Sat 26 Jul 2008 22:53:35 BST
    /usr/lib/cups/filter/pstoraster failed
    I have no desire to be a CUPS expert nor a networking expert - I was rather hoping someone could guide me through the process, I have tried reading web links (google) but do not understand various pages and instructions.
    bash-3.2# cat /etc/cups/printers.conf
    # Printer configuration file for CUPS v1.3.8
    # Written by cupsd on 2008-07-26 22:34
    <DefaultPrinter Epson>
    AuthInfoRequired username,password
    Info Epson
    DeviceURI socket://192.168.0.100:9100
    State Idle
    StateTime 1217108079
    Accepting Yes
    Shared Yes
    JobSheets none none
    QuotaPeriod 0
    PageLimit 0
    KLimit 0
    OpPolicy default
    ErrorPolicy stop-printer
    </Printer>
    any ideas good folk?
    Last edited by keratos (2008-07-26 22:07:45)

    EDIT:
    SOLVED!
    the problem was that gutenprint needed to be installed.
    I looked at the rastertops file in /usr/lib/cups/filter and it was very small, handfull of lines, but refered to gutenprint (whatever that is).
    "pacman -Q gutenprint" revealed it was not installed.
    All is fine now.
    GREAT!

  • Can you help with wireless usb printing?

    I have a D-Link router ([DI-824VUP) that works fine as far as geting online and printing to an ethernet printer,(HP1300n) wirelessly. I recently bought this router because it has a usb printer port, yet I can not get it to see the usb printer (Canon S830D). D-Link was no help, as they don't support Apple wireless printing, even though they do support wired printing via their router. QUESTION-any idea how to get powerbook to see the printer when connected to the router? Printer setup utility does not see it, only the HP. Thanks-bobbabe
    OS 10.3.9.
    Titanium Powerbook 667.   Mac OS X (10.3.9)   D-Link router(DI-824VUP)

    Because this forum software is so absolutely USELESS now, you don't get to see the whole of the question in this view. In the other (non-list) view it says:
    "can you help with a technical problem with the stereo imagery option ? it won't take out lead vocal in a stereo mp3"
    And the answer is that if you can't isolate the vocal in the stereo field, or it is one of these odd ones where it's used inverted polarity in different parts of the stereo signal for the same vocal, then you won't be able to. But without a sample, it's impossible to tell. If you can post a link to one, that might help. It has to be external to this site though - Adobe in their infinite wisdom don't allow the posting of audio files on their audio U2U forum. Helpful, that, isn't it?

  • Can someone help with a networking problem?

    Here's a situation I need some help with:
    I live in a semi-detached house. My neighbour has broadband, I don't. The phone company (BT) has said it would cost too much to install another line to enable me to have broadband, and would involve digging up the road and the garden, which they're not prepared to do.
    However, someone at work has suggested that I approach my neighbour and ask if I could 'share' their broadband connection and in return pay a contribution to their monthly costs.
    For this, I believe, I would need to buy a router, plus something to make my Mac 'wireless'.
    Now, I consider myself Mac-savvy, but when it coms to wireless stuff I confess I know very little! So if someone could explain in simple terms what I would need to buy and approx costs I be very grateful!
    I have a G5, and I believe my neighbour is a PC user.
    Also, can someone explain how the whole 'share' thing works? Does my neighbour have to have their computer on all the time? Do I need to sign up with an ISP? Will having two computers accessing one line slow it down significantly?
    Many thanks,
    Andy

    Hi Andy, before going too far down the 'sharing' route I would rattle some cages chez BT. If your neighbour has broadband then you and they are within a hair's breadth (line length speaking) of the same distance to the exchange. If they have enabled BB next door, why can't they enable BB for you without the hassle? I live on a mobile home site in the back of beyond in Devon and when I upgraded from dial-up to BB, and then to 1 meg there was no problem. There was a two week hiatus while BT did their stuff 'on the line' but it all went without a hitch. Er...I take it you do have an exclusive landline?
    However, if the situation re the line is as per, then the simplest way (to obviate any wifi interference issues) would be for you or neighbour to route an ethernet cable through walls/window frames from your Mac to a router on their side of the wall. (Approx £30?) This would be connected to their phone line. Their PC would also plug into the router. (Which they may already have if they're on BB, though they may have a nasty USB BB modem &nbsp:&nbsp: No good for what you want.
    If you/they don't want the 'hardwire' option then first you have to wifi enable your Mac if it is not already. Not sure of the costs but check on the Apple website for 'Airport Extreme Card'. Don't go the wifi USB dongle route, apparently they are not VG, though I've no personal experience. You would then have to get a wifi router modem (from £40 I think, it's a long time since I've looked, my Belkin has been virtually faultless) which would sit on their side of the wall plugged into the BT socket. Their PC would either plug into that or connect wirelessly with it, as is their wont. That's basically it, but there could still be interference issues, eg, two households with microwaves, cordless phones; intervening walls, bookcases, filing cabinets etc., etc.,
    If done via either of the above, then no, your neighbour doesn't have to have their PC on all the time, if ever.
    You don't have to sign up with an ISP, it would have to be a 'gentleman's agreement' that you bung him £x pm for your share. He is already paying his ISP.
    In practice, sharing would only slow down large downloads.If you were each downloading a large file at the same time then you would be sharing the bandwidth, so your respective files would download at half the speed than they would otherwise. If you are each surfing and if you both 'clicked' at the same time then, yes, he might think, "Wish I hadn't said yes to Andy, this page is taking ages". I don't really think anyone would notice though unless he was surfing at the same time as you were downloading something big, or vice versa.
    I hope the above is some help but I would have a word with the neighbour first and sound them out, after rattling BT that is...
    Come back here if you want more help.
    Good luck!
    Adrian

  • Help with wireless networking with my Photosmart 6525 on Mac 10.8.5

    I have just purchased an HP Photosmart 6525 and cannot get the wireless printing to work. I've followed all of the instructions provided online and printed with the device. 
    I'm attempting to connect from my Macbook Air running 10.8.5. I've successfully connected the printer to my wireless network - I just printed the wireless network test and it states "No problems found. Congratulations...". Gee thanks...
    I've taken the steps of enabling Wireless Direct, and Web Service, ePrint is on. By the way, all of these different options are totally unhelpful - I cannot determine which are actually required to just connect via wi-fi?
    I also downloaded and installed the latest driver software from HP. Going through the setup it reaches a point where it tells me to unplug USB (cannot go through it without it connected I learned) so it can configure wireless. Then it tells me it cannot find the device.
    I have no option to skip this and although I've run it several times I still don't see the "setup assistant" application that it supposedly installed. 
    I've seen elsewhere that there is supposed to be the ability to connect directly to the printer via browser, by typing in the IP address. I've verified that the IP address appears valid for my network (192.168.1....) but when I put it into Chrome it cannot find it. 
    My frustration level is rapidly rising as the documentation and online support for this product is incredibly disjointed and unhelpful. I've searched online for hours, including this forum. Would appreciate any pointers to more detailed help / instruction before I am forced to return this printer.

    Hi,
    Not sure this will ultimately help, but you should update your version from 14.0.0 to 14.1.2. If you can get to the update via Help> Updates... try using the Creative Cloud desktop application found here:
    https://creative.adobe.com/products/creative-cloud
    You may already have it installed; it can be found in the Applications directory for a default install.
    regards,
    steve

  • Need help setting up network printer...

    Good afternoon.
    I have an HP 2600n printer connected to my network through my router... I've got the printer working through my Windows Laptop and printing over the network. I have the printer assigned a static IP address.
    I can't for the life of me get it to show up, assign it, or anything on my mini... I've got two more Apple iBooks in my house that I want to set up too, but thought I'd start with the mini. Tried the istallation disc, and it goes through and tells me the install is finished. Gone to print utility, etc... just can't figure this one out.
    If anyone can give me a hand it would be greatly appreciated.
    Thanks

    Okay, I just needed to know...
    Another thing you can check is your AppleTalk setting. Go to your System Preference, Network, (Ethernet or Airport, however you're connected to your network), AppleTalk, and make sure AppleTalk is active.
    If not active, activate it and apply the change and go back to printer setup, add, IP Printer and hit more printers button at bottom, it'll give you another window for AppleTalk printers, see if you printer comes up there.
    I hope this helps,
    Alex

  • Help with code to print HTML in Java 5

    Hi,
    The following code works and runs successfully..
    However, the printing in Java 1.4.2_03 is better than Java 5 (latest version).
    i.e in particular the characters are not monospaced compared with compiling with Java 1.4.2_03. e.g si so ss squashed together.
    This issue does not seem to occur when running the same code in Java 1.4.2_03. (I haven't tried other 1.4.2 java versions).
    Any help would be appreciated. We really need this working under Java 5 or bust.
    Here is the complete listing ... PrintHtml.java (it uses the DocumentRenderer)
    and following this is the input file.
    import javax.swing.text.html.HTMLDocument;
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.io.IOException;
    import java.io.DataInputStream;
    import java.io.InputStream;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import java.lang.reflect.*;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Rectangle;
    import java.awt.Shape;
    import java.awt.print.PageFormat;
    import java.awt.print.Printable;
    import java.awt.print.PrinterException;
    import java.awt.print.PrinterJob;
    import javax.swing.JEditorPane;
    import javax.swing.text.Document;
    import javax.swing.text.PlainDocument;
    import javax.swing.text.View;
    import javax.swing.text.html.HTMLDocument;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.print.*;
    import java.text.ParseException;
    public class PrintHtml {
         * Utility helper to convert HTML Text to HTML Document.
         * @param baseUrl URL to be used in order
         * to resolve relative HTML references, in lieu of an
         * HTML BASE tag. May be null, if not required or HTML
         * BASE tag is to be used.
         * @see jbox.view.jfx.JboxHtmlEditor
         * @see jbox.utility.JboxPrint
         * @see jbox.utility.JboxPrintUtil
      public static HTMLDocument htmlTextToHtmlDoc(String htmlText, URL baseUrl)
              try
              //  JboxHtmlEditorKit editorKit = new JboxHtmlEditorKit();
                HTMLEditorKit editorKit = new HTMLEditorKit();
                HTMLDocument doc = (HTMLDocument)editorKit.createDefaultDocument();
                   if (baseUrl != null)
                        try
                             doc.setBase(baseUrl);
                        catch(Exception e)
                             //JboxTraceManager.trace(e);
                   StringReader reader = new StringReader(htmlText);
                   editorKit.read(reader, doc, 0);
             return doc;
              catch(Exception e)
                   //JboxTraceManager.trace(e);
                   return null;
       public static void main(String[] args) {
          System.out.println("printing...");
          HTMLDocument x = new HTMLDocument();
          DocumentRenderer invoice = new DocumentRenderer();
          //invoice.setScaleWidthToFit(false);
          String s = "";
          try {
            BufferedInputStream bis = new BufferedInputStream(new FileInputStream("mark.html"));
            InputStreamReader in = new InputStreamReader(bis , "ASCII");
            StringWriter sw = new StringWriter();
            while (true) {
               int datum = in.read();
               if (datum == -1) break;
               sw.write(datum);
            in.close();
            s = sw.toString();
            System.out.println("s="+s);
          catch (IOException e) {
             System.err.println(e);
          HTMLDocument htmldoc = htmlTextToHtmlDoc(s, null);
          invoice.print(htmldoc);
    // the good old infamous DocumentRenderer.
    /*  Copyright 2002
        Kei G. Gauthier
        Suite 301
        77 Winsor Street
        Ludlow, MA  01056
    class DocumentRenderer implements Printable {
    /*  DocumentRenderer prints objects of type Document. Text attributes, including
        fonts, color, and small icons, will be rendered to a printed page.
        DocumentRenderer computes line breaks, paginates, and performs other
        formatting.
        An HTMLDocument is printed by sending it as an argument to the
        print(HTMLDocument) method. A PlainDocument is printed the same way. Other
        types of documents must be sent in a JEditorPane as an argument to the
        print(JEditorPane) method. Printing Documents in this way will automatically
        display a print dialog.
        As objects which implement the Printable Interface, instances of the
        DocumentRenderer class can also be used as the argument in the setPrintable
        method of the PrinterJob class. Instead of using the print() methods
        detailed above, a programmer may gain access to the formatting capabilities
        of this class without using its print dialog by creating an instance of
        DocumentRenderer and setting the document to be printed with the
        setDocument() or setJEditorPane(). The Document may then be printed by
        setting the instance of DocumentRenderer in any PrinterJob.
      protected int currentPage = -1;               //Used to keep track of when
                                                    //the page to print changes.
      protected JEditorPane jeditorPane;            //Container to hold the
                                                    //Document. This object will
                                                    //be used to lay out the
                                                    //Document for printing.
      protected double pageEndY = 0;                //Location of the current page
                                                    //end.
      protected double pageStartY = 0;              //Location of the current page
                                                    //start.
      protected boolean scaleWidthToFit = true;     //boolean to allow control over
                                                    //whether pages too wide to fit
                                                    //on a page will be scaled.
    /*    The DocumentRenderer class uses pFormat and pJob in its methods. Note
          that pFormat is not the variable name used by the print method of the
          DocumentRenderer. Although it would always be expected to reference the
          pFormat object, the print method gets its PageFormat as an argument.
      protected PageFormat pFormat;
      protected PrinterJob pJob;
    /*  The constructor initializes the pFormat and PJob variables.
      public DocumentRenderer() {
        pFormat = new PageFormat();
        pJob = PrinterJob.getPrinterJob();
    /*  Method to get the current Document
      public Document getDocument() {
        if (jeditorPane != null) return jeditorPane.getDocument();
        else return null;
    /*  Method to get the current choice the width scaling option.
      public boolean getScaleWidthToFit() {
        return scaleWidthToFit;
    /*  pageDialog() displays a page setup dialog.
      public void pageDialog() {
        pFormat = pJob.pageDialog(pFormat);
    /*  The print method implements the Printable interface. Although Printables
        may be called to render a page more than once, each page is painted in
        order. We may, therefore, keep track of changes in the page being rendered
        by setting the currentPage variable to equal the pageIndex, and then
        comparing these variables on subsequent calls to this method. When the two
        variables match, it means that the page is being rendered for the second or
        third time. When the currentPage differs from the pageIndex, a new page is
        being requested.
        The highlights of the process used print a page are as follows:
        I.    The Graphics object is cast to a Graphics2D object to allow for
              scaling.
        II.   The JEditorPane is laid out using the width of a printable page.
              This will handle line breaks. If the JEditorPane cannot be sized at
              the width of the graphics clip, scaling will be allowed.
        III.  The root view of the JEditorPane is obtained. By examining this root
              view and all of its children, printView will be able to determine
              the location of each printable element of the document.
        IV.   If the scaleWidthToFit option is chosen, a scaling ratio is
              determined, and the graphics2D object is scaled.
        V.    The Graphics2D object is clipped to the size of the printable page.
        VI.   currentPage is checked to see if this is a new page to render. If so,
              pageStartY and pageEndY are reset.
        VII.  To match the coordinates of the printable clip of graphics2D and the
              allocation rectangle which will be used to lay out the views,
              graphics2D is translated to begin at the printable X and Y
              coordinates of the graphics clip.
        VIII. An allocation Rectangle is created to represent the layout of the
              Views.
              The Printable Interface always prints the area indexed by reference
              to the Graphics object. For instance, with a standard 8.5 x 11 inch
              page with 1 inch margins the rectangle X = 72, Y = 72, Width = 468,
              and Height = 648, the area 72, 72, 468, 648 will be painted regardless
              of which page is actually being printed.
              To align the allocation Rectangle with the graphics2D object two
              things are done. The first step is to translate the X and Y
              coordinates of the graphics2D object to begin at the X and Y
              coordinates of the printable clip, see step VII. Next, when printing
              other than the first page, the allocation rectangle must start laying
              out in coordinates represented by negative numbers. After page one,
              the beginning of the allocation is started at minus the page end of
              the prior page. This moves the part which has already been rendered to
              before the printable clip of the graphics2D object.
        X.    The printView method is called to paint the page. Its return value
              will indicate if a page has been rendered.
        Although public, print should not ordinarily be called by programs other
        than PrinterJob.
      public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) {
        double scale = 1.0;
        Graphics2D graphics2D;
        View rootView;
    //  I
        graphics2D = (Graphics2D) graphics;
        disableDoubleBuffering(jeditorPane);
    //  II
        jeditorPane.setSize((int) pageFormat.getImageableWidth(),Integer.MAX_VALUE);
        jeditorPane.validate();
    //  III
        rootView = jeditorPane.getUI().getRootView(jeditorPane);
    //  IV
        if ((scaleWidthToFit) && (jeditorPane.getMinimumSize().getWidth() >
        pageFormat.getImageableWidth())) {
          scale = pageFormat.getImageableWidth()/
          jeditorPane.getMinimumSize().getWidth();
          graphics2D.scale(scale,scale);
    //  V
        graphics2D.setClip((int) (pageFormat.getImageableX()/scale),
        (int) (pageFormat.getImageableY()/scale),
        (int) (pageFormat.getImageableWidth()/scale),
        (int) (pageFormat.getImageableHeight()/scale));
    //  VI
        if (pageIndex > currentPage) {
          currentPage = pageIndex;
          pageStartY += pageEndY;
          pageEndY = graphics2D.getClipBounds().getHeight();
    //  VII
        graphics2D.translate(graphics2D.getClipBounds().getX(),
        graphics2D.getClipBounds().getY());
    //  VIII
        Rectangle allocation = new Rectangle(0,
        (int) -pageStartY,
        (int) (jeditorPane.getMinimumSize().getWidth()),
        (int) (jeditorPane.getPreferredSize().getHeight()));
    //  X
        if (printView(graphics2D,allocation,rootView)) {
          return Printable.PAGE_EXISTS;
        else {
          pageStartY = 0;
          pageEndY = 0;
          currentPage = -1;
          return Printable.NO_SUCH_PAGE;
      /** The speed and quality of printing suffers dramatically if
       *  any of the containers have double buffering turned on.
       *  So this turns if off globally.
       *  @see enableDoubleBuffering
      public static void disableDoubleBuffering(Component c) {
        RepaintManager currentManager = RepaintManager.currentManager(c);
        currentManager.setDoubleBufferingEnabled(false);
      /** Re-enables double buffering globally. */
      public static void enableDoubleBuffering(Component c) {
        RepaintManager currentManager = RepaintManager.currentManager(c);
        currentManager.setDoubleBufferingEnabled(true);
    /*  print(HTMLDocument) is called to set an HTMLDocument for printing.
      public void print(HTMLDocument htmlDocument) {
        setDocument(htmlDocument);
        printDialog();
    /*  print(JEditorPane) prints a Document contained within a JEDitorPane.
      public void print(JEditorPane jedPane) {
        setDocument(jedPane);
        printDialog();
    /*  print(PlainDocument) is called to set a PlainDocument for printing.
      public void print(PlainDocument plainDocument) {
        setDocument(plainDocument);
        printDialog();
    /*  A protected method, printDialog(), displays the print dialog and initiates
        printing in response to user input.
      protected void printDialog() {
        if (pJob.printDialog()) {
          pJob.setPrintable(this,pFormat);
          try {
            pJob.print();
          catch (PrinterException printerException) {
            pageStartY = 0;
            pageEndY = 0;
            currentPage = -1;
            System.out.println("Error Printing Document");
    /*  printView is a recursive method which iterates through the tree structure
        of the view sent to it. If the view sent to printView is a branch view,
        that is one with children, the method calls itself on each of these
        children. If the view is a leaf view, that is a view without children which
        represents an actual piece of text to be painted, printView attempts to
        render the view to the Graphics2D object.
        I.    When any view starts after the beginning of the current printable
              page, this means that there are pages to print and the method sets
              pageExists to true.
        II.   When a leaf view is taller than the printable area of a page, it
              cannot, of course, be broken down to fit a single page. Such a View
              will be printed whenever it intersects with the Graphics2D clip.
        III.  If a leaf view intersects the printable area of the graphics clip and
              fits vertically within the printable area, it will be rendered.
        IV.   If a leaf view does not exceed the printable area of a page but does
              not fit vertically within the Graphics2D clip of the current page, the
              method records that this page should end at the start of the view.
              This information is stored in pageEndY.
      protected boolean printView(Graphics2D graphics2D, Shape allocation,
      View view) {
        boolean pageExists = false;
        Rectangle clipRectangle = graphics2D.getClipBounds();
        Shape childAllocation;
        View childView;
        if (view.getViewCount() > 0 &&
              !view.getElement().getName().equalsIgnoreCase("td")) {
          for (int i = 0; i < view.getViewCount(); i++) {
            childAllocation = view.getChildAllocation(i,allocation);
            if (childAllocation != null) {
              childView = view.getView(i);
              if (printView(graphics2D,childAllocation,childView)) {
                pageExists = true;
        } else {
    //  I
          if (allocation.getBounds().getMaxY() >= clipRectangle.getY()) {
            pageExists = true;
    //  II
            if ((allocation.getBounds().getHeight() > clipRectangle.getHeight()) &&
            (allocation.intersects(clipRectangle))) {
              view.paint(graphics2D,allocation);
            } else {
    //  III
              if (allocation.getBounds().getY() >= clipRectangle.getY()) {
                if (allocation.getBounds().getMaxY() <= clipRectangle.getMaxY()) {
                  view.paint(graphics2D,allocation);
                } else {
    //  IV
                  if (allocation.getBounds().getY() < pageEndY) {
                    pageEndY = allocation.getBounds().getY();
        return pageExists;
    /*  Method to set the content type the JEditorPane.
      protected void setContentType(String type) {
        jeditorPane.setContentType(type);
    /*  Method to set an HTMLDocument as the Document to print.
      public void setDocument(HTMLDocument htmlDocument) {
        jeditorPane = new JEditorPane();
        setDocument("text/html",htmlDocument);
    /*  Method to set the Document to print as the one contained in a JEditorPane.
        This method is useful when Java does not provide direct access to a
        particular Document type, such as a Rich Text Format document. With this
        method such a document can be sent to the DocumentRenderer class enclosed
        in a JEditorPane.
      public void setDocument(JEditorPane jedPane) {
        jeditorPane = new JEditorPane();
        setDocument(jedPane.getContentType(),jedPane.getDocument());
    /*  Method to set a PlainDocument as the Document to print.
      public void setDocument(PlainDocument plainDocument) {
        jeditorPane = new JEditorPane();
        setDocument("text/plain",plainDocument);
    /*  Method to set the content type and document of the JEditorPane.
      protected void setDocument(String type, Document document) {
        setContentType(type);
        jeditorPane.setDocument(document);
    /*  Method to set the current choice of the width scaling option.
      public void setScaleWidthToFit(boolean scaleWidth) {
        scaleWidthToFit = scaleWidth;
    }The sample input file is "mark.html":::
    <html>
    <head>
    <style type="text/css">
    <!--
    ol { list-style-type: decimal; margin-top: 10; margin-left: 50; margin-bottom: 10 }
    u { text-decoration: underline }
    s { text-decoration: line-through }
    p { font-weight: normal; font-size: medium; margin-top: 15 }
    dd p { margin-top: 0; margin-left: 40; margin-bottom: 0 }
    ol li p { margin-top: 0; margin-bottom: 0 }
    address { color: blue; font-style: italic }
    i { font-style: italic }
    h6 { font-weight: bold; font-size: xx-small; margin-top: 10; margin-bottom: 10 }
    h5 { font-weight: bold; font-size: x-small; margin-top: 10; margin-bottom: 10 }
    h4 { font-weight: bold; font-size: small; margin-top: 10; margin-bottom: 10 }
    h3 { font-weight: bold; font-size: medium; margin-top: 10; margin-bottom: 10 }
    dir li p { margin-top: 0; margin-bottom: 0 }
    h2 { font-weight: bold; font-size: large; margin-top: 10; margin-bottom: 10 }
    b { font-weight: bold }
    h1 { font-weight: bold; font-size: x-large; margin-top: 10; margin-bottom: 10 }
    a { color: blue; text-decoration: underline }
    ul li ul li ul li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    menu { margin-top: 10; margin-left: 40; margin-bottom: 10 }
    menu li p { margin-top: 0; margin-bottom: 0 }
    table table { border-color: Gray; margin-right: 0; border-style: outset; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    sup { vertical-align: sup }
    body { margin-right: 0; font-size: 14pt; font-family: SansSerif; color: black; margin-left: 0 }
    ul li ul li ul { list-style-type: square; margin-left: 25 }
    blockquote { margin-right: 35; margin-top: 5; margin-left: 35; margin-bottom: 5 }
    samp { font-size: small; font-family: Monospaced }
    cite { font-style: italic }
    sub { vertical-align: sub }
    em { font-style: italic }
    table table table { border-color: Gray; margin-right: 0; border-style: outset; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    ul li p { margin-top: 0; margin-bottom: 0 }
    ul li ul li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    var { font-weight: bold; font-style: italic }
    table { border-color: Gray; margin-right: 7; border-style: outset; margin-top: 7; margin-left: 7; margin-bottom: 17 }
    dfn { font-style: italic }
    menu li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    strong { font-weight: bold }
    ul { list-style-type: disc; margin-top: 10; margin-left: 50; margin-bottom: 10 }
    center { text-align: center }
    ul li ul { list-style-type: circle; margin-left: 25 }
    kbd { font-size: small; font-family: Monospaced }
    dir li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    th p { font-weight: bold; padding-left: 2; padding-bottom: 3; padding-right: 2; margin-top: 0; padding-top: 3 }
    ul li menu { list-style-type: circle; margin-left: 25 }
    dt { margin-top: 0; margin-bottom: 0 }
    ol li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    li p { margin-top: 0; margin-bottom: 0 }
    strike { text-decoration: line-through }
    dl { margin-top: 10; margin-left: 10; margin-bottom: 10 }
    tt { font-family: Monospaced }
    ul li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    dir { margin-top: 10; margin-left: 40; margin-bottom: 10 }
    pre p { margin-top: 0 }
    th { border-color: Gray; border-style: solid; padding-left: 3; padding-bottom: 3; padding-right: 1; padding-top: 1 }
    pre { font-family: Monospaced; margin-top: 5; margin-bottom: 5 }
    td { border-color: Gray; border-style: inset; padding-left: 3; padding-bottom: 3; padding-right: 1; padding-top: 1 }
    td p { padding-left: 2; padding-bottom: 3; padding-right: 2; margin-top: 0; padding-top: 3 }
    code { font-size: small; font-family: Monospaced }
    small { font-size: x-small }
    big { font-size: x-large }
    -->
    </style>
    </head>
    <body>
    <p style="margin-top: 0">
    </p>
    <table width="500" cellspacing="20" border="1">
    <tr>
    <td height="330" valign="top">
    <table border="0">
    <tr>
    <td>
    <font size="2">This is to certify that [[Client Name]], born
    on [[Client Date of Birth]], of [[Client Residential
                    Address]], was the holder of motor vehicle driver
    licence number [[Client Licence Number]], first issued on
    [[First Issue Date of Holding]] and expired on [[Holding
                    Expiry Date]].<br></font>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    <table width="500" border="2">
    <tr>
    <td>
    <table width="480" border="0">
    <tr>
    <td align="right">
    <font size="2"><br>
    <b>Fred Flintstone<br>Manager</b><br>Records Services Division<br>State
    Police<br>An authorised person for the purposes of the
    Road Act 1986</font>
    </td>
    </tr>
    <tr>
    <td align="left">
    <font size="2"><b>User ID: wzvqv7<br>Dated: 29 November 2006</b>
    </font>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </body>
    </html>

    I have finally cracked it!!!!!!!!!!!!!!!!
    The issue is definitely with Java Sun. "Uneven character spacing when printing JTextComponent"
    It is raised on the http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6488219
    And currently in OPEN state, and raised on 31 Oct 2006 and mentions it was caused by fix 4352983.
    So where do we go from here. It's not good because I have tried all later version of the JVM and the issue is still there.
    Why? Because it hasn't been fixed yet. Read the bug report above, as it gives more insight -- and mentions the workaround is NOT good for existing code.
    So the way forward is to use an earlier version of the JVM 5.
    I download the JVM version 1.5.0 (starting version) and works Ok... I would probably think version prior to 4352983 would be Ok too.
    Please vote for this.... We have a workaround (use older version of the JVM).
    So I am very happy.

  • Help with hooking up printer

    I have an old HP Desktop HP Compaq dc7900 computer.  I just purchased a HP 1010 deskjet printer.  The printer cord I have is not compatablile with this printer.  Can this printer be connected to this computer?  I am not very good with these issues and before I give up I was hoping someone might be able to help me with this problem.  Should I just returnt he printer?  Let me know.  Thanks, PJ11397
    This question was solved.
    View Solution.

    The dc7900 CMT (as shown here) has Serial (2, 1 optional), parallel (optional), eSATA (optional), USB 2.0 (8),  USB 2.0, internal on system board (2), RJ-45, front and rear audio jacks (2 each), PS/2 ports (2), VGA connector.  The Hp1010 is USB.  All you need is a USB cable (as shown here) for $1.99
    I am a volunteer. I am not an HP employee.
    To say THANK YOU, press the "thumbs up symbol" to render a KUDO. Please click Accept as Solution, if your problem is solved. You can render both Solution and KUDO.
    The Law of Effect states that positive reinforcement increases the probability of a behavior being repeated. (B.F.Skinner). You toss me KUDO and/or Solution, and I perform better.
    (2) HP DV7t i7 3160QM 2.3Ghz 8GB
    HP m9200t E8400,Win7 Pro 32 bit. 4GB RAM, ASUS 550Ti 2GB, Rosewill 630W. 1T HD SATA 3Gb/s
    Custom Asus P8P67, I7-2600k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX660 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Custom Asus P8Z77, I7-3770k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX670 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Both Customs use Rosewill Blackhawk case.
    Printer -- HP OfficeJet Pro 8600 Plus

Maybe you are looking for

  • HT4009 I have purchased items from CityVille and they are not available in the App although my card has been charged for the purchases.

    I have purchased items from CityVille and they are not available in the App although my card has been charged for the purchases. I also have an email receipt with the purchase. Can you please tell me how to resolve this issue?

  • Current date in the query

    Hi Experts, I want to display current date in the query in one of the time characterstic which i am including in the data target but i don't want to load anything in the data target but still i want to display the current date in the query only. how

  • Managing https and http

    HI all, I have a jsp file that is accessed through https. e.g. https:\\myurl\myjsp.jsp The problem with this scheme is as follows. If I access any link on the myjsp.jsp file, it is accessed through https as I have used relative paths in myjsp.jsp fil

  • 500 Internal Server Error in UWL Configuration Wizards

    Hi All. I'm trying to configure UWL view thru wizards options. Unfortunately it comes with "500 Internal Server Error". The Root cause section tell me "The initial exception that caused the request to fail, was: java.lang.ClassCastException" Does any

  • Is there an unsigned .xap of Adobe Reader?

    We want to distribute the app via our own MDM platform rather than via the Microsoft Store. I notice there are versions available for internal distribution on iOs and Android devices but we require one for Windows Phone 8. Thanks MH