Urgent- Printing JPanel problem

I want to print a JPanel by calling a Print utility class. JPanel is drawing with different shapes (Rectangle2D etc..)
The problem is that I can only print the first page of the JPanel.
My Print utility:
import java.awt.*;
import javax.swing.*;
import java.awt.print.*;
public class PrintUtilities {
private Component componentToBePrinted;
public static void printComponent(Component c) {
new PrintUtilities(c).print();
public PrintUtilities(Component componentToBePrinted) {
this.componentToBePrinted = componentToBePrinted;
public void print() {
PrinterJob printJob = PrinterJob.getPrinterJob();
BookComponentPrintable printable1 = new BookComponentPrintable(componentToBePrinted);
PageFormat pageFormat1 = printJob.pageDialog(printJob.defaultPage());
Book book = new Book();
book.append(printable1, pageFormat1);
// Print the Book.
printJob.setPageable(book);
if (printJob.printDialog())
try {
printJob.print();
} catch(PrinterException pe) {
System.out.println("Error printing: " + pe);
class BookComponentPrintable
implements Printable {
private Component mComponent;
public BookComponentPrintable(Component c) {
mComponent = c;
public int print(Graphics g, PageFormat pageFormat, int pageIndex) {
if (pageIndex > 0) {
return(NO_SUCH_PAGE);
else
Graphics2D g2 = (Graphics2D)g;
g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
mComponent.paint(g2);
return Printable.PAGE_EXISTS;
What did I do wrong? Thanks in advance !!!

Oh... it's just a mistake because of copy and paste.
I did also have these code (without if (pageIndex > 0) {
return(NO_SUCH_PAGE); ) but with these
/* calculate the no. of pages to print */
int totalNumPages = (int)Math.ceil((panelHeight) /
height );
if (pageIndex >= totalNumPages) return NO_SUCH_PAGE;
and when I use :
System.out.println("totalNumPages: " + String.valueOf(totalNumPages));
I can see at there are two pages. But when it prints it can only print one. So...

Similar Messages

  • Printing jpanel problem

    So I am trying to print a JPanel. When I print to a pdf after bringing up a page setup dialog and a print dialog, either one of two things is happening.
    1) all drawn lines are shifted down and to the right.
    or
    2) all text is shifted up and to the left.
    Everything on the screen of the program looks great. I think it might have something to do with the fact that I am deriving fonts by scaling them. This would not be a problem if everything was shifting. It is clear that when rendered to a pdf it is handling the text of the fonts that I am using somehow differently than all the lines I am drawing. I do not understand why this is happening. Everything looks so good on the screen.
    If anybody knows what this problem is, your help would be much appreciated.
    Thanks in advance!

    Oh... it's just a mistake because of copy and paste.
    I did also have these code (without if (pageIndex > 0) {
    return(NO_SUCH_PAGE); ) but with these
    /* calculate the no. of pages to print */
    int totalNumPages = (int)Math.ceil((panelHeight) /
    height );
    if (pageIndex >= totalNumPages) return NO_SUCH_PAGE;
    and when I use :
    System.out.println("totalNumPages: " + String.valueOf(totalNumPages));
    I can see at there are two pages. But when it prints it can only print one. So...

  • Resolution problem when printing JPanel with picture on bg

    Hellow!
    I have some problems with printing JPanel component. I have a picture drawn on the background of the JPanel and several buttons on it. The whole JPanel is about 1600x800px. When i print whole the component with the help of PDF virtual printer, component is printed larger than A4 list. It is strange for me because print resolution is 600 dpi, so whole component must be a rectangle with the size about 2.5x1.5 inches. When I scale the graphics before painting component to fit image to page (i mean ... {color:#ff0000}g2d.scale(sc,sc); panel.paintAll(g2d);{color} ...), the picture's quality becomes very bad.
    I understod it so: I draw the component on the paper in screen resolution, then I decrease image size, so quality also decreases.
    My question is: how to draw on the graphics of printing paper the component in printers resolution (600dpi), but not in screen resolution.

    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.

  • Printing Papers Problems with PDF

    Dear all memers,
    I would like you ask for help in urgent for the problems as below:
    I have one PDF document that contents 600,000 pages while I use printer to print all pages in document. My printer can print only 6,000 pages only.
    1. Does PDF file allows to print pages only 6000 pages?
    2. Please tell me the maximum pages that PDF can print.
    Best regards,
    Romeo Valera,

    PDF files have no set page limit. Since Acrobat 7, there has been no maximum size PDF file (in terms of byte count).
    Adobe's products that produce and/or process PDF files have no set page limit as far as we know either for PDF file creation, display, or print.
    What versions of Acrobat and Microsoft Word are you using?
         - Dov

  • New printer, new problems

    Hello world,
    We have recently changed our Sales Dpt. printer from HP5100 to HP4350. At this moment we have regret the same functionalities as in old one. Except one.
    We print a special form on tray 01 (110 mm x 210 mm in landscape) but in the new printer outputs displaced. I mean, it begin to prints like it would be printing in DIN A-4 page format, and when arrives to the paper size begining, we miss half formular.
    These are the test i've made:
    1) In output device, i've made a horizontal move of X mm. It displaced all my forms except this one.
    2) I've added spaces at the beginning of form to try to go down the rest of text.
    3) I've changed the form window size.
    4) I've modified printer settings in tray 01: paper size customized, client paper size, A-4, A-5, none, all.....
    5) I've marked to active tray 01.
    6) I have in INIT actions of PCL-5 the next parameter: e&L101A to custom paper.
    ¿Could it be printer driver problem?. I haven't more ideas....
    Thank you all of you from Spain.

    Hello again,
    I need one urgent solution. Sales dpt. is stopped in this function.
    The problem was that half of the sapform was displaced and the words are missing. It's the left zone (but like it's printed in landscape, reality it is the upper zone). My page format is 110 mm x 210 mm (landscape).
    It's like it begins to print in a 210 x 210 page format (for example).

  • Print JPanel GUI components cut off

    I saw some examples in this forum for printing JPanel GUI components.
    I scaled and double buffered but still have some problem.
    I have a JPanel that has a few component added (Another JPanel's) with GUI.
    How can I avoid a specific Component Cutting in the printing process and put it in the
    next page to be print?
    Thanks in advance,
    Lior

    I have been trying all day to find a solution but did not managed to do it.
    Is there another component (Not a JPanel) that I can add to it components and it is already defined
    for printing purposes ?
    Any othere idea ?
    Thanks,
    Lior.

  • Print Quality problems

    My print quality for Reds & Greens is coming out streaked. The blacks and blues are fine. I use HP ink cartridges anad keep them cleaned and aligned. But on the Alignment page the reds & greens are streaked and cannot be cognized. Could this be a print head problem ? 

    Hello novemberwolf,
    Welcome to the HP Forums.
    I see that you are having some printing issues when attempting to print in colour.
    Please click on the following link on Fixing Print Quality Problems for the HP Officejet Pro 8600 e-All-in-One Printer Series.
    If the troubleshooting does not help resolve your issue, I would then suggest calling HP's Technical Support to see about further options for you. If you are calling within North America, the number is 1-800-474-6836 and for all other regions, click here: click here.
    Thanks for your time.
    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

  • Print quality problems on Fuji Xerox printers when printing from ArchiCAD and/or Preview.

    Hello,
    We experience major print quality problems when printing directly from Graphisoft's ArchiCAD, Nemetscheks Vectorworks and from Apple's Preview.
    Basically we see various artefacts on our printed drawings, e.g. line thicknesses change and hatched patterns / fills are reproduced with patches where the lineweights and clours change completely... which is not acceptable.
    This affects the following Fuji Xerox printer models on both 10.6.x and 10.7.x with the latest FJX PPDs:
    ApeosPort C5540I
    Xerox LF6605 MF
    The workarounds for us are to either print PDFs from Adobe Acrobat Reader or via the rather dated Accxess Tools, besides that we prefer at times to print directly from a given Software it is also not always possible to generate a PDF and print it from Acrobat Reader... especially since the latest Adobe Reader update to its print dialogue makes printing from it extremely tedious - in fact we are considering going back to 9.5.2
    Obviously, we have approached FJX Tech Support and are awaiting a reply - however we are disappointed that this is happening on relatively new equipment and wonder if anybody else has already found a solution.

    The symptoms you mention could be related to the FJX engine and Acrobat is masking this fault. To test, you can create a Postscript file from the print dialog of ArchiCAD or VectorWorks and then download this to the Apeos RIP. If this produces the same result as when using the printer driver from the applications, then it would indicate that the engine is not capable of handling the data being sent to it from these applications.

  • Print Cartridge Problem: Tricolor - HP Officejet J4680 All In One

    I am seriously going to have an anxiety attack. I run a business from home & I HAVE to have a printer. I just spent $50 on new ink cartridges. My printer was working fine for the last week, and then tonight I have this error message:
    Print cartridge problem: [Tri Color] . Refer to device documentation to troubleshoot
    SO I reset the printer, shut it on and off, cleaned the cartridge and the printer, switched out the new cartridge with the old one ~ same problem. Over and over.
    I called HP and they said that since my printer is out of warranty they can't help me unless I purchase a new warranty plan. What horrible customer service. This printer is a product of HP and I should be able to get help regardless of when the warranty expired.
    This is so frustrating. If I can't get help, I think I would rather buy a new printer of a different brand instead of paying for a warranty after I just spent 50 bucks on ink. GRRR!

    The page here has troubleshooting steps that may resolve your issue.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Windows 8/8.1: Printer Offline Problems

    Windows 8/8.1: Printer Offline Problems
    Are you getting an error that your network or wireless printer is offline when you try to print?
    When you print to your network printer, does it fail, and when you check the printer status it says Offline?
    Do you have problems printing to your wireless printer after your PC has been asleep?
    If you answered YES to any of the above questions, then you have a problem with your network printer being offline.  After some investigation into this problem, we recommend updating windows.  Run Windows update to check that your version of Windows 8 is up to date.
    There are a few windows updates that may help with this problem
    1)    Install this Microsoft patch to make sure this private-public-private network issue does not reoccur. It is part of the April 2014 Windows Update package for Windows 8.1 and Server2012 R2 (http://support.microsoft.com/kb/2919355).
    2)      Install this Microsoft patch for the WSD service.  http://support.microsoft.com/kb/3000461
    If this does not help, then please follow the steps list below which will give you a Workaround that may help with this problem.
    Assign the printer a static IP address
    An IP address is an Internet network address that the computer can use to communicate with the printer. Enter a static IP address to make sure that the wireless connection remains stable. Follow these steps to assign the printer a static IP address.
    Get the printer IP address.
    Press the Wireless button on the printer control panel to view the network settings.
    Access the Network menu on the printer control panel.
    Print a Network Configuration Page or Wireless Test Report page.
    Once you have the printer's IP address, open a new web browser window or tab.
    Type the IP address in your web browser's address bar, and then press Enter.
    Make sure that you type the IP address into the browser's address box. If you type it into a tool bar search box, the EWS will not open.
    If the message 'There is a problem with this website's security certificate' appears in the web browser when you try to open the embedded web server (EWS), or when you navigate within the EWS, click ' Continue to this website (not recommended)'.
     note:
    Choosing 'Continue to this website (not recommended)' will not harm your computer while you navigate within the EWS for your printer. If you encounter this error outside of your printer's EWS, your computer could be at risk.
    If the browser fails to open the EWS after you click 'Continue to this website (not recommended)', refresh the browser window.
    The Embedded Web Server (EWS) for the printer opens and confirms that the printer is on the same network as the computer.
    In the EWS, click the Network tab.
    In the Wireless section, click the Network Address (IP) or IPv6 configuration, depending on your network setup.
    Click Manual IP, and then click Suggest a Manual IP Address. A manual IP address, Subnet Mask, and Default Gateway displays.
    After the manual IP address populates, click Manual DNS Server.
     note:
    Keep a record of the manual IP address for reference.
    On the Network Configuration Page you printed earlier, locate the DNS Server addresses, type the DNS addresses in the Manual Preferred DNS Server and Manual Alternate DNS Server fields, and then click Apply.
    If the DNS addresses are not listed on the Network Configuration Page, or if you have trouble accessing the network or Internet with the original DNS addresses, use one of the following methods to obtain DNS addresses.
    Method one: Use publicly available DNS server addresses
    Configure the printer using publicly available DNS server addresses. To find available DNS server addresses, search online for 'public DNS servers'.
    After you find public DNS server addresses, type the addresses in the Manual Preferred DNS Server and Manual Alternate DNS Server fields, and then click Apply.
    Method two: Get the network DNS information via your computer
    Select your operating system, and then use the following directions to obtain the DNS server addresses.
    Right-click the Start button () or the lower left corner of the screen, click Run, type cmd, and then press Enter.
    When the command window opens, type ipconfig /all, and then press Enter. Information about the computer's network displays.
    Scroll to and locate the DNS Server addresses.
    In the EWS, type the DNS addresses in the Manual Preferred DNS Server and Manual Alternate DNS Server fields, and then click Apply.
    Print a test page to make sure that the printer's IP address is the same as you assigned.
    Right-click the Start button () or the lower left corner of the screen, click Search, type HP and click your printer in the results. Click Utilities, and then click Update IP address to update the address in the software.
    Adding a Wireless Network Printer using Control Panel
    Go to Control Panel and choose Devices and Printers
    Click on Add Printer
    The PC will search the local network and display the network printers.
    Choose the printer and select Next
    The system will then try and auto select a compatible driver
    Select the current driver and Click Next
    The system will then ask for a name for the printer. The user can change the name and then click Next
    The User can then choose to share the printer
    The user can select to make this new printer the default and then click Finish.
    The new printer is now setup but this printer may be using the In OS driver (Class) rather than the HP Full Function driver.
    To change the printer to use the HP Full Function driver follow the following instructions. I would recommend changing the driver to the HP Full Function driver as the User can then use features such as Custom paper sizes.
    Go back into Control Panel and choose devices and Printers, right click on the newly created printer and choose Printer Properties
    Choose the Advanced Tab
    Click on the driver section drop down and choose the Driver for the printer that does not have the words Class driver after it.
    Click apply and then OK and the driver will be changed to the HP Full Function driver for the printer.
    The user should try this configuration and see if they still experience problems.
    Please Note:
    DO NOT Remove the Original Printer Icon from Devices and Printers as the HP Printer Assistant will stop working.
    JonW
    I work for HP

    I have the printer offline problem. It started when I ran out of toner. I have now installed a new toner cartridge.
    Your solution does not help me because I have tried to install Win8.1 and it failed.
    I would just reinstall my printer but I have a long list of items in my print queque and I don't want to lose them.
    Is there another solution? 
    Or is there a way I can save the print queue?
    Mike

  • Windows 7 - HP Laserjet 8500 print driver problem

    I have tried everything imaginable to correct this HP 8500n print driver problem with no success, please help!
    I cannot correct or get rid of a reoccurring “Incompatible Print Settings” error dialog box message that repeatedly states that “There are one or more conflicting settings. One of the settings is: Output Bin: Mailbox 1, Accessory Output Bin: Not Installed”. The radio button options are “Restore my previous settings or Keep this setting, and I will change it later”. This same dialog message repeats 13 times for all the other various conflicts each time you click on printer properties to change to 2 sided printing or any other printer settings. This printer does not have any of these features attached or set into it.
    I am a volunteer that manages a number of computers on our small church LAN, 2 computers operating on MS XP-SP3, 2 on MS Windows 7 Home Premium and my 2 problem computers that came pre-installed with Vista Home Premium of which I have performed an HP OEM upgrade to Window 7.
    I have isolated this print driver problem to the Vista operating system and even when computers are upgraded to Windows 7 does not correct this driver error. I have also tried every possible print driver variant of the HP 8500, HP8550, PCL, PS to include the Microsoft versus HP versions with no success. In each case I get this error yet neither of the XP computers or the computers that had Windows 7 as a original operating system have no problems with their print drivers for this printer.
    Yes, I have repeatedly searched and upgraded the operating system and print drivers. In desperation I have even tried to find the correctly behaving Windows 7 print driver and transfer it to these Vista upgraded to Windows 7 machines. However I could not isolate the driver location.
    The only thing I can conclude is that this errant HP print driver was resident within Vista and remains resident even after a HP OEM Windows 7 upgrade. Additionally, all of these computers are configured to access this printer via its static IP address on the network.  The XP computers are 32 bit, all of the Vista upgraded to Win 7 and OEM Win 7 computers are 64 bit machines all with respective OS. 
    Can anyone please help me correct this problem?

    Hi, 
    Unfortunately I can't see your uploaded image yet as it is awaiting approval from HP.
    From what I can see you are correct that HP does supply drivers for this printer and that the drivers for your printer are already included with Windows 7.  On the machines affected, try the procedure below to see if it helps at all
    Next download revo uninstaller on the link below and install it.
    http://www.revouninstaller.com/download-freeware-version.php
    Disconnect the printer from the PC.
    Run Revo and see if it finds any  HP Printer Software installed.  If it does, right click the software icon and select uninstall.  During the process you may be asked to delete registry entries.  If you are, just select all and click delete.  Do the same for any left over files and folders.  Once completed, reboot the PC.
    Re-connect your printer to the PC and follow the guide below.
    http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?&objectID=c02536257
    If this helps you will need to repeat the process on each of the affected machines.
    Best wishes,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Officejet Pro L7590 Print Quality Problems - Black/Yellow Printhead

    Officejt Pro L7590 All-In-One
    Running on Windows 7 64 bit, USB connected to computer
    Approx 2.5 yrs old; has printed 30,000 pages.
    Issue:  Black/Yellow printhead replaced about 500-1000 pages ago; new unit only tested as "Fair" in diagnostics, even though it was fresh outta the box.  Print Quality good.
    About two weeks ago, printer refused to print, flashing ambler "!", etc., error message regarding black/yellow printhead.
    Ordered replacement ($71 again -- ouch!  Whole printer only cost $199 30 months ago).Again, new unit only "fair" in diagnostic (original Cyan/Magenta printhead still reads as "good"). 
    New printhead required much cleaning and aligning, and now prints with large gaps on a regular basis down the page.  Talked to tech guy @ Staples where i bought it; his only "helpful" suggestion was that most people just toss the printers the first time the printheads go bad.
    Print heads are separately warranted.
    My questions:
    (1)  What else is there that's screwing up my print quality,a nd is it fixable?
    (2)  Can i get my $ back on the two printheads that didn't fix the printer's problems?

    I've included a link below to help you troubleshoot rpint quality issues...
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=bpu03037&tmp_task=solveCategory&lc=en&dlc=en&cc=...
    This document provides some system settings that may help fix the issue.
    Dave M.
    Say Thanks by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as Accepted Solution.
    I am an HP employee.

  • Printing quality problem with Photosmart D110

    The printing quality is very bad after we changed the catridge. The printer keeps saying that there is catridge jam. But after I followed the steps by the printer, the problem is still unsolved. What is the possible reason and how could I solve it?

    Hello RussellYang.
    Welcome to the HP Forums! I understand your concerns with your Photosmart D110A. Does this issue occur from multiple program(s) or just one program?
    Please follow this entire HP document on Continuous Pages of Strange or Garbled Characters Print in Windows.
    What is your operating system on your computer? Click here to find out: Windows.
    Have you tried using a different USB cord, to verify if the issue still occurs?
    Please inform me your troubleshooting steps.
    I worked on behalf of HP.

  • Deskjet 3520e all in one printer network problems

    Hi All.
    I have a brain teaser for the technical types out there hoping someone can shed some light on a weird sort of problem.
    History: All has been fine with my g6 Pavillion latop 64bit W8 and 3520e all in one printer and working as always very well.
    Oct 16th 2014 My broadband service went down and after many communictions with ISP eventualy received (Nov 4th) and installed a new "super hub modem".
    OK so far, Managed to connect laptop via wireless router and connect to internet etc., however . . . I cannot get my printer to network as before, I can use it via USB port but if I try to network it, The Cyan ink cartridge reports as being broken or damaged even though 3/4 full and will not allow printing, but when connect via USB port the Cyan ink cartridge registers normal and will print as expected.
    Has anyone else come across this problem?
    If I go down the route of uninstalling and reinstallin the Printer software is there a set order in which to do so?
    In the list of programs these four are shown. . 
    HP Deskjet 3520 series Basic Device Software
    HP Deskjet 3520 series Help
    HP Deskjet 3520 series Product Improvement Study
    HP Deskjet 3520 series Setup Guide.
    I would like very much to get back to network printing if at all possible.
    The router IP address is 192.168.1.3
    The printer IP address is 192.168.0.1
    I have been led to believe that as the addresses are so close this shouldnt be the cause.
    I must add that in the past I have had occasional printer software problems which I was unable to resolve without help from the technical centre and I would prefer not to restart the installation if at all possible.
    Your comments would be appreciated.
    Thanks in advance.
    Un1corn.

    Hi @Un1corn 
    What exactly happens when you try to convert from USB to Wireless and configure the printer to the Virgin Media Super Hub? Do you get an error message of some sort?
    Maybe there is a firewall on the Super Hub. Do you have the model number for this device? I can look up some information to see what could be casing the issue.
    In the meantime, running the Print and Scan Doctor might help. The HP Print and Scan Doctor is a free utility (tool) that helps to quickly resolve common printing, scanning and connectivity issues including but not limited to:
    Connectivity:
    USB: Verifies that the USB connection from your computer to the HP product is working correctly.
    Network: Verifies that the network connection between your computer and your network is working correctly.
    Device Status Test: Checks for device errors such as out of paper, paper jams, carriage stalls, and paper feed issues, and then provides instructions for fixing the error.
    Driver Check: Checks for missing or corrupt driver files.
    Device Manager: Checks for problems in Device Manager that would prevent printing.
    Device Online: Checks if the product has been paused or set to offline, and then sets the status back to online if necessary.
    Print Queue: Checks for and clears pending print jobs in the print queue (a log of print jobs waiting to print).
    Port Match: Checks the port settings for the HP product.
    Device Conflicts: Checks for conflicts with other drivers, such as other printer brands.
    Ink Issues: Checks the cartridges and ink levels for issues that affect print quality.
    Print Settings: Checks and adjusts the print quality settings.
    Test Print: Prints a test page for print quality evaluation, and provides options for cleaning and aligning the printhead if necessary.
    Scan Tests: Checks the scan mechanism, drivers, and registry entries.
    Source:Try the HP Print and Scan Doctor for Windows
    Click here to download and run the Print and Scan Doctor> www.hp.com/go/tools
    If that does not resolve the issue, post back and let me know if there are any symbols other than green check marks and what they are next to of course. The wrench is not always easy to spot as the wrench and the check mart are in the green circle.
    If you see only green check marks (), the tool did not find any problems.
    If you see green wrenches (), the utility identified an issue and corrected it automatically.
    If you see yellow exclamation points (), the test failed and required user action, but the step was skipped.
    If you see a red X (), follow the on-screen instructions to resolve the issue.
    I look forward to hearing back from you.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Print selection problem

    when i select a page to be print from my pc the page select in

    Hello. I feel your pain and frustration with the print selection problem in safari, especially in Snow Leopard. I have spent hours trawling help pages and forums etc. BUT YEE HAA (sorry got a bit excited, but it really was hours) I found the answer. So here goes.
    Click on Safari
    Scroll down to services then slide to right
    Scroll down to services preferences and click
    Scroll down to the Text section
    If you Tick the Text box it will choose all options for you. Or if you don't want all options in the Text list, then untick Text box and tick options you do want.
    BUT for your print selection problem make sure you tick NEW TEXT EDIT WINDOW CONTAINING SELECTION.
    Then when you want to select something in a web page you want to print (including pictures etc) then highlight it, then Right click. And low and behold, in the list is NEW TEXT EDIT WINDOW CONTAINING SELECTION. Click that, Then press cmd+p and your printing.
    I really hope that helps with your problem
    I can now go to sleep.

Maybe you are looking for