Can only print 1 page even do I have 2?

Am trying to print graphics that fills more than 1 page and even do am using Book class to be able print several pages I cant? This is how I try:
    public int print(Graphics g, PageFormat pf, int pageIndex)throws PrinterException
        shapes.print( (Graphics2D)g, this );
        return Printable.PAGE_EXISTS;
    public void startPrint()
        java.awt.print.PrinterJob job = java.awt.print.PrinterJob.getPrinterJob();
        java.awt.print.PageFormat pf = new java.awt.print.PageFormat();
        pf.setPaper(getPaper().getPaper());
        java.awt.print.Book bk = new java.awt.print.Book();
        bk.append(this, pf);
        job.setPageable(bk);
        if (job.printDialog())
            try
            { job.print(); }
            catch (Exception exc)
    }Can anyone plz help me with this?

Thx sabre150 thought the Book took care of everything
:-)Bummer eh!
>
Can U plz explain to me how I can define the number of
pages that my graphics should be broken into or do U
have a sample?
At the moment I am just printing graphics so I handle this with printing class that uses the PageFormat object to work out where to split a component. Since my components can be fairly large (50 pages or so) I have a kind of thumbnail sketch that shows the user how the component will be split. When I perform the print I put a border round each page with a title that shows the row and column that the page represents.
I'm not at liberty to release this code.
For printing text I would use one of the commercial packages - it is quite a difficult task.
I followed this sample :
http://java.sun.com/docs/books/tutorial/2d/printing/col
ection.html
But I cant see anywhere in it where the definition of
several page print is made?The example adds two components each one representing a page.

