Multiple page printing!!! help needed

hi,
Another problem to solve. How the hell I can print multiple pages. If my frame is too large I want it to print on multiple pages. I tried different things but doesn't work. Please help me out in this too. I have included a small code currently it is prinitng one page only. But I need to print multiple pages if the display is too large to fit on one page.
sample code that I am using
PrinterJob printerJob = PrinterJob.getPrinterJob();
          //Calls painter to render the pages. The pages in the document to
          //be printed by this PrinterJob are rendered by the Printable object,
          //painter. The PageFormat for each page is the default page format.
          printerJob.setPrintable(this);
          //Presents a dialog to the user for changing the properties of the print job.
          if ( printerJob.printDialog() )
               try
                    //this print() method implements the Printable interface
                    printerJob.print();
               catch (Exception e)
                    e.printStackTrace();
public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException
     if (pageIndex >= 1)
          return Printable.NO_SUCH_PAGE;
     Graphics2D graphics2 = (Graphics2D) graphics;
     graphics2.translate(pageFormat.getImageableX(),
     pageFormat.getImageableY());
     //prints the selected frame only
     selectedFrame.paint(graphics2);
     return Printable.PAGE_EXISTS;
}

I used to ask similar question when I starting using Java printing APIs. Is is useless to ask such general questions.
There is no magic pill. There is no way your program knows how many pages to send to printer - you need to tell your program everything about it. Spend some time and do some research, you will figure out by yourself. Good luck.

