Printing to network printer using JDK 1.3

Hi everyone,
We have the requirements from a client to enable them to be able to pick a printer from anywhere on our network and then send a report to that printer through a web application.
We are restricted to using the 1.3 JDK on Weblogic 6.1
I have searched this forum for info on how to print to a network printer and I have gotten lots of the code samples that look like the one below but I can't seem to get it to work.
Any suggestions on how to accomplish this? Or what errors I'm making...
Here is the error:
Summary Statement Did Not Print: java.io.FileNotFoundException: \\BCHYDRO_TREE\cpp_07SE01_hp8150dn_ps-pcl.cpp7.gvd.lm.bchydro.ca (The system cannot find the file specified)
Here is the sample code:
import java.io.*;
public class PrintTest
     public static void main (String args[])
          PrintTest pt = new PrintTest();
          pt.printAsText("This is a test");
     public void printAsText(String sSummaryStatement)
     try
     FileOutputStream fos = new
     FileOutputStream("\\\\BCHYDRO_TREE\\cpp_07SE01_hp8150dn_ps-pcl.cpp7.gvd.lm.bchydro.ca");
     PrintStream ps = new PrintStream(fos);
     ps.print("\r");
     ps.print(sSummaryStatement);
     ps.print("\f");
     ps.close();
     System.out.println("Print Job Sent");
     catch(Exception e)
     System.err.println("Summary Statement Did Not Print: " + e);
     }// end function printAsText()
}

Hello,
I am also working on a very similar assignment and I was wondering if you have had any luck with your original post problem. I would appreciate it if you would post any discoveries that you have made as I believe we are travelling down the same road. Thanks!
Janis

