Print Services: servername.local is "busy"

We will soon be getting some new Mac OS X 10.6 (Snow Leopard)-only Macs at work. Since AppleTalk is no longer available to these Macs, I thought I'd set-up some Bonjour queues using one of our Mac OS X 10.5.8 Servers. (Of the 20 printers we have only three have Bonjour available.) The Snow Leopard clients can find the new printer I set up (however they cannot automatically discover the printer driver), but printing fails. As soon as a Mac OS X 10.6.1 client tries to print to this queue an error dialog appears in the printer queue in the Dock that says, "Network host 'SERVERNAME.local' is busy, will retry in 30 seconds." I'm fairly certain the queue should be configured for "SERVERNAME.companyname.net" not ".local". The server is set-up correctly in DNS (it's also the Open Directory Server) but something in the print services configuration must be off. I can't find any way to see or manually configure the queue...
-Doug

Did you ever get this resolved? I'm having the same issue. I haven't had much time to troubleshoot it yet though...

Similar Messages

  • Network host HPF.local is busy  -  Unable to connect to printer;

    Recently when trying to print with a wifi bonjour networked OfficeJet J4680 this is the notice I receive, and it will never print.
    Does anyone have any advice other than throwing the printer, or my computer out of the window?
    Network host 'HPFBlah.local' is busy; will retry in 30 seconds...
    Eventually the notice will change to...
    'Unable to connect to printer; will retry in 30 seconds...';

    Removing the wifi networked Printer from System Preferences > Printers, and then turning OFF the OfficeJet's wifi option, and instead plugging it into the Airport with a USB cable resolved the issue.

  • Exporting iphoto books for printing at local printing services

    Does anybody know how to export an iphoto book for printing at local printing services, other than Apple printing services?
    I tried to export, but the only option available was to "export to iDVD", which is not very helpful (does not generate a printable file).
    I'd appreciate any hints...

    Yanomami:
    Welcome to the Apple Discussions. What you want to
    do is do a print to pdf. Then take the pdf file to
    the printing service to be printed.
    Thank you for the tip. One follow up question: does PDF file have the right photo quality/definition to print a book, or would it be better to export to a TIFF file or some other type? If so, how to export to TIFF then?
    Thanks again for any help you can offer.

  • Export for online printing service question...

    Hi all...I am new to all this exporting business so please bear with me. In the past if i wanted prints made i just burnt them to a disk and took the disk to a local photo lab to have printed. So the question is when using an online printing service such as Mpix, would i just export versions as original sized jpegs and send them to the printing service and that's it or do i also have to mess with the dpi setting? I noticed the default dpi setting is 72 for all the export presets. Any help here would be appreciated. Thanks in advance...Dave

    hello, dave
    quote: "when using an online printing service such as Mpix, would i just export versions as original sized jpegs and send them to the printing service and that's it or do i also have to mess with the dpi setting?"
    when someone else is doing your printing always ask them how they want your Versions delivered first prior to burning the DVD, for example, 16bit TIFF, 8bit TIFF, colorsync (color mangement), dpi...there is an excellent tutorial/information on this in Aperture's help menu "Photography Fundamentals"
    what i do is edit the photograph by softproofing to the printer used. in Aperture select the Proofing Profile & then Onscreen Proofing
    victor

  • Printing problems - Network host is busy, will retry in 30 seconds . . .

    Configuration: 3 machines on the network
    1. iMac with Snow Leopard 10.6.8 (wired connection)
    2. Ubuntu Linux 11.04 (Natty Narwhal) server on IA64 with CUPS 1.4.6 (machine is called tusko)
    3. MacBookPro with Snow Leopard 10.6.7 (wireless connection)
    4. The server has a fixed IP address 192.168.1.10, the iMac is 192.168.1.12 (static also)
    5. The MacBookPro is getting an IP address from the DHCP server in the router (Linksys e4200)
    6. I can ping any machine from any other machine.
    Procedure:
    1. I set up a HP LaserJet 1012 on the Linux box using the CUPS GUI (http://localhost:631/)
    2. CUPS shows the print queue as "idle, Accepting jobs, Shared, Server Default), I can print a test page properly from the server
    3. The printer shows correctly as "HP LaserJet 1012 @ tusko" on both macs in System Preferences - Print & Fax
    4. If I print a file to this printer from either Mac, I see "Network host 'tusko.local' is busy; will retry in 30 seconds . . ." this message repeats until I finally kill the print job
    Since this is an all-Apple setup (CUPS being out of Apple), the solution is going to be something very basic that I am doing wrong (btw everything IS powered up) -- question is WHAT?!
    I also tried connecting the printer directly to a USB port on the iMac, sharing it, and printing to the shared printer with the MacBookPro - same problem.
    Thanks in advance for your help!

    Hi Greg:
    Thanks for the response.
    Sorry, I'm using IPP. As an experiment, I printed a test page from Firefox running locally on the server, and that prints fine. So I have pointed CUPS at the right printer driver.
    The other thing I've tried is to reset the printing system on the iMac by control-clicking in the area below the listed printer in the Print & Fax dialog and saying yes to "are you sure" when it warns about resetting the printing system. That leaves a blank pane. Then I started Word,
    and invoked print. It came up with no printer selected, but offered a choice of the HP. When I select that, I see messages about gathering printer info (I expect that's Bonjour doing its thing), and the printer re-appears in the Print and Fax pane. When I "Print", I'm back to the usual problem.
    Do you think I have something set incorrectly in the router?
    Thanks.

  • Should I install Print Services as a role for a single server env no domain

    I have a OAS application using converted UNIVERSE code to work with withSQL server. The application works fine and local users and groups will do the job. I have been tasked with replacing UNIX based printing to Windows based printing. Don't need LDP services
    either. Does it make sense to install print services for about 30-40 printers or just set them up local. There will be about 10 different forms and i will have to be able to re-direct jobs, pause jobs, re-queue jobs, and disable\enable the printers.
    I don't know that version 3 or 4 printer drivers matter because the same printer driver will be used for a majority of print jobs. As a matter of fact there are 5 or 6 different drivers needed. This is setting on a 100 MB backbone with GB access to the server.

    Hi,
    Print Services enables you to share printers on a network and centralize print server and network printer management tasks by using the Print Management snap-in.
    Print Management helps you monitor print queues and receive notifications when print queues stop processing print jobs. It also enables you to migrate print servers and deploy printer connections by using Group Policy.
    Print Services Role
    http://technet.microsoft.com/library/cc732378(WS.10).aspx
    I’m not quite clear about your current provisioning, as referred in the title, for single server without domain. I think this role is not necessary for you.
    Hope this helps.

  • How does one print to enterprise Windows print services in Yosemite? CUPS 2.0 problem?

    One of my co-workers upgraded to Yosemite yesterday and it broke his ability to print to our corporate printing services (which are built around a Windows print server). Obviously, the printer discovery in the System Preferences can't find the Windows print server - that's never worked. However, we had previously been able to add a printer through the CUPS web front-end by adding a Windows printer and specifying an SMB URL in the format:
    smb://DOMAIN;USER:[email protected]/QUEUE-NAME
    ... which worked like a charm in Mavericks. However, Yosemite has upgraded to CUPS 2.0.0 and this no longer seems to work. Print jobs enter the CUPS queue, but authentication fails and they are not accepted by the remote server.
    I've consulted the CUPS 2.0.0 documentation, and there's not really anything helpful there. In fact, there's no mention of SMB / Windows printing at all in the 2.0.0 documentation. Unfortunately our campus print services does not support IPP, LP, LPR, or JetDirect as options -- just Windows printing.
    Does anyone have a suggestion?

    Just finished testing 10.10 printing via a Windows 2008 R2 print share. I also found that when trying to add the printer using CUPS I would get an authentication error. But if I added the printer using the Windows section of the Add printer pane, then I was able to print fine.
    So with you mentioning that using the Windows section of the Add printer window has never worked (which is interesting because it's always worked for me) I want to suggest another approach to adding the printer, still using the Add printer window. With this window open you can right-click on the toolbar and select Customize Toolbar. You can then drag the Advanced icon to the toolbar. Then when you select this, you can set the Type menu to "Windows via spoolss" and then enter the URL as smb://servername/sharename. Select the supporting driver and click Add to complete.
    Then when you select to print for the first time using this printer you will be prompted to authenticate. Enter the account details, set the save to Keychain option and OK to send the print job.
    This worked fine for me and creates the same queue as using the Windows add printer setting. Curious to hear if this gets your co-worker printing again.

  • Printing HTML with Java Printing Service(JDK1.4 beta)

    Hi there!
    I'm currently checking out the new Java Printing Service (JPS) in the new JDK1.4 beta. This looks like a very promising printing API, with amongst others printer discovery and support for MIME types - but I have some problems with printing HTML displayed in a JEditorPane.
    I'm developing an application that should let the user edit a (HTML)document displayed in a JEditorPane and the print this document to a printer. I have understood that this should be peace-of-cake using the JPS which has pre-defined HTML DocFlavor amongst others, in fact here is what Eric Armstrong says on Javaworld (http://www.javaworld.com/javaone01/j1-01-coolapis.html):
    "With JPS, data formats are specified using MIME types, for example: image/jpeg, text/plain, and text/html. Even better, the API includes a formatting engine that understands HTML, and an engine that, given a document that implements the Printable or Pageable interface, generates PostScript. The HTML formatting engine looks particularly valuable given the prevalence of XML data storage. You only need to set up an XSLT (eXtensible Stylesheet Language Transformation) stylesheet, use it to convert the XML data to HTML, and send the result to the printer."
    After one week of reasearch I have not been able to do what Armstrong describes; print a String that contains text of MIME type text/html.
    I have checked the supported MIMI types of the Print Service returned by PrintServiceLookup.lookupDefaultPrintService(). This is the result:
    DocFlavor flavor = DocFlavor.INPUT_STREAM.GIF;
    PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
    aset.add(MediaSizeName.ISO_A4);
    aset.add(new Copies(2));
    PrintService[] service = PrintServiceLookup.lookupPrintServices(flavor,aset);
    if (service.length > 0) {
    System.out.println("Selected printer " + service[0].getName());
    DocFlavor[] flavors = service[0].getSupportedDocFlavors();
    for (int i = 0;i<flavors.length;i++) {
    System.out.println("Flavor "+i+": "+flavors.toString());
    Selected printer \\MUNIN-SERVER\HP LaserJet 2100 Series PCL 6
    Flavor 0: image/gif; class="[B"
    Flavor 1: image/gif; class="java.io.InputStream"
    Flavor 2: image/gif; class="java.net.URL"
    Flavor 3: image/jpeg; class="[B"
    Flavor 4: image/jpeg; class="java.io.InputStream"
    Flavor 5: image/jpeg; class="java.net.URL"
    Flavor 6: image/png; class="[B"
    Flavor 7: image/png; class="java.io.InputStream"
    Flavor 8: image/png; class="java.net.URL"
    Flavor 9: application/x-java-jvm-local-objectref; class="java.awt.print.Pageable"
    Flavor 10: application/x-java-jvm-local-objectref; class="java.awt.print.Printable"
    As you can see there is no support for text/html here.
    If anyone has a clue to what I'm missing here or any other (elegant, simple) way to print the contents of a JEditorPane, please speak up!
    Reply to: [email protected] or [email protected] or here in this forum

    Since you have 'printable' as one of your flavors, try this using a JTextPane (assuming you can dump your HTML into a JTextPane, which shouldn't be a big problem)...
    1. Have your JTextPane implement Printable
    ie. something like this:
    public class FormattedDocument extends JTextPane implements Printable 2. Read your HTML into the associated doc in the text pane.
    3. Implement the printable interface, since you have it as one of your available flavors (I'd imagine everybody has printable in their available flavors). Something like this:
    public int print(Graphics g, PageFormat pf, int pageIndex) {
            Graphics2D g2 = (Graphics2D) g;
            g2.translate((int)pf.getImageableX(), (int)pf.getImageableY());
            g2.setClip(0, 0, (int)pf.getImageableWidth(), (int)pf.getImageableHeight()); 
            if (pageIndex == 0)
                setupPrintView(pf);
            if (!pv.paintPage(g2, pageIndex))
                return NO_SUCH_PAGE;
            return PAGE_EXISTS;
        }Here's my setupPrintView function, which is executed once on page 0 (which still needs some polishing in case I want to start from page 5). It sets up a 'print view' class based on the root view of the document. PrintView class follows...
    public void setupPrintView(PageFormat pf) {
    View root = this.getUI().getRootView(this);
            pv = new PrintView(this.getStyledDocument().getDefaultRootElement(), root,
                               (int)pf.getImageableWidth(), (int)pf.getImageableHeight());Note of obvious: 'pv' is of type PrintView.
    Here's my PrintView class that paints your text pane line by line, a page at a time, until there is no more.
    class PrintView extends BoxView
        public PrintView(Element elem, View root, int w, int h) {
            super(elem, Y_AXIS);
            setParent(root);
            setSize(w, h);
            layout(w, h);
        public boolean paintPage(Graphics2D g2, int pageIndex) {
            int viewIndex = getTopOfViewIndex(pageIndex);
            if (viewIndex == -1) return false;
            int maxY = getHeight();
            Rectangle rc = new Rectangle();
            int fillCounter = 0;
            int Ytotal = 0;
            for (int k = viewIndex; k < getViewCount(); k++) {
                rc.x = 0;
                rc.y = Ytotal;
                rc.width = getSpan(X_AXIS, k);
                rc.height = getSpan(Y_AXIS, k);
                if (Ytotal + getSpan(Y_AXIS, k) > maxY) break;
                paintChild(g2, rc, k);
                Ytotal += getSpan(Y_AXIS, k);
            return true;
    // find top of page for a given page number
        private int getTopOfViewIndex(int pageNumber) {
            int pageHeight = getHeight() * pageNumber;
            for (int k = 0; k < getViewCount(); k++)
                if (getOffset(Y_AXIS, k) >= pageHeight) return k;
            return -1;
    }That's my 2 cents. Any questions?

  • Can X serve provide print services across a router?

    The technology folks upgraded the network in my school last weekend and put my server on a separate subnet from the eMacs that it is controlling. It still controls all settings but the client computers no longer see the server in Network. We can still get to it using the IP address. The big problem is that the Mac server no longer acts as a print server for the client computers. Is there a way to correct this other than putting the server and client computers back on the same subnet? Technology is reluctant to do that for some reason, something about their firewall. I believe their network software is Windows NT.
    Dual 1.8 G5   Mac OS X (10.4.5)  

    The answer to this is yes, you can access the print services from any machine that can "ping" the server. This doesn't appear to be configurable via the Apple interface applications, so the print services are generally restricted to machines on the same subnet as the server.
    The easy way to make the print server available is to edit the cupsd.conf file:
    /etc/cups/cupds.conf
    If you scan through the file you find lines like:
    BrowseAllow 127.0.0.1
    BrowseAllow @Local
    BrowseDeny All
    You need to edit these settings to allow the other subnets to see the CUPS interface:
    BrowseAllow 123.123.123.*
    BrowseAllow 123.123.124.1/200
    There are examples in the comments in this file.
    Warning: read the CUPS documentation before you proceed with this editing, because an incorrect configuration will allow anyone to print to your machine.
    A quick test of whether you can get in or not is to try this in a browser:
    http://[printerserver ip]:631
    If you are not authorised, then you need to try again with the conf file, if you get the CUPS interface then you are in.
    Also, system updates may overwrite your conf file, so you may nee to keep re-editing the file.

  • OSX and wireless (third party) print server problems - 'host is busy' again

    The setup:
    MBP running OSX 10.5.2
    Zyxel NSA-220 (with latest firmware) hardwired to a Lynksys wireless router (running Tomato firmware)
    Canon PIXMA iP4500 with CUPS+Gutenprint v5.1.7 drivers
    I'm trying to set up the NSA as a print server. I can ping the NSA, it shows up fine in finder and I can access the shares on the discs - all wirelessly.
    However the Canon setup program can't locate the printer when it tries to align the print heads, so I tried using Print & Fax to set up IP printing, with LPD as protocol and the IP address of the NSA, selecting CUPS drivers rather than the Canon ones.
    The issue comes when I try to print and get locked in a 'Network host x.x.x.x is busy' cycle that never ends. I switched from M$ about 12 months and think I'm reasonably computer literate but feel like a mac newbie when problems like this hit. Grateful for any advice.

    I helped another postee with a SimpleShare NAS. Reading the user documentation for the device, it showed the Windows connections using smb, ie you simply browse to the device via Network Neighborhood, double-click then select the printer name.
    To use smb on the Mac, you select Windows Printing when you add the printer, then browse to the workgroup, then the Zyxel computer name and then the printer share name. Note that if the printer share name has spaces and too many characters, it can cause problems so keep the name short, such as iP4500, and don't have any spaces.
    With regards to the current use of LPD as the protocol, this will be the cause of the network busy error as the device probably doesn't support UNIX print services (which btw is what you need to enable on Windows Server if you were to connect the same way).
    One final note. The recent Security Update 2008-002 stopped some users from connecting to their current Windows share. One workaround has been to add the user account information into the queue name. This can be done by modifying the view for the Print & Fax Add Printer dialog box, so that the Advanced Printing option appears. Control-click on the icon bar in the Add Printer dialog box and then select Customize then Advanced. Within this selection will be the option to use Windows Printing via SAMBA. This lets you add the printer with all the necessary info, such as the example following.
    smb://NSAusername:password@NSA_IPAddress/iP4500
    Once you have entered the queue name, you can then browse to the Canon Gutenprint v5.1.7 iP4500 driver.
    HTH
    PaHu

  • Unable to start Print Service

    I think am facing the same situation as in this old forum post:
    Error(1042006) Network error [10048]: Unable to connect
    I tried to increase the Heap size of print Server (HyS9FRPrint) in registry to Xmx - 2048 MB and Xmx 2048 MB. After this I'm not able to start the PRINT SERVICE.
    PATH: HKEY_LOCAL_MACHINE\SOFTWARE\Hyperion Solutions\Hyperion Reports\HyS9FRPrint: Xmx2048m and Xms2048m.
    When I modify the Heap setting to Xmx1538m and Xms1024m, I'm able to start the print service.
    Messages recorded in the EVENT viewer is copied below:
    ======================================================================================================================
    The description for Event ID ( 0 ) in Source ( HyS9FRPrint ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Could not initialize the Java Virtual Machine..
    ======================================================================================================================
    Could you please let me know if I have missed any thing in increasing the heap size tp 2048mb. Is there any particular steps for the same?
    Thanks,
    Vinay.

    It is 32bit windows process so maximum you will provably get it to set the JVM to around 1.6GB which you have already found, setting it any bigger and it wont start.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Print Services won't quit

    Hi all,
    I have a OS X 10.3.9 Server that I attempted to share a printer on.
    The printer is an Epson connected to a usb port on the server.
    The printer was sharing just fine until I tried to share it to a Windows machine. After I tried to start Windows Services, this operation turned off the network interface I was using to access the net. After I fixed that problem in the Network System Pref. Pane, the printer can't be shared to any of the local network macs that it was working fine on before. Not only that, I can't get the server manager software to stop printing services, either by the Server Manager Program or the command line. The print log returns:
    2006-01-23 13:03:34 -0800 [20962] Stopping Print Service...
    2006-01-23 13:03:34 -0800 [20962] Stopping print sharing. Service: SMB.
    2006-01-23 13:03:34 -0800 [20962] Print Service Shutdown reported errors.
    What the heck does that mean?
    I can add and delete queues. But everytime I add a new queue it comes up with my old settings with "smb" printer sharing enabled and it won't let me change it. Everytime I click the check-box to turn "smb" or any other printer setting off or on, it won't let me!! And I as I stated in the beginning I can't get the print services to stop or restart! I don't want to restart the server quite yet. I am almost afraid that its gonna be even more messed up after the restart. I even tried to edit the config file by dragging it to the small icon in the corner of the settings window to the desktop and editing it in BBEDIT. When I drag the changed file back onto the window it won't take the changes.
    Anyway, I couldn't figure out where these config files for the Server Manager Program are to delete before I restart.
    Any help or suggestions would be greatlty appreciated.
    Thank you,
    Hassan
    PowerMac G4 Dual-500   Mac OS X (10.3.9)  

    Never got one answer, give up

  • Applet starting to give 'No print service found' exception !!

    My applet access the local default printer on the client. We moved to 1.4.2_08 recenlty and i am using the AccessController class inside the applet to access the local printer...It was working the last time we tested but today it started giving this problem ...
    java.lang.RuntimeException: java.io.IOException: Unable to print: java.awt.print.PrinterException: No print service found.
         at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
         at org.apache.crimson.parser.Parser2.parse(Unknown Source)
         at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
         at org.apache.xalan.transformer.TrAXFilter.parse(Unknown Source)
         at org.apache.fop.apps.Driver.render(Driver.java:498)
         at PrintApplet$2.run(PrintApplet.java:215)
         at java.security.AccessController.doPrivileged(Native Method)
         at PrintApplet.callMeSucker(PrintApplet.java:201)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.invoke.JSInvoke.invoke(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
         at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.com.DispatchImpl.invoke(Unknown Source)

    sun.plugin.javascript.invoke.JSInvoke.invoke(UMethod called from javascript?
    Signing applets:
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post and reply 18 for the java class file using doprivileged
    http://forum.java.sun.com/thread.jsp?forum=63&thread=409341
    4th post explaining how to set up your own policy with your own keystore
    Still problems?
    A Full trace might help us out:
    http://forum.java.sun.com/thread.jspa?threadID=656028

  • How many printer can I host on an Apple server 10.6.8 in ServerAdmin Print service?

    I had 53 printers recently (two weeks ago) on our printserver and kept getting the error message:
    "The service has encountered an error. Try to refresh the view (printserver.local/Print). (kNetworkError)"
    This message would come up multiple time while loading the Print service or the Printer queues in Print service.
    I had 20 printers setup on this same server last school year and had no problems.
    When we redesigned our network this summer, I had to setup the printers again as the IP addresses had changed.
    after adding the original 20 printers and adding the other 30, I then started to notice an obvious slow down in ServerAdmin app while loading the Print service and the Print queues.  The grey gear wheel showing that the system is processing, would never stop spinning.
    It would take up to 20 minutes for the Print queues to load and even after they did load the gear wheel never stopped spinning.
    When I would attempt to make a change in any Printer queue i.e. selecting a print protocol (SMB, LPR), the system would not Save the change even though the system allowed me to click the Save button.
    So, any suggestion on how many printers I can effectively Host on an Apple server 10.6.8+?
    Thanks,
    Vince

    Hi
    I think your main problem may lie here:
    "When we redesigned our network this summer, I had to setup the printers again as the IP addresses had changed"
    Correctly resolving DNS is crucial for OS X Server's reliability and robustness of services. It needs it simply to resolve it's own name to its IP Address regardless of what service your running. If when making the changes to your network you made no allowances for this then you will experience this:
    "The grey gear wheel showing that the system is processing, would never stop spinning."
    With increasing regularlity.
    To answer your question AFAIK you can add as many printers as the USB bus can support. If these are networked printers you're adding, and if it was me, I would not add them to OS X Server's Print Service.
    HTH?
    Tony

  • Printing chinese w/ Java Print Service API become garbled characters

    I'm using XP platform and I've a plain text file on my drive.
    Now, what I want to do is, to read the text file in, then print it, that's all.
    However, the printout become messy, just some garbled characters.
    I did try to change quite a different ways to read the file, but the printout is still messy.
    Is there anything wrong? Can somebody give me a help?
    package com.ysf.document.client.ups;
    import java.io.FileReader;
    import java.io.IOException;
    import javax.print.*;
    import javax.print.attribute.*;
    public class Class1
       public static void main(String[] args)
          String filename = "c:\\temp\\abcd.txt";
          DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
          PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
          // locate a print service that can handle it
          PrintService[] pservices = PrintServiceLookup.lookupPrintServices(flavor, aset);
          // create a print job for the chosen service
          int printnbr = 1;
          DocPrintJob pj = pservices[printnbr].createPrintJob();
          try
             int c;
             FileReader f = new FileReader(filename);
             StringBuffer buffer = new StringBuffer();
             c = f.read();
             while (c != -1)
                buffer.append((char) c);
                c = f.read();
             Doc doc = new SimpleDoc(buffer.toString().getBytes("BIG5"), flavor, null);
             pj.print(doc, aset);
          } catch (IOException ie)
             System.err.println(ie);
          } catch (PrintException e)
             System.err.println(e);
    }

    For #1, indeed, it's my overlook, I've corrected it already.
    For #2, it shows, java.lang.ArrayIndexOutOfBoundsException: 1.
    It's mainly because my printer do not support this flavor.
    My printer supports only:
    image/gif
    [B OR java.io.InputStream OR java.net.URL
    image/jpeg
    [B OR java.io.InputStream java.net.URL
    image/png
    [B OR java.io.InputStream OR java.net.URL
    application/x-java-jvm-local-objectref
    java.awt.print.Pageable OR java.awt.print.Printable
    application/octet-stream
    [B OR java.net.URL OR java.io.InputStream
    Up to now, still no solution to it. Anybody help.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Creating .pdf file from images organized in chronological order

    I have many sets of old scanned .TIFF files pertaining to corresponding documents that I would like to get organized into .pdf files. The problem is that these files were given random names when they were scanned into a proprietary database. However

  • Queries on Web Analysis

    HI, I have couple of queries on Web Analysis which are as follows: 1) Does the "Subset of UDA" option works for Multi-level combo box (Its not working in my report for time dimension)? 2) Is it possible to use "Keep Only" option on multiple columns a

  • Don't forget for birthday on Facebook! Improvement!

    Hello folks, please improve this tutorial from Adobe Website. I found issues from step-to-step After Add birthday with picture 37: Step 4: Add code: In if(success({ ...}; birthdayLbl.text = success.user.birthday; I hope you because your application s

  • Can't get Solaris 8 to show my second hard drive.

    I installed Sol8 on a 1 hard drive intel machine (as the only OS, no windows). Later, I added a second hard drive, and after running the device config assistant (DCA) still doesn't show it in the list of drives under the 'format' command. Physically,

  • CupsRasterinterpretPPD avait une erreur page header uses unsupported values

    Problem printing from Photoshop and Epson Stylus Pro 7900 you have an explanation? What does this error message: current print - "cupsRasterinterpretPPD" was an error = page header uses unsupported values​​. thank you for your help