Similar Messages

  • Light room 5.0 multiple pages printing issue

    I'm facing strange issue with multiple pages print from Light Room to Pixma Pro-10 using Canon IJ XPS driver. (OS Win 7)
    Every time when I want to print multiple pages, second and all others are shifted to green. It's also seen on Preview page - see below
    View: original size
    It's a print of two exactly same images (created by virtual copy in Lr) only difference is a printing order (seen on bottom left) if I swap  the printing order results is the same - second print is shifted.
    Even if I make 8 copies of the same image and print it - 4 per page (2x2 pattern) all images on the first page is ok and all on second page are shifted.
    I can'not imagine where should be a problem. Image is in sRGB color space. Color management managed by printer. Printing from other applications (tested with Irfan and ACDSee) seems to be OK.
    It's not a startup problem - I already print numerous images without issue - its should be faulty settings somewhere - but I'm not aware of any color related settings change.
    Disabling preview didn't help - second and next images are shifted
    Color management in LightRoom is set to Managed by printer - which gives excellent results (for the first image)
    Any other settings produces much worse images.

    Some thoughts that may or may not be of any help:
    1) To me the "green" image looks desaturated like a ProPhotoRGB image that is being printed with an sRGB profile.  All images in LR have internal color numbers that have ProPhotoRGB-sized colorspace but a different gamma, irrespective of what the source image had for its colorspace, so the way you have things set, I would assume that LR is sending raw ProPhotoRGB-like data and the printer is doing a conversion, but erroneously only for the first page, somehow, whereas any other program that prints is sending sRGB data and it works every time.
    2) What color management settings do you have set on the printer?  Are they some sort of Automatic color or have you set a specific color profile to match the paper?
    3)  What happens if you have LR manage the color with a paper-specific profile set in LR and set the printer not to manage color?  Does the first page print differently, then?  Create smallish-sized prints on each page so as not to waste ink.  This is the way I'd have LR and the printer setup, with LR doing the color-management and the printer not.  You haven't said how you have your printer settings, so something that could be happening is LR is expecting the printer to do the color-management and the printer is expecting LR to be doing it, so its not working right.
    4)  A first page printing differently than the others can be a setting in the printer, to handle a cover-page differently than the rest, because it has different paper.  I have no experience with your printer, but you might look to see if there is such a setting.
    5)  You haven’t said if you’re using any LR printing layout preset or not.  If so then try printing without having selected one or select a completely different, standard one, and see if the problem clears up.
    6)  LR will remember the last printer and printer-driver settings that you used, so if the driver is updated but LR is remembering settings for the previous driver, then things can get messed up.  You can try uninstalling and reinstalling the printer drive.  You can try installing another copy of the printer driver using a different name for the printer, that way LR’s saved settings shouldn’t be associated with that new name.
    7)  As a last resort, and only after reviewing various preferences you have set in LR, you can try to reset LR’s preferences, in case something is corrupted and causing problems.  The way to reset the preferences is to exit LR and rename the preferences file to something without an .agprefs extension, then restart LR.  If renaming doesn’t seem to be working, then move the .agprefs file to your desktop, temporarily.  You can delete the preferences file, but it’s safer to rename it or move it, in case it doesn’t fix the problem, then you can rename or move it back and have all your old preferences back, instead of recreating all the non-default settings.  The Preferences file location along with many other things, is documented here:
    http://members.lightroomqueen.com/Knowledgebase/Article/View/1373/205/lightroom-5-default- locations
    Finally, is there a reason you’re using LR 5.0 rather than one of the newer versions, in case 5.0 has a bug that has been fixed in subsequent versions?
    Various LR versions can be follow by clicking on the Windows/Mac link under Lightroom down near the bottom of the center column of the Adobe Updates page: http://www.adobe.com/downloads/updates

  • I am making a multiple page document and need some pages to be landscape and others to be portrait.  How can I do this?

    I am making a multiple page document and need some pages to be landscape and others to be portrait.  How can I do this?

    In pages you can only have one orientation of the Page. You have to rotate the content on the pages that you want horizontal. Save the document in Pages format so you'll have a original version to work on. Then Export to or Print to PDF and open the document in Preview. Here you can rotate the pages to horizontal viewing.

  • PDF Printing Help Needed

    I have a Windows pc only for 1 thing - printing pdfs. My problem is that Windows printer drivers allow me to have auto select paper size/tray depending on if the pdf page is standard or legal. I have not yet found anyway to do this through the mac.
    I have a Brother HD-5370 laser printer and need some assistance with the paper auto select. If any one has any suggestions or an actual fix, I am all eras.
    Thank You,
    Dan

    Dan231,
    Welcome to Apple Discussions.
    We are willing to help however we need you to complete your Public Profile (look to your right) so we can tell what computer you have, the version of OS X, how much RAM etc. Also letting us know where you are located could help in future posts.
    Most printing issues are handled in the Printing forums. Each version of OS X has it's own printing forum. For example if you use Snow Leopard (10.6) then that forum is located at:
    http://discussions.apple.com/forum.jspa?forumID=1344
    However let me try and take a stab at your problem. I am guessing you are using Preview to print the PDFs so let's start there. When you print (Command-P) the printing box will appear, look under the Orientation and right below that it will probably default to Preview. Click that radio and choose paper handling to see if your printer offers more choices. You can also run Software Update to see if you have the most up-to-date drivers and retry.
    Hope this starts to give you some direction.
    Roger

  • Printing Problem - Incomplete multiple page print job - until paper runs out

    I'm on Mac OS 10.9.3 printing to a Samsung CLX-6250FX. This is a network printer used by all the Apple/Window computers in this office.
    I am having terrible problems recently with printing multiple page documents - excel, word, email, pdf etc. I am spending a fortune in paper and printer cartridges.
    The print job does not complete and the last page printed, the following message prints:
    ERROR: syntaxerror
    OFFENDING COMMAND: true        cvt      Tfpgm     nglyf      '   ^  head
    STACK:
    -mark-
    /sfnts
    Then the same printer job restarts and fails at the same point until the printer tray runs out of paper (unless the print job is aborted and/or the printer is turned off and turned on again)!!
    The specific error message displayed by the printer software is either "Remote host did not accept data file (32)" or "Remote host did not accept data file (105)".
    I haven't seen any pattern whatsoever in terms of application used.
    I have deleted the printer and reloaded the driver from the disk supplied with the printer. I have checked to see that I am running the most recent driver.
    I've already reset the printing system, but that didn't fix it.
    I have seen this problem on various support communities pages, but for different printers.
    I have yet to see a solution - Any other recommendations please?

    The error message you see printed is a Postscript error. With your printer, postscript (normal output type from applications) is converted to the printer's page description language before being sent to the printer. So, I believe the problem is in some part of the driver software.
    For first step, I would try restarting from the Recovery partition and repair the hard drive using Disk Utility. You can repair permission, too. This is trying to correct a corrupted file.
    http://support.apple.com/kb/ht4718
    (just read the first paragraph)
    If that doesn't fix it, I would try downloading and installing the latest driver for the printer.
    Come back for more if that still doesn't work.

  • Wireless printing help needed

    How do I print wireless to my hp office pro 8500 from my I pad mini, help needed please

    use the hp eprint app. For more details, see: http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&docname=c01619067#N52

  • Problem in multiple page printed (SAP Script )

    Hi Experts ,
    In SAP Script print ,
    First page print is perfect on preprinted stationary ,but
    Second page data is getting printed 2-3 cm up.
    Please tell me various reason for this ...
    Thanks
    Sonal

    Hi Sonal ,
    This happens with your predefined stationary .
    Are you declaring it in the same window where your declaring your data ?
    If yes, Try taking another variable window and keep all your predefined sationary there and then call it evry time you call your window with data .
    Or, It can be with the Text element try giving 2 empty lines before the text element it solves your problem!
    Hope it helps!
    Much Regards,
    Amuktha .
    Edited by: Amuktha Naraparaju on Feb 9, 2009 9:57 AM

  • Turn off multiple page print - Adobe 11.0.4

    Hi:
    After printing multiple pages on one sheet of paper I am not able to find how to revert back to printing a single page on one sheet other than entering 1 by 1 next to custom. Any suggestions?

    Hi Dave,
    OK I’ve downloaded your  file and installed. The option Remove Security appears under the Encrypt action only if I have a file open and it will indeed remove the pw from that file and allow me to save back to the same file name. However I don’t see an option to add multiple files to the action, and if no file is open, the action is dimmed out. This is my last hurdle to getting this job done; can you point me in the right direction?
    Gail

  • Multiple page print dialogue / warning

    Good day!
    I'm working on a 50-page form in which the user only needs to print a few pages at a time.  Numerous times we forget to select which pages in the print dialogue and end up sprinting to the printer and mashing the cancel button.  Possible solutions:
    When user clicks the Print button on the form, a dialogue appears asking which pages user wants to print.
    When user does not select specific pages to print, a warning appears asking, "Are you SURE you want to waste a ream of paper?"
    In the form's table of contents (on the first page) have check boxes next to each page name, so user can select the pages that will print.
    I am a cut and paste Javascripter at this point.  Thanks for reading and for any help you are able to provide.
    Cheers~!
    Software:  Adobe Acrobat XI Pro

    But
    For I As Integer = 0 to DataGridview1.RowCount - 1
    is the iteration of DataGridView1's data
    if i use 
    For I As Integer = panjang To DataGridView1.RowCount -1
    The result could not retrieve all the data from DataGridView1
    panjang is use for indicator for if it reach some number, generates new pages

  • Smartforms Multiple Page Printing

    Hi Guys,
    I know this could be regular posting from others but it seems that i can't any solutions around.
    The Problem is about printing multiple copies from Billing Document at a time. What user requested was to have the word "Original" in the first copy and the subsequent copies will have the word "COPY". i know that this can be done in SAPScript by modifying the print program but how about Smartforms???
    I tried NAST (IS_NAST) table as passed by smartform but the field ANZAL seemed to return '2' when i need 2 copies. How do i know when is printing the first copy and when is printing the subsequent copies? any status from any tables indicating i am printing the first or the subsequent copies? Tried NACH but it didn't help much neither....
    Please help!!!!!! Thanks a lot....
    Cheers,
    Andrew

    Ok,
    so  transaction SMARTFORMS
    set the name, press CHANGE
    Select Form Interface (in the tree)
    You are in the Import parameter, you have to create one import parameter. Choose a name for example WV_TYPE, with assignment TYPE and reference CHAR1.
    After this just generate the function module.
    And now, when you will show the new function module you have the WV_TYPE parameter that is present.
    So, in the Text_Element or anything else you just have to set in the Conditions the test  WV_TYPE = 'X'   to display this Text_Element
    I hope it's clear (sorry for my english)
    Frederic

  • Detail page navigation help needed

    I am running 9iAS 9.0.2 and have a MD Form that displays 10 detial records at a time. I need to develop functionality to allow my users to move between detail pages without having to click "Next","Next","Next",etc....
    I was thinking of using the functionality of the onDetailNext procedure as part of the return value in a combobox LOV for the detail pages, but I don't know what to set the variables to, or if this is even possible.
    My code outline right now is. THis does a simple next. I don't know how to set it to jump to the 3rd or 4th page etc.
    BEGIN
    onDetailNext(
    p_block_name => null,
    p_object_name => null,
    p_instance => null,
    p_event_type => null,
    p_user_args => null,
    p_session => p_session
    END;
    Help on this, or info on a better way to do this would be great.

    As of now, there aren't any simple ways to jump to the nth page. You will have to do a lot of coding yourself.
    Please see the form's package body to get an idea how form's paginate between multiple records.

  • Printer Help Needed

    I have a MBPro 17 running osx10.4.8. I have a home network which I utilize multiple printers. I am having trouble with the driver for my kyocera mita FS-9100DN. I have gone to the mfr's website and downloaded the osx104.sit file which is explained to be the driver for the printer for OSX. When I try to open the file to execute the installer for the driver, I get a message stating that there is no program designated to open the file. I am new to mac's, and I really need some help here. Anyone that can give me a hand would be greatly appreciated. Thanks.

    Hey, Greg, I had a similar situation downloading an update for Quicken 2007 for Mac; the update was a ".sit" file and hence requires Stuffit Expander. Is Stuffit Expander a good program for the new Intel Macs? I have a MacBook Pro 17" with the 2.16 Ghz Intel chip. For some reason I feel a little hesitant to download and install the Stuffit app. What's the current experience with this app?
    Thanks & God Bless!
    Rick

  • Printing help needed quickly

    I am trying to print out football tickets I purchased thru stubhub. In my e-mail I recieved a link to download the tickets. I can see the page needed to print showing my ticket.When I hit the print icon a box opens and says This document could not be printed.I hit ok. Then a second box opens and says There were no pages selected to print. I went back to try again and after hitting the printer icon I see under pages 1 was selected but I was unable to access it or change it. I need to download these tickets soon...Thank you for help resolving this issue...

    What printer? What driver? What OS and Reader version?
    Can you try to print as image?
    The option is present under Advanced options in the print dialog.
    Sometimes if you remove the printer driver and re-install it, you can
    then print the pdf.

  • Multiple Page Print using e.HasMorePages [VB 2010 Express]

    What I want to do is to print all data from DataGridView1, when it reach the bottom of the page (i use variable panjang to compare), it will generate new page and then continue print the page from the DataGridView1 iteration.
    From My Code, it generates unlimited pages(loading pages forever), when I cancel it, all the page is same (print from the first row until the vairable panjang end it)
    Dim p As Pen
    p = New Pen(Brushes.Black, 2.5)
    For i As Integer = 0 To DataGridView1.RowCount - 1 Step 1
    For ic As Integer = 0 To DataGridView1.ColumnCount - 1 Step 1
    e.Graphics.FillRectangle(Brushes.DarkGray, New Rectangle(lebar, panjang, DataGridView1.Columns(ic).Width, DataGridView1.Rows(i).Height))
    e.Graphics.DrawRectangle(p, New Rectangle(lebar, panjang, DataGridView1.Columns(ic).Width, DataGridView1.Rows(i).Height))
    hasil = DataGridView1.Rows(i).Cells(ic).FormattedValue.ToString
    e.Graphics.DrawString(hasil, font2, Brushes.Black, lebar + 0.12, panjang + 0.12)
    lebar = lebar + DataGridView1.Columns(ic).Width
    Next ic
    panjang = panjang + 20
    lebar = 20
    If (panjang = 800) Then
    e.HasMorePages = True
    panjang = 40
    lebar = 20
    Exit Sub
    End If
    Next i
    e.HasMorePages = False
    Please help me, thanks...

    But
    For I As Integer = 0 to DataGridview1.RowCount - 1
    is the iteration of DataGridView1's data
    if i use 
    For I As Integer = panjang To DataGridView1.RowCount -1
    The result could not retrieve all the data from DataGridView1
    panjang is use for indicator for if it reach some number, generates new pages

  • Printer help needed from the Apple community

    Hello Apple Community,
    Can you help me to print from a new Mac to an old Canon printer?
    I'm here in Vietnam (first time in Asia) as a teacher. I have the latest model MBP (running Mac OS X 10.8.4). There's an old Canon that I'm trying to print to. I've Google'd the model number but nothing comes up for Mac. There are sites in the Google search that say they have the software. I'm worried they might be malware sites.
    On the back of the printer it says L11121E. But when I connect it (via USB) and open Print & Scan it detects it as a Canon LBP2900.
    I looked here: http://support.apple.com/kb/HT4670 and here: http://support.apple.com/kb/HT4670.
    But neither of those links list the Canon L11121E or LBP2900.
    When I Google'd "L11121E mac driver" this link came up:
    http://support.apple.com/kb/DL899
    Do you think that would work?
    I checked for updates from the App Store (and System Preferences Print & Scan) with the USB cable of the printer plugged in. Nothing came back.
    I'm a teacher trying to print material for my students. Any help at all would be appreciated.
    Confused,
    .Sean

    Thank you, Linc!
    Following the instructions from AlexeyU (thread: https://discussions.apple.com/message/15765876#15765876) worked!
    AlexeyU's instructions:
    "Try this:
    1) Download & Install official drivers for Lion v3.36 – http://support-au.canon.com.au/contents/AU/EN/0100359005.html
    2) Download & Install this package –http://www.uzhva.com/temp/Canon_LBP3000_to_LBP2900_patcher.zip
    3) Reboot
    You probably will need to manually match your printer with LBP 2900 driver from drivers list."

