Printing components

Hi, here is my problem of the day:
I have a swing app which draws nifty histograms. Each histogram is a JPanel with other JPanels inside, two for the axes, one for the legend, one for the graphics, and so on, down to the single histogram bars which are JPanels themselves. Now I need to print the whole picture. If, in my Printable object, I call the paint method of the outmost JPanel, nothing is printed. I guess this is because the outmost JPanel is only a container for other panels. However I don't know how to print all the contained components. Yes, I could iterate through them and call paint() for each one, but this way I have to compute the layout myself in order to transform and clip the Graphics object. I wonder if there's a way to reuse the swing code (which is for sure more reliable than mine).
Lucio.

Hi, here is my problem of the day:
I have a swing app which draws nifty histograms. Each histogram is a JPanel with other JPanels inside, two for the axes, one for the legend, one for the graphics, and so on, down to the single histogram bars which are JPanels themselves. Now I need to print the whole picture. If, in my Printable object, I call the paint method of the outmost JPanel, nothing is printed. I guess this is because the outmost JPanel is only a container for other panels. However I don't know how to print all the contained components. Yes, I could iterate through them and call paint() for each one, but this way I have to compute the layout myself in order to transform and clip the Graphics object. I wonder if there's a way to reuse the swing code (which is for sure more reliable than mine).
Lucio.

