Printing with the AWT

HI
Yes I know AWT printing has been superseded by Java 1.4.2,
However due to the limitations of the systems I'm building for, I have to use Java 1.2
Right the problem is this:
I wish to print out several (ok about 30 lines) of ASCII text, detailing the setup for my application, so the user can have a hard copy in case he borks up his PC and loses them.
What I cant seem to do, Or find on the forums, is a simple way of printing text to the printer using the AWT.print , I found some code that draws pretty pictures on a jframe , then prints them out ok, but nothing on text.
Anyone got any help/code to point me in the right direction
Thanks
Boris

I think that whatever you want to print has to be drawn using a Graphics object, which is probably why all the examples include drawing pretty pictures.
You've probably already seen it, but just in case: http://java.sun.com/j2se/1.4.2/docs/guide/awt/1.3/designspec/printing.html
I seem to remember writing a class that took a big String, used FontMetrics to work out the height of each line to calculate the number of Pages and things, then used drawString() and a BreakIterator to make everything ready to print.

Similar Messages

  • How can I print with the black and white cartridge only?

    I am trying to print using the black and white cartridge only because magenta is out of ink but I'm getting the following error message in HP Photosmart C7200 series print dialog:
    The printer is out of ink.
    The following ink cartridges are empty: Magenta. Replace these ink cartridges to resume printing.
    How can I print with the black and white cartridge only?
    Mac OSX 10.7.3
    HP Photosmart C7280 (7200 series)
    This question was solved.
    View Solution.

    I am absolutely disgusted by this; clearly a scam from HP to make more money by selling extra ink cartridges!!  I will make sure to never buy any products from the shoddy rip off merchants at HP ever again!!
    You should be ashamed!!

  • Printing a new format page in Matrix Printer with the SAPWIN Device Type...

    Hi,
    The requierements is to print Identification Material Labels with an Epson DFX-8500 printer. The label font is TIMES 34, therefore the Printer Device Type is SAPWIN. The real throuble is that label size (Format Page) doesn't exist.
    I created a New Format Page but when a print the Materlal Label (SAPSCRIPT), the SPAD configuration isn't recognized. I need an Height of 432 PT (Like INCH6 because the paper is continuous form) isn't recognized.
    Could somebody help me???
    Alexis Sánchez N.
    SAP ABAP Development Consultant
    << removed >>
    Valencia, Venezuela
    Edited by: Rob Burbank on May 25, 2010 3:56 PM

    Hi all,
    I solved myself... This is the way...
    I have an Epson Matrix Printer (Epson DFX-8500)
    In SAP, I created the Epson DFX-8500 Printer with the device type SAPWIN. This printer have some attributes in windows operational system (Windows XP). One of this attributes is the default paper size (Letter).
    To change this, you have to do what the SAP Note 163136 (Creating new paper size for Windows NT-2000-XP-2003) says:
    Solution
    Note: This note is based on Note Q157172 from the Microsoft Knowledge Base.
    You create a new paper size this way in Windows NT:
    1. Choose 'Control Panel' and double-click 'Printer'.
    2. Select 'Server Properties' in the 'File' menu.
    3. Select the 'Create A New Form' check box on the 'Forms' tab page.
    4. Enter the settings for the new paper size.
    NOTE : If you set up your own customized paper size, the margins
    cannot exceed the settings of the installed printer. The print area
    must correspond to the margin settings of the printer driver used.
    5. Save the paper size.
    Proceed as follows to use the new paper size as the default format:
    1. Select 'Printer' in the 'Control Panel'.
    2. Click the right mouse button to select the required printer and select
    'Document defaults'.
    3. Select the new paper size in the 'Paper Size' selection box (on the
    'Advanced' tab page).
    4. Click OK.
    5. Again with the right mouse button click the required printer and
    select 'Attributes'.
    6. Open the 'Device Settings' tab page and select the paper tray from
    which you should print. Then select the new paper size.
    NOTE: New paper sizes are stored on the computer on which they were
    created. If you create a new paper size for a shared printer, you must
    create the new paper size on the printer's print server.
    NOTE : In Windows XP, there is an error in this procedure that can be
    corrected with Note Q838298 from the Microsoft Knowledge Base.
    I hope it helps you...
    Alexis Sánchez N.
    SAP ABAP Development Consultant
    Valencia, Venezuela

  • I have a PIXMA MG8120 Printer with the error message 6A81.

    I have a PIXMA MG8120 Printer with the error message 6A81.  I have turned off the power many times as well as unplugging the power source for a full day. There are no obstructions. What do you suggest?

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    The section Install missing components has advice on breaking down the iTunes installer into the individual .msi files which might prove useful if AAS won't install normally.
    tt2

  • After I retouch a pic, it won't print with the retouches. It prints the original.  What am I doing wrong?

    After I retouch a pic, it won't print with the retouches.  It still prints the original pic.  What am I doing wrong?

    There are 9 different versions of iPhoto and they run on eight different versions of the Operating System. The tricks and tips for dealing with issues vary from version to version and OS to OS. So before anyone can help, they need information to work with. Things like:
    - What version of iPhoto.
    - What version of the Operating System.
    - Details. What were you doing when the problem arose?
    - Did it ever work properly?
    - Are there error messages?
    - What steps have you tried already to solve the issue.
    Anything else you can think of that might allow someone else to understand your issue.

  • I cannot print on my Canon i550 printer with the used Win7 computer I just bought. I downloaded a dr

    I cannot print on my Canon i550 printer with the used Win7 computer I just bought. I downloaded a driver update from Canon that is supposed to fix the incompatibility issue, but it does nothing. Can anyone help? Can't afford a new computer or printer!

    Hi cjvandeveer, The Windows 7 operating system has a mini-driver built-in for the printer. You can plug in the USB cable of printer into the computer and then turn the printer on. If Windows 7 automatically recognizes the printer, it will appear in your DEVICES AND PRINTERS window, and you will be able to print. You will then need to download the Windows 7 printer driver add-on module from our website. The add-on module will give the printer its full capability, but only after the printer is already recognized by Windows 7. First, to see if Windows recognizes your printer, please follow these steps: 1. Plug in the printer's USB cable into the computer and then turn on the printer. 2. Go to your START MENU on the computer and select DEVICES AND PRINTERS. 3. See if your printer is located in the DEVICES AND PRINTERS window. If it is not, we may need to run Windows Update on your computer in order for the printer to be initially recognized. Please follow these steps to install the latest driver for your printer from Windows Update: 1. Turn the printer on and ensure it is connected to the computer with the USB cable. Please note that your computer will also need to be connected to the internet before performing the next step. 2. Click on your START menu button, and in the text box that appears, type in 'WINDOWS UPDATE', then click on START SEARCH. The Windows Update window should open. 3. Click on the 'SEARCH FOR UPDATES' or 'CHECK FOR UPDATES' link. The computer will search for updates and then display the updates it has found relevant to your operating system and devices connected to it. 4. View the CRITICAL UPDATES and OPTIONAL UPDATES that appear; if you see an update for your printer, select that one and then install it. 5. Once the driver is installed, please restart your computer. Once Windows 7 recognizes your printer, you can then install the printer add-on module from our website to give the printer its full functionality.  Hope this helps! This didn't answer your question or issue? Please call or email us using one of the methods on the Contact Us page for further assistance.

  • Is there away to print with the iPad first generation

    Is there away to print with the iPad first generation

    I have a Brother HL-2170W and I istalled it to the Router through wireless for use with different computers in the house. I downloaded the free Brother Apps to my Ipad (Vintage) , when I opened the Printer Apps and click find printer it searched and disovered the printer and next open a page from the note and test printed. No third party apps required.
    Hope this will answer the query.

  • Is there any way to type your email address so that it would print with the push of one button, like a macro??

    Is there any way to type your email address (or any other information) so that it would print with the push of one key -- like a macro?

    Take a look at Text Expander:
    http://www.smilesoftware.com/TextExpander/

  • Cannot print with the new OSX with my canon mp550 printer

    I cannot print with the new OSX with my canon mp550 printer , it sais there is no available driver ..!! what to do ..?? does anyone have a solution ..??

    OS X Mavericks: Reset the printing system

  • Can't print web sites with the epson printer just installed. It wants to print with the old HP printer

    I just installed a new printer, an Epson Stylus NX 420. The old printer is A HP photosmart 4580. I can not print with the new printer. If I want to print an e-mail it keep referring to the old printer.Same thing with an article of the web. I am able to print when I use the internet explorer browser.Please tell me what to do to make this work. Thanks

    Tech guy is probably correct. We don't usually see reports about trouble with Epson printers, but ID is not the best behaved application when it comes to printing. The usual workaround is to export to PDF and print that instead.

  • Can't use my HP Deskjet F4580 Wireless Printer with the AirPort Extreme Base. The printer is NOT connected at the USB port of the AirPort Extreme, and is placed in another room. It worked just fine with my previous router (Linksys WRT54G). Help me!

    Hey Guys!
    I just got my AirPort Extreme Base, but I can't use my HP Deskjet F4580 wireless printer with it.
    The printer is not connected to the AirPort Extreme's USB port. It is placed in another room, and I'd like to use it (the printer) wirelessly (not connected to the USB port os the AirPort Extreme), as I used to. There is no place for the printer close the AirPort Extreme. It worked just fine with my previous wireless router (Linksys WRT54G). I'm very disappointed with the AirPort Extreme Base Station because of that!...
    Can you help me? Please?!
    Thanks Folks!

    This must be a tough one, no suggestions at all.

  • Poor quality Photo printing with the HP Officejet 6600

    Is anyone having a problem with the HP Officejet 6600 having very poor quality photo prints?

    Hi HereInJersey,
    Welcome to the HP Support forums.  I understand that printed photos from your  Officejet 6600 don't have the quality that you expect.
    I have included the "Fixing Ink Streaks, Faded Prints, and Other Common Print Quality Problems" troubleshooting document.  It has detailed steps to take to improve the quality of your print jobs.
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • Duplex printing with the MG3150

    I have a 36 page document which is A4 in size folding to A5 and I want to print it out as a finished file and I was wonderig if anyone has any information about the duplex feature with the Canon MG3150. Basically the printer is printing both sides of the document but its printing it upside down so the page numbers are not following in the correct order. I think it might have something to do with the 'print both sides' option but for some reason I cannont get this feature to highlight (its always in grey) Any ideas?

    Hello designalien.
    Unfortunately, we here at Canon USA are not familiar with the MG3150.  It appears that this unit is available in Europe or the UK..
    If the unit unit was purchased in Europe, please visit the following link for more information or assistance:
    http://www.canon-europe.com/For_Home/Product_Finder/Multifunctionals/Inkjet/PIXMA_MG3150/ 
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • No. of child Items should be printed with the parent item at row level

    Hi..
    that the number of the child Items should be printed on A/R Invoice along with the parent Item at row level.
    I want to know whether this is possible through PLD or not . if yes, please let me know how ?
    Regards
    Rakhi
    Edited by: Rakhiatsap on Jul 12, 2010 9:21 AM

    hi Joseph
    I  have defined the Sales type of BOM for the parent Item. At the of punching the A/R Invoice, all the child items appear under the parent items and changeable in terms of Numbers. and in the printed Invoice  parent item details appear.
    What i want that the only number of child items of parent item should appear at the row level.
    Regards
    Rakhi..

  • Scan and print with the c5031i

    Hi!
    Is it possible to scan several small notes, and make the printer print them out on two separate A4 papers? At the moment I can fit three notes on the A4 section of the printer, but if I could use the right side of the scanner too, I would save a lot of time. It's essential that the copies comes out on two separate A4s

    Hi again, thank you for the information. I just want you to be aware that when you select the size of the photo's that it needs to be set not only just in the software that you are using but also in the printer setting's in the Control Panel. The path to take is as follows: Click on Start, Control panel ( please make sure that you have it set on Category view in the top right hand corner), Right click on your printer and select Printing Preferences, Click on the advanced option button on the bottom right corner, Then select the paper size drop down arrow and make sure the paper size matches the paper size in your software.
    Hope this helps with the issue.
    Thanks again.
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

