Printing to prn:, to a matrix printer don't work sometimes

If I do for example under windows:
FileOutputStream os = new FileOutputStream ("PRN:Okidata");
in order to print directly to a matrix point printer called exactly "Okidata" in the pc, I have seen that sometimes doesn't work (more or less 30% of the pc I have tried) FileNotFound appears, but the printer name is well written.
Why this happen? it has something to do with windows? the matter is that not always I can access the printers with prn.
Something similar happens with \\pcname\printername. Here an error is not shown but the printer job stay in the p�rinter queue forever and doesn't print.
Many Thanks for any help. I really want to know what professional programs, printing to a matrix pont printer do, because using the windows drivers and java.awt.Graphics don't work nice in all cases. It even doesn't work with all models for example panasonic kx-p2130 the printing gets weird.
Thanks.

hi friend:
I need print *.prn files, i try use FileOutputStream write into prn on windows.
but i found it not work. the error message is:Device is not connected .
but i check my printer is ok.Can you help me? or give me a demo.
                FileOutputStream output=new FileOutputStream("prn:",true);          
                // the file c:\\my.prn length is 237010 bytes,so i sent separately to simulate  the data I have received
          int i[]=new int[]{65536 ,65536 ,65536 ,36864 ,3538};
          FileInputStream input=new FileInputStream( "c:\\my.prn");
          int j=0;
          while(j<i.length){
               int len=i[j];
               byte b[]=new byte[len];     
               input.read(b, 0, len);
               System.out.println("&#21097;&#20313;&#23383;&#33410;"+input.available());
               output.write(b);
               j++;
          }Thanks.