Similar Messages

  • Problem printing components

    [reposted from Java programming forum]
    Hi. I have subclassed a JTable, and made it implement Printable. If I have one of these components (with several rows and columns of data), and print it out (using a PrinterJob), it prints out fine 90% of the time.
    The other times, some strange things happen. For example, some sections of the table will be missing... or it will cut off at the bottom (even though a footer will print successfully)... or just the right-most portion will print... And it's not that it's only whole table cells that are removed: sometimes the break is in the middle a cell, with the first two and a half characters of the data showing up on the page, for an entire column, etc.
    This seems to happen to other subclassed swing components, as well. I'm not totally sure, but it looks like the problem is more likely to happen when there is more data on the component (i.e. more cells in a table). The same thing is happening with a SimpleChart we have subclassed (com.klg.jclass.chart.beans.SimpleChart from JClass); i.e., when there are many points on a graph.
    Also, this is not restricted to any particular printer.
    Does anyone know why would this happen?
    Thanks,
    SigurRos

    Hi, I have the same problem, i.e. when printing a large report, sometimes it misses pages, or column dividing lines. If you find any solutions, please post it here. Thanks.

  • Printing components /resolution

    hi folks,
    i'm testing printouts from a JPanel including a JTable of my program with printables.
    the tables size is too big so that i tried to resize it by calling the graphics2D scale() method.
    Unfortunately the printout then looks like "fog", it's not readable.
    Is there any method known to improve the printouts resolution (maybe by interpolating) or is it necessary to create a bigger JTable with bigger fonts and then scaling it?

    What type of printer? For presentation prints like yours which are usually printed on an inkjet printer, a final full size resolution of 100-150 dpi will print just fine. For fine art high res photos, you would probably want more. Try building your base file at 32 X 48 at 125-150 dpi and you should be fine.

  • Printing components found on a JPanel

    hy,
    I have created a JPanel, where I have inserted some buttons
    onto it. How can I print the contents of the JPanel (That is
    print the buttons found on the JPanel
    thanks

    OK, its like this... with a JLayeredPane you have a DRAG_LAYER which is used to handle this type
    of activity... by promoting the component to this layer you are gauranteed that it will be painted last, (ie..
    overpaint the other layers.)
    In order to model this type of behaviour, you will need to:
    1) Override your panel's panitComponents() method and paint all except the active panel..
    2) Finally send the paintComponent() to the active component...
    :)

  • Successful using Java Print Service API on Windows 32 Platform

    Hello,
    Using the JSP API supplied with JDK1.4, I was able to print successfully the following types of documents :
    1. Text
    2. GIF, JPG... (images)
    3. PostScript files.
    But could not print "HTML" files. THe problem is that the HTML files are getting printed as text files with all the HTML tags.
    Any pointers are appreciated.
    Thanks
    TJ

    You will need to load the html into something that can render html. The printer doesn't know how to do it. It just sees plain text that you are sending. Try using JTextPane or JEditorPane (I think). It can render html files for you. Then just print that component.
    1) Create JEditorPane or JTextPane.
    2) Set contents of pane as the html file or string you want to print.
    3) Use the Graphics2D API to adjust the component coordinate space to the printer coordinate space.
    4) Render the component (JEditorPane or JTextPane) on the printer.
    There is a very nice tutorial for printing components here: http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-Printing.html.
    Hope this helps.

  • Printing JComponents with out displaying them on screen

    Hi, I have a JPanel that represents a page I want to print, it contains JLabels etc.
    I know that to print something it must implement the Printable interface, which requires a
    print(Graphics graphics, PageFormat pageFormat, int pageIndex)
    method. That's no problem, I can paint the JPanel to the graphics context and it prints, however ONLY if the components are isDisplayable(), because if they aren't they wont paint themselves onto graphics.
    As far as I understand it, to make something isDisplayable() they must essentially be put on the screen, which I dont want to do.
    Is there a way to print components without putting them into a window?
    Help is much appreciated as this project has a very tight deadline!
    Jim

    Friday was a bit of a haze, but I think that what I suggested would work. You have to add your components to a Window and     pack() that window to make them displayable. If you don't want them on the screen, don't call     window.setVisible(true);. Once they are displayable, you should be able to print them.
    Then again, maybe I'm still in a haze.
    -- Scott

  • Error 0x00000002 adding printer w2k8 TS

    Hi!
    I am having trouble adding network printers on my 2008 x64 terminal server:s (9 servers) i get 0x00000002 error.
    I have tried the following, Logged on as domain admin adding a network printer i get error 0x00000002, tried to install a local printer on the server gives me error 0x00000002.
    Adding local printer with Microsoft shipped drivers i get error 0x00000002
    Have tried above as local admin on server, same problem.
    Print server: w2k8 x64 Datacenter (all printers have 64/32 bit drivers)
    Terminal Servers: w2k8 x64 Standard
    Regards
    Roger

    Hi,
    Thanks for the post.
    From your description, I understand that the error code
    0x00000002 is received when adding a network or local printer on terminal servers.
    As we know, the
    error code 0x00000002 indicates the system cannot find the file specified.
    This issue may occur if one of the following factors is true:
    1.   
    The spooler service is corrupt.
    2.   
    The printer components are corrupt.
    3.   
    The permissions are inappropriate.
    Now I would like to confirm the following questions:
    1.   
    Does this issue occur on all machines?
    2.   
    Have you tried to install the printer with the elevated window? (Select
    Run as administrator)
    To troubleshoot this issue, let’s try the following steps.
    1. Unplug the problematic printers.
    2. Open Printers.
    3. On the File menu, click Server Properties, and then click the Drivers tab.
    4. Remove the relevant printer drivers.
    After that, please try to re-plug the printers and install them again.
    Does it work?
    If this problem continues, let’s collect the relevant information.
    1.  
    Open Printers.
    2.  
    On the File menu, click Server Properties, and then click the Advanced tab.
    3.  
    Select or clear the Log spooler error events, Log spooler warning events, and Log spooler information events check box
    4.  
    Stop and restart the spooler service
    Now please take the time to collect the relevant information on print server for further research.
    1. Download proper MPS Report tool from the website below.
    Microsoft Product Support Reports
    http://www.microsoft.com/downloads/details.aspx?FamilyID=CEBF3C7C-7CA5-408F-88B7-F9C79B7306C0&displaylang=en
    2. Double-click to run it, if requirement is not met, please follow the wizard to download and install them. After that, click Next, when the "Select
    the diagnostics you want to run" page appears, select "General", “Server Components”, click Next.
    3. After collecting all log files, choose "Save the results", choose a folder to save <Computername>MPSReports.cab file.
    Use Windows Live SkyDrive (http://windowslive.com/online/skydrive
    ) to upload the file and then send the download address
    to me directly at
    [email protected]
    Please inform me of the thread title in the email subject.
    Thanks,
    Miles
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Officejet Pro 8600 Plus Stopped Scanning

    I have been scanning 30 pages at a time and scanner has stopped in the middle of it.
    Can someone advise my problem. The diognostic tool states I'm missing a driver?
    Thank you.
    Barbara
    This question was solved.
    View Solution.

    Hello Barbara, aka @Maltesem ,
    I read about scanning issues you're facing with your Officejet 8600 Plus stopping in the middle of a scan. The "full" driver could very well be missing and causing this issue. Here are some of my own suggestions I have to offer you.
    1. Uninstalling the Printer Software from the Control Panel. Ensure you remove all printer components.
    2. Restart the PC (important)
    3. Download and run the installation to install the "Full Feature Driver": HP Officejet Pro Full Feature Software and Driver
    Try scanning again. If the scans still cancel, ensure the printer is plugged in directly to the wall outlet, avoiding power bars and surge protectors. This ensures the printer is receiving full power and may help greatly.
    If the problem still continues, call us directly to talk about your printer options with HP.
    Please call our technical support at 800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region. http://www8.hp.com/us/en/contact-hp/ww-phone-assist.html
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • Cannot Install Latest Driver or Full Menu Program for Laserjet 400 m401dw

    Running Windows 7 Pro (64 bit). Downloaded these files from HP: (1) LJ-M401-drv-installer-13198; (2) LJ-M401-full-solution-13198; (3) LJ-M401dne-full-solution-13067.  Each time I ran any of the files, I got about 91% complete at the "preparing to install" stage and then got the error message that the installation encountered an error and I should reboot. I have now rebooted several times and still have not succeeded with installation of any of the files. I have disconnected the USB cable everytime and still none of the files will install.  
    There must be some kind of workaround but I haven't found it.  Any help out there?

    Hi jleesq,
    I hate to hear you are having installation issues.  Please see the below steps that may resolve the issue.  If you are still unable to install, a generic driver can be added to enable print functionality only.  Here is a link that will provide steps for that, however be sure to select HP universal print driver PCL6 instead of 990c, if this process is used.  Link 
    Installation steps:
    1.  Completely remove any printer components that installed on the PC (check programs/features, device manager, etc.)
    2.  Download and save the full feature software from Here
    3.  Run disk clean up and disable unneccessary start up programs through MSConfig (see steps below if needed)
    3.  Reboot PC
    4.  Temporarily disable firewall
    5.  Run installation from fresh download with new USB cable (do not connect USB to device or PC until prompted by software)
    Selective startup in MSConfig:
    HP and I are not responsible for any changes made in system configuration
    1.  Click start button
    2.  Type MSConfig in search, double click to enter
    ***If Normal Startup is currently selected, follow these steps:
    Select Selective Startup, and then clear the Load Startup Items check box.
    Click the Services tab, and then select the Hide All Microsoft Services check box at the bottom of the screen.
    Click Disable All.
    ***If Selective Startup is currently selected, follow these steps:
    Click the Startup tab.
    Make a list of the items that are selected. You will need this list to reset your computer startup items later.
    Click the General tab.
    Clear the Load StartupItems check box.
    Click the Services tab, and then select the Hide All Microsoft Services check box at the bottom of the screen.
    Make a list of the items that are selected. You will need this list to rest your computer startup items later.
    Click Disable All.
    Click Apply.
    Click OK. A new window displays. Click Restart to continue.
    . Upon restarting your computer, the System Configuration Utility window displays.  
    Note: to return to normal startup or predefined selective startup, these will have to be re-enabled through MSConfig after installation completed. HP and I are not responsible for any changes made in system configuration.
    Hope this helps!
    Also, remember a click on the Kudos star to the left is a quick "Thanks" for a helpful post.
    Please select the "Accept as Solution" button on the post that best answers your question.
    I appreciate your input !
    Thank You,
    I work for HP.

  • Can't select paper types

    (Mac OSX 10.5.2, LR 1.3.1) Going crazy trying to figure this out. Somewhere around the time HP updated drivers for the Photosmart Pro B8350, I lost the ability to select anything but one paper type. As a result, none of my prints are coming out properly whereas they were perfect before. I've totally removed both the HP software and Lightroom, and started all over again. Bottom line is that only one paper type will show up in Lightroom when I select managed by application.
    When I click the profile drop-down menu from the main Print module, I'm presented with two choices: Premium Plus photo (tricolor+grey) and Premium Paper (tricolor+grey). I used to be able to select from a bunch of options. OK, so I use the third menu option, which is Other and gives me a list of profiles to appear in the custom profile popup. I see Advanced Photo Glossy, and check it.
    Now I can select it, but when I hit Print... and the printing dialog comes up and I double-check Paper Type/Quality, the only thing that shows is "Premium Plus Photo Paper" and all of the other options, including Advanced, are greyed-out.
    I do see that there seems to be some confusion/changes or something related to where printing components are installed. I see that in ~/user/library/colorsync/profiles, things from my previous color printer. The HP stuff all installed in /Library/Printers/hp/Profiles/Photosmart and /Library/Printers/hp/Profiles/business-inkjet
    Now that I look at it, the only profiles that sort match my printer name (HP PSPro B8300) are in the business-inkjet folder - NOT the photosmart folder. That doesn't seem right; this isn't a business inkjet printer, it's a photo printer.
    I put some screenshots here: http://web.mac.com/vincentdistefano/HP-Lightroom/printing_problems.html
    Is this a Lightroom problem? An HP problem? Mac? Very frustrating, as this used to work flawlessly. In fact my print dialogs still have all the nice presets I had set up before, but of course none of them work now.
    Any help greatly, greatly appreciated.

    Hi John, Thanks for the tip. I will try that next. Below is a crash log. I printed to the 2200 from Photoshop, then in the print dialog tried to go to "color management" to turn color management off (I am getting magenta prints due to double profiling).
    Before crash:
    11/22/07 2:20:22 PM Adobe Photoshop CS3[2548] * _NSAutoreleaseNoPool(): Object 0xb66c840 of class NSCFNumber autoreleased with no pool in place - just leaking
    Stack: (0x9631c178 0x9624a0f8 0x29d21c8 0x29d2864 0x29d1320 0x29d15bc 0x29d0cec 0x29d0b08 0xce4370 0xce4484 0xce55b8 0xce5db0 0x7f3490 0x7f54d8 0x8fb23c 0x2bd684 0x2bdb00 0x370c 0x3410)
    11/22/07 2:20:22 PM Adobe Photoshop CS3[2548] * _NSAutoreleaseNoPool(): Object 0xa832c50 of class NSCFNumber autoreleased with no pool in place - just leaking
    Stack: (0x9631c178 0x9624a0f8 0x29d2240 0x29d2864 0x29d1320 0x29d15bc 0x29d0cec 0x29d0b08 0xce4370 0xce4484 0xce55b8 0xce5db0 0x7f3490 0x7f54d8 0x8fb23c 0x2bd684 0x2bdb00 0x370c 0x3410)
    11/22/07 2:20:23 PM Adobe Photoshop CS3[2548] * _NSAutoreleaseNoPool(): Object 0xb68ceb0 of class NSCFNumber autoreleased with no pool in place - just leaking
    Stack: (0x9631c178 0x9624a0f8 0x29d2240 0x29d2864 0x29d1320 0x29d15bc 0x29d0cec 0x29d0b08 0xce4370 0xce4484 0xce55b8 0xce5db0 0x7f3490 0x7f54d8 0x8fb23c 0x2bd684 0x2bdb00 0x370c 0x3410)
    After crash:
    11/22/07 2:22:52 PM Adobe Crash Reporter[2601] Process Id:
    11/22/07 2:22:52 PM Adobe Crash Reporter[2601] 2548
    11/22/07 2:22:52 PM [0x0-0xeb0eb].com.adobe.Photoshop[2548] 2007-11-22 14:22:52.079 Adobe Crash Reporter[2601:10b] Process Id:
    11/22/07 2:22:52 PM [0x0-0xeb0eb].com.adobe.Photoshop[2548] 2007-11-22 14:22:52.081 Adobe Crash Reporter[2601:10b] 2548
    11/22/07 2:22:59 PM com.apple.launchd[223] ([0x0-0xeb0eb].com.adobe.Photoshop[2548]) Exited: Terminated

  • Rectangle constructor problem

    Ok, i've seen a couple posts on this in other threads, but it seemed like people were asking for you guys to complete their homework for them. This is an assignment calling for us to construct 2 rectangles, modify the second, then verify that the first remained unaltered. This is my main code here:
    public static void main(String[] args)
              // Creates object "rectangle A"
              Rectangle rectangleA = new Rectangle();
              // Tests rectangle A's components
              System.out.println("Rectangle A's componenets are as follows:");
              System.out.println("Height: " + rectangleA.getHeight());
              System.out.println("Width: " + rectangleA.getWidth());
              System.out.println("Color: " + rectangleA.getColor());
              // Creates object "rectangle B"
              Rectangle rectangleB = new Rectangle(2, 2, "Blue");
              // Tests rectangle B's components
              System.out.println('\n' + "Rectangle B's components are as follows:");
              System.out.println("Height: " + rectangleB.getHeight());
              System.out.println("Width: " + rectangleB.getWidth());
              System.out.println("Width: " + rectangleB.getColor());
              // Checks setComponent methods on rectangle B for functionality
              rectangleB.setHeight(3);
              rectangleB.setWidth(4);
              rectangleB.setColor("Azul");
              // Checks the changes to rectangle B
              System.out.println('\n' + "Rectangle B's new components are as follows:");
              System.out.println("Height: " + rectangleB.getHeight());
              System.out.println("Width: " + rectangleB.getWidth());
              System.out.println("Color: " + rectangleB.getColor());
              // Prints components of rectangle A to verify that it has remained unaltered
              System.out.println('\n' + "Rectangle A's components are still:");
              System.out.println("Height: " + rectangleA.getHeight());
              System.out.println("Width: " + rectangleA.getWidth());
              System.out.println("Color: " + rectangleA.getColor());
    }Here is the second class, including the completed (as correct as I could come haha) rectangle constructors and methods:
    public class Rectangle
         private double width = 1;
         private double height = 1;
         private static String color = "White";
         public Rectangle()
         public Rectangle(double width, double height, String color)
              this.width = width;
              this.height = height;
              this.color = color;
         public double getWidth()
              return width;
         public void setWidth(double width)
              this.width = width;
         public double getHeight()
              return height;
         public void setHeight(double height)
              this.height = height;
         public static String getColor()
              return color;
         public static void setColor(String color)
              Rectangle.color = color;
         public double findArea()
              return (this.getHeight() * this.getWidth());
    }We are supposed to use each rectangle constructor once, then use a series of print statements to check each method/constructor in the Rectangle class. I will add findArea to the main class later.
    So... my problem is that the second rectangle object's "color" property is messing with the first rectangle's color as well, when I run the program, rectangle A ends up with a color of "Azul" instead of "White."
    Any ideas?

    Ok, after reading the link, static is a class variable, meaning that it encompasses the whole class, and any alteration to it sticks. Any reference to it after that will return the new value, as it is supposed to. So, how can I temporarily change the color without reassigning it to the whole class? The instructor intentionally made it static, so I think he meant for us to try to work around that.
    Looking back at my code, I am, indeed, changing the variable itself, rather than a property of the current object. it seems to me the problem lies within this bit of code.
    public static void setColor(String color)
              Rectangle.color = color;
         }Message was edited by:
    mchenj

  • How to print the components in scrollpane

    hi there,
    can anyone tell me how to print the scrollpane components, i mean the headers & the main view of the component. i've a scrollpane with the following code and i want to print the components:
    JScrollPane pane = new JScrollPane(aTextPane);
    pane.setRowHeaderView(aLineNumberComponent);my requirement is i've a editor & lineno component as textpanes and added to scrollpane & when asked to print it should print the lineno component which resides in scrollpane's row header & the editor textpane which is the main view in the scrollpane. how can i achieve this?
    i'd would appreciate any suggestions & codes given.
    thanx in advance.

    After adding/removing components to/from a panel try:
    panel.revalidate();
    panel.repaint() // sometimes this is also needed, I'm
    not sure whyI'm not certain, but I think that panel.revalidate() implicitly calls repaint() only if something actually changed in the layout. If nothing changed, it sees no reason to repaint; hence, if something changed in appearance but not in layout, you have to repaint it yourself.
    Or something like that. I'm no expert. ;)

  • How can I Print a JPanel including all added Components?

    Hello dear saviours,
    I have a JPanel object which is responsible for displaying a Graph.
    I need to Print the Components of this JPanel as close to what they look like to the user as possible.
    I thought about casting the JPanel into an Image of some kind, but couldn't find anything but how to add am Image to a JPanel (God damned search engines :-).
    But wait, this gets more interesting!
    I need to have control over the scale of the Printed matterial.
    I want the option to choose between a single page and dividing the drawing the JPanel displays into Multiple-Pages.
    In both cases I need full details of all the data (Nodes, Arcs, Text describing the various Nodes and Arcs names or type, etc.).Keeping the sizes of all these components is also important (that means, I don't want the nodes to be tinny-winny and the Fonts to be twice as large as the nodes and so on...).
    Attached is the code of the PrintUtillity class I created as an API for printing the JPanel data:
    package ild;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.print.*;
    /** A simple utility class that lets you very simply print
    * an arbitrary component. Just pass the component to the
    * PrintUtilities.printComponent. The component you want to
    * print doesn't need a print method and doesn't have to
    * implement any interface or do anything special at all.
    * <P>
    * If you are going to be printing many times, it is marginally more
    * efficient to first do the following:
    * <PRE>
    * PrintUtilities printHelper = new PrintUtilities(theComponent);
    * </PRE>
    * then later do printHelper.print(). But this is a very tiny
    * difference, so in most cases just do the simpler
    * PrintUtilities.printComponent(componentToBePrinted).
    * 7/99 Marty Hall, http://www.apl.jhu.edu/~hall/java/
    * May be freely used or adapted.
    public class PrintUtilities implements Printable {
    private Component componentToBePrinted;
    public PrintUtilities(Component componentToBePrinted) {
    this.componentToBePrinted = componentToBePrinted;
    public static void printComponent(Component c) {
    new PrintUtilities(c).print();
    public void print() {
    PrinterJob printJob = PrinterJob.getPrinterJob();
    printJob.setPrintable(this);
    if (printJob.printDialog())
    try {
    printJob.print();
    } catch(PrinterException pe) {
    System.out.println("Error printing: " + pe);
    public int print(Graphics g, PageFormat pageFormat, int pageIndex) {
    if (pageIndex > 0) {
    return(NO_SUCH_PAGE);
    } else {
    Graphics2D g2d = (Graphics2D)g;
    // double scale = 2;
    // g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
    double scaleFactor = java.lang.Math.min((double)this.componentToBePrinted.getSize().width/(double)(pageFormat.getImageableWidth()),
    (double)this.componentToBePrinted.getSize().height/(double)(pageFormat.getImageableHeight()));
    g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
    g2d.scale(1.0/scaleFactor,1.0/scaleFactor);
    // disableDoubleBuffering(componentToBePrinted);
    componentToBePrinted.paint(g2d);
    enableDoubleBuffering(componentToBePrinted);
    return(PAGE_EXISTS);
    /** The speed and quality of printing suffers dramatically if
    * any of the containers have double buffering turned on.
    * So this turns if off globally.
    * @see enableDoubleBuffering
    public static void disableDoubleBuffering(Component c) {
    RepaintManager currentManager = RepaintManager.currentManager(c);
    currentManager.setDoubleBufferingEnabled(false);
    /** Re-enables double buffering globally. */
    public static void enableDoubleBuffering(Component c) {
    RepaintManager currentManager = RepaintManager.currentManager(c);
    currentManager.setDoubleBufferingEnabled(true);

    That's a nice utility, but my JPanel gets truncated when printed. Is there a way to print a JPanel in full.

  • MacBook 2006 w/Snow Leopard; HP B210 printer; print problem; error message: One or more components of the HP printing software are corrupted or missing. Reinstalled software but Mac will not cause printer to print.

    ? MacBook 2006 w/Snow Leopard; HP B210 printer; print problem; error message: "One or more components of the HP printing software are corrupted or missing..." Reinstalled software but Mac will not cause printer to print.  My MacBook Pro works fine with same wireless printer.

    Hi ArielAce , thanks for getting back to me!
    I would recommend downloading and running the HP Print and Scan Doctor.
    Please keep me posted!
    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!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

  • Problem with printing JFrame with several other components on it

    Hi,
    i am trying to print out a JFrame that contains other Swing and AWT components, such as JTables and menus etc.
    The problem is that the options that i select from the pageformat dialog, do not get set when the printing is taking place. As a result my jframe gets cut up into 4 differnet bits and each comes out on a seperate page. I cannot specify number of copies or size of paper either. Also once the ok button is pressed on the print dialogue, then the print dialogue comes back again and i have to press Ok, or Cancel to get rid of it. My code is below, please can someone suggest anything:
    ]public int print(Graphics g, PageFormat pf, int pi) throws PrinterException
    if (pi >= 1)
    return Printable.NO_SUCH_PAGE;
    Graphics2D g2 = (Graphics2D) g;
    g2.translate(pf.getImageableX(), pf.getImageableY());
    g2.setColor(Color.black);
    paint(g2);
    return Printable.PAGE_EXISTS;
    PrinterJob pjob = PrinterJob.getPrinterJob();
    PageFormat pf = pjob.defaultPage();
    pjob.setPrintable(TransponderGraph.this, pf);
    try
    pjob.print();
    catch (PrinterException e) { }

    Ok, try this.
    Change this:
    <link href="
    http://www.jonbarron.org/css/style.css"
    rel="stylesheet" type="text/css" />
    to this:
    <link href="
    http://www.jonbarron.org/css/style.css"
    rel="stylesheet" type="text/css" media="screen" />
    Somewhere in that stylesheet lies your problem.

Maybe you are looking for

  • How to map new field in DSO

    I have added a new field to the dso and i have replicated the datasource as well which is showing the new field newly added in ecc. how can i map the new keyfigure in the transformation between the datasource and ods. its showin in the ds, can u pls

  • Can I enable both a bluetooth audio device and digital-out port at the same time?

    Hi!  I just got a bluetooth speaker and want to use it at the same time as my audio-out port which drives speakers in another room.  In preferences, the iMac wants me to choose one or the other...  Is there a way to enable both at once? Thanks!

  • How to create a pdf file?

    Hi, I would like to know how to create a pdf file programatically using APIs. I have acrobat8 or acrobat9 sdk but there no dll in sdk. Do i need acrobat library? If yes then how to get the same?

  • Listing JSP site on search engines

    I am hoping that there are some methods to get dynamically JSP generated webpages listed on search engines. I know that there are issues when using a query string because of spiders avoiding the '?' Is there a mod_rewrite type of option that can be a

  • Mac mini with a minimate?

    Does anyone here using a MiniMate for their mini?? how is it? can i be able to install the OS and boot from the minimate using firewire? because my internal drive in the mini is dead thanks