Similar Messages

  • Unable print scheduled report on network printer using BOEXI 3.0

    Hi,
    I'm unable to print a scheduled report on network printer using BOE XI 3.0. I get the following error
    Error Message: Error in File ~ce6a054be1a25b52.rpt: Request cancelled by the user. ]
    Has anyone encountered this kind of problem and know what the solution is?
    Thanks,

    Hey Falk,
    Thanks for the response.
    I can print on a network printer after I changed 'Crystal Reports Job Server' to run under a user account that has privileges to access the printer.
    To answer your questions regarding the problem:
    >Can you schedule the report successfully ?
    >>Yes I was able to schedule the report successfully
    >Can you print the report successfully?
    >>NO the scheduled task would fail with the error message as posted above.
    Thanks,

  • Driver-less network printing using samba

    Hi, I recently re-installed arch on my laptop, which has no printer connected to it.  Before I had been able to print through a printer which i had connected to an ubuntu box on my home network.  All i did to get this working was to install the printer driver on ubuntu, then share the printer using samba.  After i had shared the printer on the ubuntu box, i was able to see it in the Printers section of KDE Control Centre in KDE 3.5.9.  I was then able to use the printer without installing any drivers.
    I've attemped to redo this setup, however i cannot seem to get it working.  If someone could tell me where to look for info on how to do this?
    Thanks

    Hi, I recently re-installed arch on my laptop, which has no printer connected to it.  Before I had been able to print through a printer which i had connected to an ubuntu box on my home network.  All i did to get this working was to install the printer driver on ubuntu, then share the printer using samba.  After i had shared the printer on the ubuntu box, i was able to see it in the Printers section of KDE Control Centre in KDE 3.5.9.  I was then able to use the printer without installing any drivers.
    I've attemped to redo this setup, however i cannot seem to get it working.  If someone could tell me where to look for info on how to do this?
    Thanks

  • MacBook Air defaults to "last printer used", not the printer that is on the available network

    Hello
    I have searched the forum and not found a discussion of a problem exactly like mine...which is not as frustrating as not being able to print, but slightly burdensome nonetheless. I have a MacBook Air with OSX 10.6.8. I use the machine in two different places, each with a wireless network, and each network has one printer connected to it. However, these are not and have not been set up as different "locations". In the past, when I printed a document the machine would correctly, and automatically, choose which printer to print to based on which network it was connected to. Now, it defaults to "last printer used" (the only choices are this, and the two printers, but none of these choices works in my setup as I go back and forth between the two different places almost daily). My machine does see both printers and if I manually change the printer when I move around, I can print so it is not an issue of the machine not connecting to the printer. Is there a way for my machine to automatically detect which printer it should print to, based on which network the machine is connected to? I am quite sure it used to do this before some update.
    Thank you very much

    LowLuster wrote:
    Mac's are no more reliable than any other PC on the market.
    What is your source for this for this statement?  All the surveys that I have seen show significant differences between manufacturers and put Macs at or near the top.
    Macs use the same hardware as all the others.
    There may be SOME common parts, but certainly not all, so your statement lacks accuracy.  In addition, the design and build are other factors that have to be taken into consideration when making comparisons.  Thus there are significant differences between ALL laptops.notebooks.
    Ciao.

  • HT2250 I have an Apple network utility that with the previous printer (Canon PIXMA iP 5000) found the printer on the Network for use on a wi fi system but a newish printer (Canon MG6150) does not show up as Bonjour.  Is that correct?

    I have an Apple network utility that with the previous printer (Canon PIXMA iP 5000) found the printer on the Network for use on a wi fi system but a newish printer (Canon MG6150) does not show up as Bonjour.  Is that correct?
    paul.kelly

    Hi Steve,
    No expert, but since nobody else has piped in...
    Did you setup the DNS Server IP?

  • Very urgent !!!!!  printing on network printer using pl/sql

    How can i automatically print the output on printer using pl/sql (procedures)

    Hi,
    Can you give some more details about your Network and hardware environment. Also give some more details about what Oracle products you are using.
    Regards.
    Yogesh D.

  • Printing to a specific tray using JDK 1.3.

    I want to select a particular printer tray while carrying out printing.
    I am using JDK 1.3.Can this be made possible.
    To explain in detail , My application would be actually fetching the printer details .No dialogue box is supposed to pop up.Once the print button is clicked directly the page should be printed to a specific printer & a particular tray.
    Can anyone guide me.

    I suggest taking a look at the following thread:
    http://forum.java.sun.com/thread.jspa?threadID=555165&tstart=0

  • My HP printer on the wireless network and I can not get it to print using my iPad

    Any ideas on how to get my wireless printer to print using my iPad?

    Trenton1 wrote:
    Any ideas on how to get my wireless printer to print using my iPad?
    Are you using an Airprint-capable printer?  Is it on this list?
    http://support.apple.com/kb/ht4356
    If it is, have you updated your firmware.  Most printers that say they can be used with Airprint need to have their firmware upgraded before they can actually print using Airprint.  HP's support pages provide the FW downloads you will need.

  • HP Deskjet 3550 cannot print using Airport Extreme via USB connection on Windows 7 64 bits

    Product Name and Number: HP Deskjet 3550 Inkjet Printer
    Operating System installed: Windows 7 Home Premium 64 bits
    Error message: None
    Any changes made to your system before the issue occurred: Setting up HP printer using Airport Utility to add a new printer and installed Bonjour Print Wizard.
    Problem: My printer is already set up using Airport Utility. When I print something, the printer doesn't do anything. Is there something I haven't done lately in order to get this printer working using my wifi router?
    Suggestion #1: Are the print jobs getting stuck in the print queue? You can check this by clicking on the printer icon in your task tray by the clock.
    Error Message #1: Yes, the print job got stuck in the print queue, but the moment, it disappeared from the print queue and the printer doesn't print at all. This is frustrating.
    Suggestion #2: Does the printer work as expected if you connect it directly to the PC via USB?
    Error Message #2: Yes, the printer works if I connect it directly to my PC via USB, but I don't understand why it wouldn't work with the wifi router, though.
    Suggestion #3: This has to do with the way the router handles the connection to the printer. I found another thread, regarding this issue, and it has some information that may help resolve it.
    http://h30434.www3.hp.com/t5/Printer-Networking-and-Wireless/Print-Problem-Using -USB-Printer-on-Airp...
    If that does not help, I would recommend posting on the Apple forums, as they may have more expertise with the router's abilities:
    https://discussions.apple.com/community/wireless/airport
    Error Message #3: After clicking on the first link that you posted, it was very helpful, but the printer couldn't print completely and somehow it would stop at the quarter of a paper. It looks incomplete when I took it out from my printer. It does that every time.

    UPDATE!
    Problem solved!  So this is just a followup in case someone else ever stumbles into these boards with the same or similar problems as mine, that is, trying to run an HP Deskjet D1500 series printer [mine's a D1520] on an Airport Extreme wifi router's USB port as a network printer [with the Airport Extreme controlled by an ancient G4 PowerMac Quicksilver currently running OS X 10.4.11).
    Although it probably SHOULDN'T matter, since this type of printer works fine with just the Tricolor cartridge as shipped when hooked up directly to a computer's USB port, on a hunch I got a black HP cartridge (that's a type 21, not type 22 as I had earlier said), slapped it in, tried a test page, and all's well.  So, we can call off the technoid hounds.  Everything running perfectly.
    I hope this message in a bottle may help someone else out there some day soon who may be scratching his or her head with a similar stumper.  And just to recap those important Windows printer settings, they are:
    * [Printer Properties--> Ports--> Add New Port...] "Standard TCP/IP Port"
    * [Configure Port] IP Address "10.0.1.1" and Port "9100"
    Best of luck!
    Bilgey

  • PhotoSmart 310a doesn't print using wireless connection

    First... I have to say that if I had known what a HUGE pain in the butt this printer was I would never have bought it.  On top of that, the thing apparently doesn't have an option to "hard wire" connect it to my computer... which the guy at the store didn't bother to point out.  On top of that HP's customer service is, apparently, non-existent, as attempts to reach by phone are useless.
    They can't even seem to get the model number on the machine where you can find it... so the instructions on "how to find your model number" are useless.
    That said... here is my problem... which if I can't fix, I'm simply returning this and getting something else.
    I have my printer all set up.  Wireless is set up.  ePrint is set up.  Test pages print fine.
    I have actually been successful printing with it ONE time.... so I know that it can do it.
    It does give me a "low signal" message - however it seems to have no problem printing using the email option, or downloading from the web for the "reports."   It scans and my laptop "sees" the scanned image, which is transmitted over the wireless network.   If it is truly a low signal problem it seems like it would have issues with other functions regarding the internet.  
    BUT... when I send something from my laptop (MacBook OSX 10.5.8) to the printer it says...
    .. connecting
    .. idle
    .. priinting (%)
    .. then the print job disappears from the queue in the dialog box ... yet nothing actually prints out.
    .. it then say's "Printer Ready" - I guess ready for another print job that it won't perform.
    .. It does NOT give any kind of error code... say it's "paused" or anything like that.  It's as if it THINKS it is printing... but it does not.  It makes no sound like it's trying to print either.  Paper is loaded in fine and it will print test pages with no problem and doesn't indicate any problems on those other than "low signal"
    ... When I use the "printer utility" to print a test page - also goes wireless - it prints just fine.
    I've tried to use this printer only 4 times now for various jobs... and each time has been an ordeal lasting from 30 minutes to several hours.    I've managed to get it to print on one occasion... though I can not remember how I did it.
    It has NO problem printing from an email... so I guess I could just always do it that way... but it involves several extra steps to do so and I'm not even sure it would work for every type of print job I need.
    It works fine scanning
    It works fine photocoping
    It works fine printing from ePrint (email)
    It just DOES not print via the wireless connection
    I don't understand how a company can make something this sophisticated and not have it give you an ERROR CODE when it fails to complete a function... and frankly, I'm fed up with this thing.  It's a big, oversized, shiny paperweight and I've wasted way too much of my time trying to figure it out.  This is one last ditch effort.
    Can anyone help?    THANKS so much if you can!
    Sue

    It is more likely a network problem, so please tell me about your network - router brand/model, encryption type (WEP, WPA, etc) and ISP type (DSL, Cable, etc).
    In the mean time, you could try this quick trick; resetting the printing system:
    - Sys Prefs, Print & Fax
    - Right (control) click in the rectangle listing your printers and select Reset Printing System.
    WARNING - this will delete ALL of your printers!
    - Select the plus sign to re-add it. Look for the printer, select it and wait until the "Add" button becomes available. Click it.
    Oh, and indeed this printer does have a USB port for connection directly to your computer.  It does NOT have an Ethernet port for connection directly to your router.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Can't print wirelessly with HP 7410 printer using Airport Extreme

    I've got 3 Macs (2 laptops, one desktop) that I was using successfully with my wireless HP 7410 all in one printer using my old Airport Base (snow) Station (822 b & g). Just upgraded for a variety of reasons to the new Airport Extreme Base station and I have NOT been able to get the printer to print wirelessly.
    I have tried all available normal methods, including, but not limited to:
    1) resetting and restarting the printer and computer
    2) installing new printer software, including driver
    3) deleting and reinstalling printers using the "print and fax" system preference
    4) using the printer on a non-secure network
    5) setting up the printer to connect via IPP and LPP
    The end result of all of this is that the printer is attached to the network, but the computer (any of the 3) cannot connect to the printer. When I run the HP setup assistant, it cannot "find" the printer.
    Everything was working perfectly before I "upgraded." Why am I not able to print with the new base station?
    Your help would be greatly appreciated.

    I have the same proble trying to print. I have a Mac and 2 PC laptops. I tried to print to three different printers and it will not work. I called Apple support and I was told that it was set up and configured correctly, that it ust be my firewall blocking the printer. I'm at a loss after $179.00 and three hours of trying to get it to work.

  • Print using LPR to Hewlett Packard Designjet 120nr

    I am attempting to set up an LPR connection from OS X 10.5.2 to a Windows 2003 Server based queue.
    When I add the printer, I am prompted for Server and queue name, this aspect is fine and I have set up other networked printers using this method o.k.
    However, when I try to setup the designjet 120 using the same method, I am unable to find the Print Driver in the list of available files.
    If I set the printer up selecting the HP IP Print option, the operating system automatically detects the HP Printer and makes the driver available for use.
    Is it possible to access this 'built in' driver when configuring LPD printer connections?
    Hewlett Packard do not make the driver available for download - they say that it is built in to Leopard. Apple state the same.
    Any help appreciated

    I'm sorry if I was too brief with my explanation. The driver provided by HP contains code for the direct USB connection and code for the HP IP proprietary protocol. Since it was coded this way, it bypasses the "filter pipe" system in CUPS. If you'd like to read more, this type of print driver is called a monolithic driver in CUPS documents. A driver that makes use of the standard comm protocols provided by CUPS is called a "modern" (I call it a CUPS-) driver.
    You can't get a non-CUPS driver to work by changing the comm protocol to LPD.
    There is another option. You could set up the Windows server to be a postscript RIP/server:
    http://iharder.sourceforge.net/current/macosx/winmacprinter/
    (Sorry, but I don't actually know if it will work with a Server Windows version.)

  • Print driver is not shown in "Print Using:" menu

    I have a HP psc 2410 printer that I have connected directly to my Mac, but I want to connect it though my Windows PC which is my home server. The printer works fine when it is connected via the USB cable and the driver listed after "Print Using:" in the add new printer box is called "hp all-in-one 2.2.9". When I try to add the same printer via the Windows network I see it the printer, but when I try to find the driver in the "Print Using:" menu, I don't find it. How can it be there for the USB connection, but not for the network connection? Where do I find it, if it isn't in that driver list?
    Thank you!

    Print drivers written using the older Mac printer driver model specifically list the type of connections they support. Most of these old style drivers do not support Windows printing. I think that is what you are seeing.

  • Can't print using ethernet connection

    I am running Lion (10.7.4) on new Macbook Pro and am not able to connect my printer (HP LaserJet 5000GN) via an ethernet connection. I've downloaded the software drivers from Apple (v. 2.9) and used software update to make sure I am fully up to date, and restarted.
    When I select System Preferences>Print and Scan and the click "+" in the dialog box, the Add Printer window comes up with nothing in the default window. When I go to the IP window in Add Printer the three options are IPP, LPD, and Socket. If I enter my IP address in the address box (I get a "Valid and complete address" verification in the window, I also pinged the printer successfully in Network Utility), and select the HP LJ 5000 series in the "print using" box, IPP gives me an error and LPD and Socket tells me "Unable to verify the printer on your network. It can not be currently determined if ‘192.168.0.4’ supports the HP JetDirect Protocol. Would you still like to create the queue?" If I select it anyway, it gets hung up on the "Setting up '[name of IP address]'" popup (shows it's running but never completes) unless I click the configure button and check the boxes.
    After checking the boxes if I then go back to the Print & Scan Window, a printer appears with my IP address as its name. If I try to print, the Print Queue window comes up but the progress bar just runs endlessly and I get a message in Print Queue window, "Microsoft Word - Unable to verify your printer on your network." (The first part is because I tried to print a MSW document, but I've tried other software and it still fails to print.)
    I've also tried this with different ethernet cables and with a direct ethernet connection vs. on a hub. The printer was working fine via ethernet connection on my old Macbook running 10.4, so I know this is some kind of software/configuration problem. This is an old printer so ethernet is the only option for connecting to the computer.
    Any help would be much appreciated.

    seems like it's all working now. i selected apple talk, and it found my laserwriter instantly.
    forgot about apple talk!

  • Air Print to any printer - using linux cups server

    For those folks who may have Linux boxes with a printer configured, you can make this printer available for air print using a tweak to your CUPs config and adding an avahi service. Details are here (no need to download & purchase additional software)
    http://hartlessbydesign.com/blog/view/197-airprint-with-ubuntu-1010
    I tested this procedure myself on a Canon MP140 printer sending a print job from the photos App on an iPad. It took a couple of refresh attempts to find the printer but once it did, print jobs sent just fine.

    I do not have the exact printer model that you have, but have used several HP wireless printers that all work just fine with an AirPort Extreme.
    Your wireless printer will connect to the wireless signal provided by an AirPort Extreme.....or any other wireless router.....just like any wireless device would connect to a network:
    1) Identify the network to be joined during setup
    2) Enter the wireless password to connect to the network

Maybe you are looking for

  • Touchpad in Cinnamon stops working

    So this has happened twice now. I got arch setup on my new Acer Aspire 1830T and everythings great. I'm trying out cinnamon as my desktop environment and I'm loving it. Here's the problem, after a few days, my trackpad just stop working all together.

  • How to import many large graphic images to fit into column width?

    I have a 2-column layout and about 150 large graphic images which must be imported so that they fit exactly into the column width. These are bitmaps which have all the same dimensions. All of them will need a border (stroke). And they should be inlin

  • Unable to run an exe file from a Servlet

    I am not able to run a Servlet that calls an exe file using the following code. trial.exe is was built from a C program and it is simply a program that creates a text file with some content. I am using Tomcat 6.0 and JDK 1.5 on a Windows XP. {color:#

  • WTK�s memory monitor is very slow

    Hello people! I was using the WTK�s(2.2) memory monitor and it�s woking well. But now, the momory monitor is too slow. Almost stopping the application (a simple game). I don�t understand, the system is the same! The code is the same! The computer is

  • Fms doesnt work when i give my external ip

    hi, i installed FMS 2 and find it very easy to record and publish video steam, it all works fine on my local computer. when i open the ports 1935 in my router and open the fire wall to it i am still unable to contact to the server from the web, i ins