Maybe you are looking for

  • HT1926 ITunes 11 install issue, Error 7 (Windows error 126)

    While trying to install ITunes11 on a Windows Desktop with MS XP SP3 I keep getting an error message that states "ITunes was not installed correctly.Please reinstall ITunes.Error 7(Windows error 126)".There is an initial message that states that "App

  • Panic, Crash when using Exposé. Any fixes?

    ok I've tried to search around but I cannot find a similar problem. Basically my computer will crash (ie go completly off) randomly when I use exposé. Expose is definetly the trigger point but not sure if its the cause. It happens randomly. I can be

  • Unable to Use License Key

    Hi   I downloaded Sneak Preview SAP NetWeaver 04s - Full ABAP Edition with Web Dynpro for ABAP.   I am able to set up the same and i am able to logon to the NSP system.   But when i am trying to use my license key which i got from SDN it is saying th

  • SELECTION-SCREEN PUSHBUTTON 0(20) name USER-COMMAND FILE.

    Hi, I'm trying to put a button on a selection-screen! I'd like this button to be Icon + text! Text is ook, how do I add an icon ? regards,

  • Report - header columns(Heading) unscrollable

    HI 1 I have a report in list display. which has the header with headings of the report and under which the report follows i.e , in header , material , plant , item,net price ect is mentioned and the detaisl about it follows under it. Now when I scrol