Web Application- Printing in draft mode

From JSP, I need to print a document in draft mode to local machine. I used the below code for doing the same. The report is getting printed to the server machine. I want the report to be printed in client machine (i.e if the printed is attached to client machine, report should get printed else message should be given as no printer attached).
InputStream is = conn.getInputStream();
DocFlavor myFormat = DocFlavor.INPUT_STREAM.AUTOSENSE;
Doc myDoc = new SimpleDoc(is, myFormat, null);
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(new Copies(1));
aset.add(MediaSizeName.ISO_A4);
PrintService services = PrintServiceLookup.lookupDefaultPrintService();
System.out.println("services" + services.getName());
DocPrintJob job = services.createPrintJob();
job.print(myDoc, aset);

JSP code executes on the server, not the client. It is meant for dynamically generating HTML pages based on code it executes on the server side. You are not using the right technology for your goal.

Similar Messages

  • How do I print in draft mode on Epson Workforce 3540

    I just bought and set up an Epson Workforce all in one printer.  Everything is working fine, except that I can't get it to print in draft mode.
    I've tried a few different applications and all are the same.  When I go to print, I get a window that includes a print quality slider at the bottom that includes three settings: draft, normal, and best.  The word "draft" is grayed-out.  If I try to drag the slider to it, it snaps back to normal in the middle.
    I looked in the printer's manual, and it says draft mode can only be selected with "plain paper" selected.  But, even when I have plain paper selected, I cannot choose draft quality.  In fact, it seems no matter what I try I cannot choose draft quality.
    The printer's owner's manual, it also shows some printer dialog windows that I don't get (I think I did get them with the Epson I just replaced, though).
    Can anyone tell me how I can select draft print quality, and why I'm having so many problems doing so?  Maybe it's to be expected that the Epson isn't letting me select the print mode quality that would save me the most ink.
    I'm attaching a screen capture of what I see when I try to print.  It is the first image.
    I'm also attaching a couple of screen captures from the printer's owner's manual section on Mac printing.  These are the printer dialog windows I don't see when I try to print.
    What I see when I try to print (note that "Draft" is grayed-out on the quality slider):
    These are what the printer's manual seems to suggest I should see (and what I think I did see with my last Epson printer that I just replaced):
    And:

    Based on your screen captures I believe you may have selected Apple's AirPrint driver rather than the Epson driver. This can happen if you add the printer by selecting it from the small pop-up window that appears with a heading of Nearby Printers after you click the plus button in the Print & Scan preference pane.
    To confirm which printer driver you are using, open the Print & Scan preference pane and select the Epson in the Printers colum. The right pane will give some details about the printer. If there is mention of AirPrint in the printer Name or Kind, then this will be the issue. The fix would be to remove this printer from Print & Scan and add again. But this time, don't select the Epson from the Nearby Printers pop-up. Instead, click on Add Printer Or Scanner from this pop-up window and from the next Default Add printer window, select the Epson in the list and ensure you select the Epson driver in the Use menu rather than the AirPrint driver.

  • How do I set my P3005 printer to print in "Draft" mode?

    How do I set my HP Laserjet P3005 to print in "Draft" mode. There doesn't seem to be an option for this in preferences or anywhere else I can find.

    Hi buretax,
    were they using the same printer?
    Have you tried uninstalling the printer and using the current software from this link.
    http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?lang=en&cc=us&prodNameId=1846089...
    I am an HP employee.
    Say Thanks by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"

  • How to print in draft mode on laserjetpro CM1415fnw color printer.

    Hi, i have a laserjetpro CM1415fnw color printer, how do i print in draft mode to save my black ink?

    Hi REMAX2011,
    The only other option I can see which might do what you are looking for is on the Services tab.
    1. Printer Properties
    2. Services tab
    3. Device services, and then click on Device and Supplies Status
    4. Click the System tab
    5. Click on Print Density
    6. Adjust Black density till you get what you are looking for.
    I am an HP employee.
    Say Thanks by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"

  • Epson R1800 always printing on draft mode HELP

    Since I installed 10.5 on my dual processor 2.5 Mgz g5, I have had nothing but trouble. One very annoying is that the. Print outs come out very light colored almost unreadable. Now I have to restart on 10.4 to get. A decent readable printout. I reinstalled that latest driver played around with color matching. But nothing seems to work. Any Thoughts?
    *I THINK IS PRINTING ON DRAFT MODE ALL THE TIME .HOW DO I TURN THAT MODE OFF?*
    thanks

    Since I installed 10.5 on my dual processor 2.5 Mgz g5, I have had nothing but trouble. One very annoying is that the. Print outs come out very light colored almost unreadable. Now I have to restart on 10.4 to get. A decent readable printout. I reinstalled that latest driver played around with color matching. But nothing seems to work. Any Thoughts?
    *I THINK IS PRINTING ON DRAFT MODE ALL THE TIME .HOW DO I TURN THAT MODE OFF?*
    thanks

  • Deskjet 1050 All-in-One J410e can not print in draft mode.

    I wanted to print in Draft mode (300x300 dpi).  I went to Avanced Options to adjust the resolution, but the drop down menu says "The following is for informational purposes only. Clicking on anything in this list will not change your Print Quality setting."
    I was also unable to select Draft mode in the Preferences>Paper/Quality tab.  Normal is automatically selected and the other options (Best, Draft, Custom) are grayed out. 
    What can I do to print in Draft mode (300x300 dpi)?

    1st_HP_printer,
    I believe the answer is best worded on Pg9 of the manual: http://h10032.www1.hp.com/ctg/Manual/c02227094.pdf
    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

  • Pages print in draft mode. first line normal and then the rest faint, how dop I restore this please

    Pages printing in draft mode. First line normal and the rest is faint.
    Please, how do I reset this.
    Thanks
    Bruce

    If you are using a printer (e.g. HP) that has an Economode (powersaver) setting, leave this off. Otherwise, your prints will look washed out as though toner was depleted.
    Since Pages itself does not have a selectable “draft” mode, the focus will be on your printer hardware and configuration.

  • Problem when printing on draft mode with hp6500a

    Hello
    this is the problem : when i want to print in draft mode, the document is resized in bigger like zooming...
    work normally in normal mode
    what's wrong ?
    i made all the check (hp diagnostic utility) and everythings are ok
    is someone has solution ?
    thanks in advance

    Hi there,
    Could you provide the community with a little more information to help narrow troubleshooting? What operating system?
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • Print in Draft mode

    I am printing to a network printer on my [Windows] home network. I am trying to print in "Draft" mode. In Windows, the print dialog allows me to choose the various quality options for my HP printer (Draft, Normal, Presentation, etc.). When printing from my MacBook, I do not get any of these options. Anything I print is sent in NORMAL which is slow and wastes ink for basic everyday documents. On the Windows machine that the printer is connected to, the default print settings are set to "Draft" mode, but anything sent from the Mac prints in Normal anyway. Can anyone help me remedy this? Thanks.

    If you are using a printer (e.g. HP) that has an Economode (powersaver) setting, leave this off. Otherwise, your prints will look washed out as though toner was depleted.
    Since Pages itself does not have a selectable “draft” mode, the focus will be on your printer hardware and configuration.

  • How can I set default printer options on an iMac for an HP pro 8500 printer to print in draft mode?

    How can I set default printer options on an iMac for an HP pro 8500 printer to print in draft mode?

    When you use the Canon driver, the 2 sided printing is set in a different location. There is an entire menu dedicated to it (at least on my mx892). The printer dialog box has a menu selector in the middle of the screen (I think it says "layout" by default). If you click on it, you will see the duplexing options at the bottom. Much more flexibility than the single checkbox available with "airprint". The interface is unusual (at least for me) but you can pre-set up many different configurations (Fast Duplex, Fine Single-sided, B&W, Photo, etc etc.)

  • Printing in draft mode from Windows

    I locked the com.apple.print.custompresets.plist file so that my printer always use my Draft preset. On Mac OS X, everything is fine but the problem is when I print from my Windows PC (which is in my home network).
    To make the printer work on Windows, I followed the steps on this tutorial:
    http://www.ifelix.net/tech/3012.html
    As the author notes, I used the Apple drivers since my printer isn't post script.
    The printer is working from Windows, but since I'm not using the HP driver, I can't set the printer to draft mode.
    Any ideas?

    Well, you're right, I couldn't get it to work, either (sorry it took so long, I had to wait until I got home to try).
    But I can get it to work by setting up a RAW queue on my Mac (which allows me to use the correct model driver on the PC). RAW means the Mac just acts as a print server and passes the input to the output - without filtering/translating.
    http://discussions.apple.com/thread.jspa?messageID=3296897

  • How to print in draft mode with Canon MX432

    I am unable to choose draft mode when I print. I can view it, but it is greyed out. My only options are "normal" and "best". I have contacted Canon and they say it is not a Canon issue and rather a setting that needs to be done on my iMac. I am currently running OS X Mountain Lion 10.8.2.  I have tried the print dialog box, settings and the printer web page. Still no solution. 
    Here is a pic of the dialog box in Safari. I have tried Word, Adobe, etc. They all have draft similarly greyed out.
    I would appreciate any suggestions of fixes for this issue.
    Thanks!

    When you use the Canon driver, the 2 sided printing is set in a different location. There is an entire menu dedicated to it (at least on my mx892). The printer dialog box has a menu selector in the middle of the screen (I think it says "layout" by default). If you click on it, you will see the duplexing options at the bottom. Much more flexibility than the single checkbox available with "airprint". The interface is unusual (at least for me) but you can pre-set up many different configurations (Fast Duplex, Fine Single-sided, B&W, Photo, etc etc.)

  • Printing in draft mode

    recently, when I go to "properties" and select "draft" mode, printier is not printing all of the data on the screen.  Worked fine before.  How can I fix this?  HP Officejet Pro 8600 on wireless setup.

    Hi,
    Please download and install the most recent drivers from this location.
    "Although I work for HP, I'm speaking for myself and not on behalf of HP"
    "Say "Thanks" by clicking the Kudos Star in the post that helped you.
    --Please mark the post that solves your problem as "Accepted Solution"

  • Printing in Draft Mode Printing

    The tip I received to use the Canon MP800 SP2 color profile, as present in the printing module improved the print reproduction quality.
    However I had to conclude that the color reproduction (too redish) varies strongly among the photos I printed.
    To my surprise when I selected 'Draft Mode Printing' I got the best print reproduction ever! I understood that Draft mode printing uses the cached previews or if necessary the built-in previews, which seems to be acceptable when the photos are small (from Scott Kelby's Lightroom Book).
    I am tempted to print in Draft, to finally solve my LR' print repro problem, but would like to understand whether this an option?
    Thank you for your advise!

    Hi,
    Please download and install the most recent drivers from this location.
    "Although I work for HP, I'm speaking for myself and not on behalf of HP"
    "Say "Thanks" by clicking the Kudos Star in the post that helped you.
    --Please mark the post that solves your problem as "Accepted Solution"

  • Draft mode report printing

    Pl. help us, urgent....
    We are developing report in Dev 2000 Reports Builder 3.0.4.6.3 on Windows 98 node.
    Our client's requirement is to print the reports on High Speed Dot Matrix Printer at every
    workstation place in Draft 10 Cpi font.
    I have tried setting Font of all layout components with (Draft 10 Cpi, Regular, 10). The result I have got on Wipro LQ 1050+ Dot Matrix printer is -- it is printing in draft mode but the printer head was tremendously twisting especially while printing the digits.
    Later I have tried with setting MODE=character DESTYPE=PREVIEW. The output of preview geting trailed for each line and words. The same result is coming wile printing at this setting.
    What should be right way of designing the layout of the reports and setting the required
    preferences/properties, to achieve that.
    This is very urgent, pl. reply as soon as possible. We are expecting yours
    valuable suggestion.
    Regards,
    Pulak Tarafder
    Pin 197582470820

    Just a first point, Reports 3.0 has been desupported, so you may want to look to upgrade.
    That said, it sounds to me like you just need character mode output. The first thing that I would do would be to run to file with mode=character set, then send this file directly to the printer to see if you get the same results.
    If you do then you should take a look at the documentation on prt files, and your printer manual to make sure that the prt file you're using includes the correct printer escape sequences to set the printer up in the way you require (the right font, etc.) Note that this won't work for bitmapped reports.
    Hope this helps,
    Danny

Maybe you are looking for

  • How to change a startup file association (Connecting doesn't start ITunes)

    I made an error and associated my iPod's connection with my printer control panel. So when I plug in my iPod ... my printer control panel comes up. I'd like to have it bring up ITunes. Does anybody know how I can change the file association so Itunes

  • Transform, assign, namespaces

    Hi, I'm having a lot of problems with assign and transform activities. I have different bpel processes with different input and output schemas. All the schemas have a commun element named TSO. If I try to copy the values from one variable to the othe

  • IPhone 4 with iOS5 connects to win 7 wifi but not to the internet

    Hi guys, I know a lot has been said about this and many different solutions have been given but none of them work for me so please bear with me. I can use my iPhone 4 with iOS5 to connect to my win7 laptop through wifi but I can't connect to the inte

  • How to tell which version of OBIEE I am currently using

    Hi, I am patching OBIEE on a server but no-one knows what version it is running. I can't seem to find the exact version anywhere. I know the release is 11.1.1.6 but that is all. Many thanks, Russell

  • Fit Content Proportionally Broken in CS6?

    I have been having a lot of issue with Fit Content Proportionally since upgrading to CS6. In many of my documents (some new, some pulled in from earlier versions and saved over as CS6), I find that both via the menu and via the keyboard shortcut, the