Similar Messages

  • HP Deskjet 710c printer don't work on a Mac Mini

    I have a Mac Mini with OSX 10.9 but my HP Deskjet 710c printer don't work. I install the HP driver package from Apple but I don't see my printer in the list. Who can help me out? Thanks.

    Hi,
    The printer is not supported on Mac OS X 10.9, you my find any supported printer listed in the following document:
    http://support.apple.com/kb/HT3669#HP
    As well no Mac supported is offered for the specific model within its driver download pages:
    http://h10025.www1.hp.com/ewfrf/wc/softwareCategor​y?cc=us&dlc=en&lc=en&product=59307&task=&
    I afraid you will not be able to use the specific model with Mavericks, those are not compatible.
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • Printer don't work at all "

    Hola! Hello! My first time here  ,so sorry if i not so good in inglish,My problem is the printer don't work at all ,and I have everything new in, the catrige, i also try every step that the screen show in Diagnose, and the last thin is help in cumunity .The light still flashing and the catrige is new ! I will thanks for you help ..Gary....

    There are two ways to go back to Leopard in your circumstances: Archive and install and erase and install. The best way to do it is the second, but your files will have to be backed up somewhere else. Archive and install is a good technique, in concept, but it goes against Apple's advice under your circumstances. If you do the first, then your files will end up in the proper place. Still, they should be backed up somewhere else. Something that should facilitate your choice is whether or not you have an external drive where you could create a bootable clone of your internal. Let me know about this matter specifically and what you think about the alternatives.

  • I'm having problems printing from my 15" macbook pro to my HP wireless printer. It works sometimes but not reliably, it can spend hours "seating for printer". I can print from my i pad with no problems

    I'm having problems printing from my 15" macbook pro to my HP wireless printer. It works sometimes but not reliably, it can spend hours "seating for printer". I can print from my i pad with no problems

    Hi,
    Apple's AirPrint only support specific models while using wired or wireless network connection.
    Plugging a printer into a USB port of Apple base is not supported for AirPrint:
    AirPrint printers connected to the USB port of the Apple AirPort Base Station or Time Capsules are not supported with AirPrint.
    As well you must use AirPrint enabled printers for a such, none of your printers are AirPrint enabled:
    http://support.apple.com/kb/ht4356
    There are 3rd party solutions which allow sharing a printer connected to your Mac as AirPrint, Printopia as example provide a such:
    http://www.ecamm.com/mac/printopia/

  • Can't relax - my camera and printer don't work!

    The Snow leopard web page tells me to "Relax. Your camera, printer and mouse work too".
    Well, my Samsung ML-1210 didn't work but I was able to get it going after install some opensource printer driver (Ghostscript))
    And now iPhoto won't import images from my camera (an early model Digital Rebel). It shows the thumbnails of the photos on the camera but when I attempt to import them I get "The following file could not be imported (The file is an unrecognized format)"
    (I can import from a Canon SD1000)
    However, if I import the photos using iPhoto 8 on a G5 running 10.5 I can then import the photos into my iPhoto 9/10.6 system by (drag n drop)copying the photos from the shared library or by importing the .jpgs which I exported from iPhoto 8.
    Image Capture on 10.6 will import the jpg's to the hard drive, but neither iPhoto, Preview or even Photoshop can open them. Preview says "The file “IMG_9564.JPG” could not be opened. It may be damaged or use a file format that Preview doesn’t recognize." (and Preview on the 10.5 system also reports the photo is damaged)
    Image capture on 10.5 will import the jpg and it can be opened by Preview/iPhoto etc on 10.5 or 10.6
    Is there an issue importing with the Canon Digital Rebel, because I can't relax until that works.

    gjw wrote:
    Image Capture on 10.6 will import the jpg's to the hard drive, but neither iPhoto, Preview or even Photoshop can open them. Preview says "The file “IMG_9564.JPG” could not be opened. It may be damaged or use a file format that Preview doesn’t recognize." (and Preview on the 10.5 system also reports the photo is damaged)
    That is very strange behavior. At the end of the day, a JPEG is a JPEG is a JPEG regardless of how it's imported. If you use a card reader and simply drag the JPEGs off the card to your hard drive rather than using a program to import them, can they be opened in Preview/Photoshop/iPhoto?
    If you don't have a card reader, you can do the same thing with the camera. It should mount on the desktop like a drive as long as you turn off having any application automatically open when connecting digital cameras.

  • Acrobat PDF Printer don´t work

    When I choose File->Print->"Adobe PDF Printer" from any application (i.E. "Ai") I get following two windows. The first Window will disappear with 100%, but the second don´t and no file will be created?!!??!??!?
    My system: Win7 64 and Adobe CC (Acrobat XI Pro)
    Can anyone help me to fix this, please?
    Used CS5 a few days before and it does the job.

    You will need to manually create using the link tool or if you're lucky
    (and the destination URL is spelt out in the text) use Advanced /
    Document Processing / Create from URLs option.
    The PDF Maker on the Mac does not work the same as Windows ...
    Jon

  • Since installing Firefox, my number pad on my laptop & my Cannon printer don't work

    Acer aspire5742 G
    using Window 7
    Cannon printer MX880 series - whether in wifi mode or plugged in to pc get message printer off line.
    All plug in properly new cartridges put in properly but cartridge lights are shining.
    Thanks Roseskick

    '''Try the Firefox Safe Mode''' to see how it works there. The Safe Mode is a troubleshooting mode, which disables most add-ons.''
    ''(If you're not using it, switch to the Default theme.)''
    * You can open the Firefox 4.0+ Safe Mode by holding the '''Shift''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Don't select anything right now, just use "'Start in Safe Mode"''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shift key) to open it again.''
    '''''If it is good in the Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one.
    Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''

  • Two-sided print don't work.

    My 2610 Photosmart I think it don't have a duplex feature, but in Windows XP worked with a two-sided printed.
    I can have it in 10.5 Leopard ? What can I do, because I use the setting two-sided printing and check print both sides, but nothing happens, it prints in two sheets of paper, even in queue saids that is printing 1 sheet of 1.
    Can you tell me if in Leopard I need to buy a duplex printer to have it printed in both sides? I never need it in Windows XP, always printed in both sides when I wanted.

    solv

  • Timecapsule and Canon MF 4430 printer don't work together!

    Hey,
    So my canon mf 4430 doesn't work with timecapsule. I have downloaded the drivers and setup the printer through system preferences. My computer finds the printer and shows a green light. But when I try to print I get an error:
    "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, if the Print dialog box has a Printer Info button, acquire the printer information: 10322."
    When I print via USB the printer works just fine.
    Thank You for the help in advance.

    jussikor wrote:
    So you're saying this printer model will not work via Time Capsule.
    Yes.
    Is there any way I can work around that? For example will it work via airport express?
    No.
    The problem is not limited to Time Capsule. The USB port on the Airport Express and Extreme will have the same problem. And other brands of print servers and routers will also have the problem because it is the UFR2 driver causing the problem.

  • My iPod touch speaker won't work and the headphones don't work sometimes

    If I try to play a song or video without headphones it won't have sound and sometimes I can't listen with headphones either. I tried reseting the iPod and restoring it but it still won't work. Please please help. I just got it a few weeks ago and haven't dropped it or gotten it wet I have no idea how this happened

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable       
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar                                     

  • How do I print multiple copies of the same photo on one page or a contact sheet. The directions in help don't work

    I want to print multiple copies of the same photo on a page. The directions in help don't work
    Help

    What version of iPhoto?
    The general process is to select the photo and print, select the printer, paper size and print size and click customize and under settings selec multiples copies of a photo (the preview will reflect this choice) and click print to print, make any printer specific selections and click print to print
    LN

  • HT3669 Hi I have a Konica Minolta PagePro 1300W printer. This works with my Windows-based Toshiba laptop but not with my i-Mac. Can someone please advise me how I get the printer to work with my i-Mac? I have installed it but documents don't print. Thanks

    Hi I have a Konica Minolta PagePro 1300W printer. This works with my Windows-based Toshiba laptop but not with my i-Mac. I have the latest (Mountain Lion 10.8.2) OS-X software.
    I have installed the printer using 'System Preferences' on my i-Mac and it appears on the list of available printers but documents that I create just don't print.
    Can someone please advise me how I get the Konica Minolta PagePro 1300W printer to work with my i-Mac?
    Thanks, John Lee

    Looking at the Konica web site for the PagePro 1300W, I saw the following note.
    Please note: This printer is designed to be used in computer operating systems running MS Windows only. Operating systems such as UNIX, Macintosh, or Linux are not supported nor do we have workaround drivers available. Older MS Windows versions, such as Windows 3.1/95/98[pre-SE] and NT 3.51/4.0, are not supported.
    So KM are not going to help you. But the LinuxFoundation does provide a workaround that should allow you to print. Have a look at this web page. You will need to install all three packages as per the instructions from that page.

  • Keeps printing done...

    I know why this code keeps printing done, its one my for loops. Currently this code does percisily what I want it to with a few hiccups that will be fixed. The current problem is that it keeps printing done for each row or record it places in the csv file. I need it to print to the file and then when it is truly done - print done. Also this is really slow....there are 1500+ records to pull from the cdata section, convert to comma delaminated and then place into the csv. the ripping and converting takes seconds. the writing's to the file takes .....well i never let it finish, every time I press stop its up to the 600th record and that's after a couple minutes.
    I know I am missing something. I just need some eyes to look at it. its not the most efficient way to do this, I get that. All i care about right now is making it print done ONLY when it is truly DONE writing to the file - and it shouldn't take so long to write to a file. 600 records in 2 minutes? something is wrong.
    Code is bellow. - prepare for a long read.
    package xmlcsv;
    import java.io.File;
    import java.io.FileWriter;
    import java.util.StringTokenizer;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.CDATASection;
    import org.w3c.dom.CharacterData;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    * Essentially we take a xml file, find its cdata section and then
    * process the information in there to then spit out to a csv file.
    public class XmlCSV {
          * We need to process the data in the Cdata section and spit it out in a csv file.
          * This is the "main" part of the program which is run.
          * @param args
         public static void main(String[] args) throws Exception
              File file = new File("Data.xml");
              DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
              Document doc = db.parse(file);
              doc.getDocumentElement().normalize();
              NodeList nodes = doc.getElementsByTagName("TransmissionWrapper");
              for (int i = 0; i< nodes.getLength(); i++)
                   Element element = (Element) nodes.item(i);
                   NodeList cData = element.getElementsByTagName("TransmissionData");
                   Element line = (Element) cData.item(0);
                   //test
                   getInfo(getCData(line));
          * We want to get all the data out of the CData Section.
          * Pass it into the getInfo() method to then get the
          * the data which will be parsed and thrown into a csv file.
          * @param e
          * @return
         private static final String getCData(Element e)
              NodeList child = e.getChildNodes();
              if (child != null)
                   for (int i = 0; i< child.getLength(); i++)
                        Node childNode = child.item(i);
                        if (childNode.getNodeType() == Node.CDATA_SECTION_NODE)
                             CDATASection cdata = (CDATASection) childNode;
                             String data = cdata.getData();
                             return data;
              return "Theres nothing there";
          * We want to remove all pipes then replace all those pipes with commas
          * the simple .replace() does not work. so we pass all the data into a string array and
          * pass it to a method that reforms the data and replaces pipes with commas
          * TODO: I didn't realize some information is comma deliminated so we have:
          * CHEVROLET,COBALT which may pose a problem later.
          * @throws Exception
         private static final String getInfo(String str) throws Exception
              StringTokenizer st = new StringTokenizer(str.trim());
              while (st.hasMoreTokens())
                   String[] info = str.split("\\|", -1);
                   for(int i = 0; i<info.length; i++)
                        returnComma(info);
              return "Nothing to return";
          * We take the String array of data and reform it back into
          * a comma deliminated peice of data that we can then use with CSV
          * @param str
          * @return
          * @throws Exception
         private static final String returnComma(String[] str) throws Exception
              StringBuffer sb = new StringBuffer();
              for (int i =0; str != null && i < str.length; i++)
                   sb.append(str);
                   if(i < str.length - 1)
                        sb.append(",");
              writeToFile(sb.toString(), "data2.csv");
              return null;
         * Write the data to a csv file.
         * @param st
         * @param filename
         * @throws Exception
         private static final void writeToFile(String st, String filename) throws Exception
              FileWriter fw = new FileWriter(filename);
              fw.append(st);
              fw.flush();
              fw.close();
              System.out.println("done");

    The question(s) is: +"How do I make it write to the file and print done only when done?"+Move the print statement out of the loop?
    +"Why is it taking up to 5-10 minutes to write 600 records to a file when it takes 30 seconds to parse the pipes, and put commas in and spit it out to the page"?+Because you are writing to the file every time you call returnComma(), and you are calling returnComma() lots of times. Most probably your entire file writing scheme is up the pole. You can't really want the file just to contain whatever the last invocation of returnComma() printed, and if you do why do all the preceding writes at all?
    Also returnComma() doesn't return a comma. Poor naming. Fix its name to describe what it really does.

  • Prints don't match display - photosmart b8550 - skin tones have reddish tin

    when printing to photosmart b8550, the prints don't "color match" the display.
    skin tones especially have reddish tint. should the printer or iphoto control
    the colors?

    Welcome to the Apple Discussions. First I have to ask the obvious question: have you checked the levels in the various ink cartridges?
    Color control is very difficult. Unless you print from an application like Photoshop or Photoshop Elements where you can set the preferences to have the application control color the printer will usually have the control.
    What I would do is find a color image like this color image or this one and use it to run tests on regular paper, changing the various settings in the Print window till you get what you like. Then save those settings as a new preset.
    Do not use a color image file that has the Adobe RGB color profile. You want one with the standard sRGB or sRGB IEC1966-2.1.
    Also calibrate your monitor via the System/Displays preference pane. In the Print window menus there are a couple of panes for color management. Take a look at both, and others, to fine tune your setup.

  • HP LASERJET M1136 MULTIFUNCTION PRINTER-----SCANNER NOT WORKING

    I HAVE RECENLTY PURCHASED HP LASERJET 1136 MFP. PRINTER IS WORKING FINE, BUT SCANNER IS NOT WORKING. HOWEVER PHOTOCOYING ACTION IS PERFECT. I GUESS THERE IS SOME ISSUE WITH THE DRIVER THING. CAN ANYONE PLEASE ASSIST ME FOR THIS???
    I HAVE PREVIOUSLY OWNED DESKJET SERIES, IN WHICH SCANNING AND PRINTING BOTH WERE WORKING FINE. 
    THANKS IN ADVANCE.

    Hi virendrapawar11, 
    Thank you for providing that information.
    Are you signed is a the Administrator of that computer?
    WIA drivers are part of Windows Operating System.
    Run this Microsoft Fit It Tool to see if it will resolve this issue.
    Diagnose and repair Windows File and Folder Problems automatically.
    I have provided this document, just to make sure these are the same ones you had checked.
    This document is to Check the Windows Image Acquisition (WIA) services.
    Windows: HP Scan Software Does Not Open or Scan on a Printer Using a USB Connection.
    Disregard the title.
    Go to Solution three: Check the Windows Image Acquisition (WIA) services.
    Temporarily turn of the Antivirus Software and try scanning again.
    If the issue persists, download and try to repair the WIA drivers. If you don't feel comfortable about doing these steps, you can contact the computer manufacturer or Microsoft to resolve this WIA error.
    Back up the registry first.
    How to back up and restore the registry in Windows.
    Restore Default Startup Type for Windows Image Acquisition (WIA).
    Once the WIA is working properly agian on the computer, most likely you will have to uninstall and reinstall the printer software.
    Please let me know the results.
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

Maybe you are looking for

  • Error connecting to the BPEL server from JDeveloper

    My student asks about an error she gets while trying to test a connection defined in JDeveloper to a mid-tier BPEL PM. She gets one error the first time the connection is tested, another at second and subsequent tests. The following error I get only

  • External Firewire to a PC?

    Hey, Problem: Is there a way to get a PC (running XP) to identify and use an external firewire HD I've stored all of my music on, via an iBook? I connected it to the PC but Xp couldn't read the volume. It would be great to transer the files over the

  • Can I use my ipod in a infrared sauna*

    The far infrared sauna a dry heat and some people say and others say no.

  • DPS6: hiding attributes for entries not matching a specific objectclass

    I'd like to be able to hide some attributes, but only for entries not matching a given objectclass. DPS 6 allows data hiding rules to apply to a specific subset of entries, but the subset can not be defined thanks to a negative filter such like (!(ob

  • HELP THE ROOKIE AND LEAVE UR 2 PENNIES!

    HEY EVERYONE, JUST GOT AN M.AUDIO AXIOM 49, TO USE WITH LE7. Does anyone have pointers on the most knowledgable and efficent way to set it up, use enigma, save presets, etc... this is my 1st MIDI controller, and I have read myself to death and have t