Maybe you are looking for

  • Problem with Report and distribution file

    Hi. I have a report that create the paycheck for my customer's employe. My first group on the report is the email adresse of the employe, so i can cut the report end send it by mail to the said employe. 95% of the time it's working perfectly. But whe

  • Is there any way forms can work on less than 7.0.9

    Hi Gurus, I know that minimum requirement for Adobe Interactive forms is that reader version should be min. 7.0.9 Our current version is 6.0.2, but due to some issues, we can't upgrade Adobe version to 7.0.9. Still we want to use Interactive forms. B

  • S206 wiht a simple HDMI to VGA Adpater is it possible?

    It it possible to switch in the HDMI analog Modus with the S206 to use this cable ? Thx 4 answer.  http://www.amazon.de/HDMI-Kabel-Videokabel-Adapterkabel-Anschlusskabel/dp/B002F44MJE/ref=sr_1_1?ie=U...

  • Weird right click problem

    Okay, this started mid day yesterday, and I can't find any topic on it. When I right click on something (i.e. folder, file, or even the back button in Safari) it acts like a double click. I haven't installed anything new lately other than Quicktime a

  • Flash 11 installed but not detected by IE

    I'm not a Windows user, but trying to help my elderly parents figure out why they are no longer able to watch videos on their laptop. They have a Dell Studio XPS 1645 machine, Intel Core CPU Q720 @ 1.60 Ghz Installed memory 4GB, 64-bit OS Running Win