Similar Messages

  • I am trying to print all the PDF pages in a range of 5 pages but can only print one page at a time . . . It will print the current page, but not all or pages 1-5.  Can this be overcome?

    I am trying to print all the PDF pages in a range of 5 pages but can only print one page at a time . . . It will print the current page only, but not all or pages 1-5.  I need to go to the next subsequent page and command to print current page; continuing with this procedure until all pages are printed one at a time. Can this be overcome?

    You can use printPages(1, 5), however I need to know how you print current page.

  • I can only print 1 page can somebody help

    I can only print 1 page can somebody help
    sl

    I have the same problem with my HP C6380 MY8CJ880F6. For me it is +80% of what I am printing I only get 1 page and has to print the rest 1 by 1. The problem is 6 month old and I have tried almost everything except the right solution ;-}
    Setup Windows 7, 64 bit (Danish). Wireless communication.
    I have tried reinstalling, use HP diagnostics and a lot of other things. Diagnostics says everything is fine. Microsoft Fix It diagnostics says the same about the Windows 7 printer support functions.
    My other printer a HP Designjet 111 runs perfect. When I am out of office I use other printers no problems. But the HP C6380 will in most applications especially Acrobat Reader only print 1 page at a time.
    I have tried to change the printer into factory settings that sometimes do the trick for the Microsoft Office 10 products installed but not for Acrobat. Most of my documents are PDF so either i get the fixed or I will have to invest in another printer.
    Any body with a solution ?
    BR Erik

  • Can only print current page of a downloaded pdf via adobe reader

    I can only print current page of a downloaded pdf via adobe reader.  Any ideas?  I'd like to be able to print "All".

    You can use printPages(1, 5), however I need to know how you print current page.

  • Since updating to the new version the work web page that i use will only print 2 pages even if there are more. I can not get it to print all the pages in the document.

    for instance....I have a documents that has 6 pages, I can scroll down and see all the pages but when i hit the print button it will only print 2 pages. I tried to change it in the setting part but there is no feature that allows you to change it.

    For many years, Firefox has problems printing when some style rules are used. However, I am not aware of any changes for the worse in Fx4 (at least, until now I wasn't aware of any).
    A couple of thoughts:
    (1) Is it possible you were using an add-on in Fx3.6 that fixed this problem, but the add-on was disabled during the upgrade because it wasn't compatible? (Sometimes that can be fixed with a little hack.)
    (2) Are there any obvious settings differences that could be affecting printing, such as fonts, margins, or shrink-to-fit/percentage?
    (3) Does the workaround of selecting the entire page (Ctrl+a) and then choosing Selection under Print range in the Print dialog work? Unfortunately, this can slice through lines and images, but it often works around problems with style rules.
    In the interest of saving paper, it often is useful to experiment with a PDF printer driver. If you don't have pdfFactory, you can install a trial version for testing: it lets you view the results without first having to save the file. (If you save with the trial version, there is a footer to that effect.)
    (4) Is it an HTML5 problem? You can toggle the HTML5 parser off, but this is a global setting, not site-specific. If you are familiar with about:config, filter on html5 and double click '''html5.parser.enable''' to toggle its value from true to false. This helps for some sites, but has no effect on others.

  • Since upgrading to Mavericks I can only print one page of a multipage document.

    Ever since I upgraded to Mavericks my HP Deskjet 6840 color printer will only print 1 page from a multipage document at a time no matter how I set the job.  And sometimes it prints the same page even thought I set the parameters for a different page. I have the latest driver. I can't find any solution on the HP site or elsewhere on the internet.

    The driver should be part of OS X, not something you download.
    This link shows supported HP printers (6800 but no 6840).
    http://support.apple.com/kb/HT3669#HP
    I suggest you delete the printer, turn it off, restart your system, and turn the printer on and add it back in.
    Barry

  • Can only print one page

    Hi,
    I can only print the first page of my pdf files, i have tried from other workstations (there are about 15 on a domain) and they don't have an issue and i have also tried different printers.
    I get the first page ok then the second page is blank and the third page has the following:
    ERROR: undefined
    OFFENDING COMMAND: TKPSVK+ArialMT
    OPERAND STACK:
    false
    I have tried uninstalling and restarting then reinstalling but i still have the same problem.
    Any help would be greatly appreciated.
    Pablo.

    OK, here are a couple of ideas to try....
    Go to Help and try Detect and Repair.
    If you have Acrobat, you can try to distill the document or try a Save As
    [signature deleted]

  • Can only print one page to the Adobe PDF printer "device".

    When I print to the Adobe PDF printer device I can only print one document.  When I print a second document I get the message "Adobe PDF Creation cannot continue because Acrobat is not activated."  However, if I reboot, I can again print a single document. 
    I'm running Windows 7 pro-64 bit.  I have Adobe Acrobat X pro, version 10.1.7 installed AND ACTIVATED.
    Any suggestions for solving this damn headache would be much appreciated.  I'm sure tired of rebooting to print PDFs.
      George Sundell

    OK, here are a couple of ideas to try....
    Go to Help and try Detect and Repair.
    If you have Acrobat, you can try to distill the document or try a Save As
    [signature deleted]

  • Can only print one page at a time

    Using Adobe Reader 9.4.2
    Operating system Arch Linux
    Printer Brother DCP-115C
    When trying to print more than one page at a time in a PDF document,
    Adobe Reader appears to create the print
    the print job appears in my print queue
    the printer says 'Receiving Data', but only momentarily
    the printer resumes 'normal' status
    the printer does not print anything
    It is as if there is very little data actually sent to the printer, even though the print job appears to be 254k in size
    When I try to print one page at a time from a PDF document
    Adobe Reader appears to create the print
    the print job appears in my print queue
    the printer says 'Receiving Data' for several seconds
    the printer prints the page
    no problem
    It seems to me that Adobe is creating a print job (for multiple pages) that the printer either does not understand, or the printer believes that there is nothing to print.
    I am able to print everything that I need to, but only one page at a time!
    Does anyone else experience this problem? Do you know how to overcome this?

    You can use printPages(1, 5), however I need to know how you print current page.

  • With these changes I can only print a page the print preview capability has been taken away I use it all the time when wanting to print something from a website

    When I was in a website and I wanted to print a page there use to be in the upper left hand corner of my screen a tab that said 'FIREFOX', I could click on that tab and I had several options, one was 'print' and 'print preview'. I use the print preview button all the time to see what the page would look like when I was printing and how many pages there were. I could then choose to print all or some of an article and adjust it to what I wanted to print. I no longer have that tab in the upper right hand corner. Now in the upper right hand corner is a tab for 'open menu', however in that menu is only a 'print' button. There is no option for 'print preview' and therefore I cannot adjust what I want to print. I also could adjust the margins, etc. from a view tab, that too I cannot find. I really hope there options are still available and how do I find them, where are they located?

    In my updated firefox, the print button does NOT open print preview first.
    How can I access print preview function?

  • Can only print test page on new SL install, nothing from Word, IE, etc.

    I have a 2008 MBP w/ OS 10.6.2 installed, using an Epson Workforce 600 w/ Epson's latest drivers and installed everything going by their 10.6 FAQ install guide.
    So I go into the Epson printer software and I can successfully print a test page off that program. But when I try to print MS Office documents, a .pdf off Preview, a webpage off Firefox or IE, or any other program besides Epson's printer software, nothing will print. What happens is the print box comes up with my print options, and I click on the blue "Print" button, and it will flash light blue like it knows I clicked on it, but after that nothing, the print dialog box stays up and nothing changes.
    Any ideas on what I can do to get the rest of my applications printing properly? It ***** having to boot into Bootcamp just to print stuff.

    Hello DWillyams,
    Welcome to the HP Forums.
    I see that you are having an issue with connecting the printer to your new wireless router set up.
    I see that you have attempted several steps to get reconnected.  I do have a few additional steps we can try.
    On the printer, please go to the SetUp menu, followed by the Network menu.  Once in the Network menu, please go to the bottom of the list to the Restore Network Defaults option and select YES.
    Once the Restore Network Defaults has been done, please go back into the Network menu and select Wireless Setup Wizard.  Follow the steps in the Wizard and this should now connect to your router.
    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

  • Can only print half pages

    I am having printing issues with my Mac Book Pro. It will only print the top half of pages, and will not print the bottom half. PDFs however will print fine, but everything else doesn't print properly. Im printing on a Epson Stylus CX5000, using the Guten Print v5.2.3 driver. I have the same settings on my iMac which is printing fine.

    Try resetting the printing system (Control click on the printer list in Print & Fax), and re-adding the printer. If that does not work, try it with another user account.

  • 7110 can only print 1 page at a time of 8 page document

    I have a new officejet7110. when i send an multipage document (pdf or dwg) it prints the first page fine, then the subsequent pages are 3/4 printed and 1/4 blank. how to send a multipage doc to print all at once?
    This question was solved.
    View Solution.

    Hello MarinArchitect,
    Welcome to the HP Forums.
    I see that you are having a few printing issues.
    I would very much like to assist you with these issues however I will need to know some information before we can get to any troubleshooting steps.
    Is the printer connected to the computer with a USB cable, Wireless or Either net connection?
    Which Operating System you are running?
    Which Windows Operating System am I running?
    Mac OS X: How Do I Find Which Mac OS X Version Is on My Computer?
    What program are you attempting to use when printing?
    Have you attempted to do a multiple page copy and if so did you have the same results?
    Write me back when you have time and I will be more than happy to help.
    I do suggest that you please make sure that you have the printer power cable connected directly to a wall outlet and not a power bar/strip. Here is a document that uses a LaserJet printer as an example but it is meant for HP products in general. Please click on the following link that explains the Issues when Connected to an Uninterruptible Power Supply/Power Strip/Surge Protector.
    Hope to hear from you soon.
    Cheers,  
    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

  • Can only print 1st page of mulitple page document

    I know the fix for this but I was wondering if anyone figured out a way to deploy this.  My company has over 6000 computers and we are getting a ton of calls on this.   Please advise if anyone knows a way to deploy this or if there is a patch coming out for this.  We are running WINXP SP3, WIN2000, and windows vista.
    Thanks

    The driver should be part of OS X, not something you download.
    This link shows supported HP printers (6800 but no 6840).
    http://support.apple.com/kb/HT3669#HP
    I suggest you delete the printer, turn it off, restart your system, and turn the printer on and add it back in.
    Barry

  • Can only print one item at a time

    Hey everyone,
    Bit of a Photoshop novice here, use it for DVD covers and labels. I have been using CS3 previously but upgraded to CS5.5 last year. The thing is on CS5.5 I can only print one page at a time even when I input say 20 copies to be printed, only one will print. That goes for the regular printer for printing covers and the disc printer.
    I can open CS3 up and right away it will print however many I ask it to.
    Is there something I am missing? Something so painfully obvious that it is staring me in the face but I am just not seeing it?
    Thanks in advance!

    It isn't a printer setting. I have 3 different printers connected to my system and all of them worked with CS3 fine. And when I delete the preferences folder for CS5.1 it works as it should but only once, then afterwards it only prints one copy, no matter how many I ask it to print!
    So if it works when the preferences have been removed, then fails to work afterwards, how can that be a printer setting?
    I have read elsewhere that others have had similar issues with CS5 and Windows 7.

Maybe you are looking for

  • Best Practice for Designing Database Tables?

    Hi, I work at a company for tracking devices (GPS Devices). Our SQL Server database is designed to have a table for each device we sell, currently there is 2500 tables in our database and they all have the same columns they only differ in table name.

  • Changing description of a field in shopping cart form in SRM Portal

    Hi, We have a requirement to change the description/adding a note to one of the fields in Shopping cart creation form in the portal. In the SHOP page, when we click on describe requirement we have an option to choose the product type as Goods or Serv

  • Import Schema with tables resized

    I've created a new database and would like to import a schema from another database. I want everything from the schema I'm importing however I want to resize the tables. I was wondering what would be the best way to handle this. I can create the tabl

  • How to go about installing VM?

    Okay, it's look like we're going to get vSphere license for two processors. What are the steps to get my virtual servers installed on an HP DL380 G7 server? Any link to step by step instruction or video tutorial is appreciated. Thank you.

  • Audio makes my slide show too long

    This is my first time using Encore. I am trying add a simple slideshow onto my dvd but i am having problems when adding music. The slideshow lasts only a min but when i add the music the slideshow lasts for the whole of the song, even tho the picture