Avoiding PrinterJob to print two or more times a page...

Hi all,
I'm using jdk 1.4 and I have noticed that the PrinterJob prints a page two times, then I have also discovered the reason:
taken from http://java.sun.com/products/java-media/2D/reference/faqs/index.html#Q_What_are_the_causes_of_large_s:
Q: When printing using java.awt.PrinterJob, why does it print each page at least twice (and sometimes much more than that)?
A: The root of this is that Java 2D printing needs to be able to print everything that Java 2D can render to the screen, and that includes translucent colours, images etc which cannot always be printed directly in Postscript or GDI except when printing everything as one big image, so the implementation tries to avoid this by calling first to discover the rendering that needs to be done for the page. If its simple opaque rendering then only one more call is needed to render the page. If there are translucent colours then multiple calls are done for "bands" down the page to limit the size of the image being generated and hence constrain peak memory usage.
My question is: is there an alternative way to print a page avoiding calling the print method two or more times?
Thank you very much, best regards.
Raffaele

Hi all,
I'm the same person as gamby1980 and I'm yet (from 2006 :-) ) waiting for an answer...
Does someone know a mechanism to force the printing system to call print method two times? I'm pretty sure that I haven't "translucent color" in the pages I want to print, and so I don't need the second step in printing...
Thanks again!
Regards
Raffaele

Similar Messages

  • Problem-Solution: Help! I'm seeing my iCloud account two or more times in Notes and Contacts!

    Problem: Help! I’m seeing my iCloud account two or more times in Notes and Contacts!
    Solution:
    Open [System Preferences] >
    Open [iCloud] >
    Uncheck [Contacts] for each duplicate iCloud you see in Contacts. ex. My iCloud Account is listed three times = uncheck Contacts twice. The checkbox next to Contacts will fill back in again automatically.
    Uncheck [Notes] for each duplicate iCloud account you see in Notes. (same instructions for Contacts; repeat the steps for each duplicate account)
    Why is this happening?
    It has to do with iCloud Keychain. If you set up iCloud keychain on more than one Mac, it appears to duplicate the iCloud account in each respective application once per Mac. (ex. 2 Macs = 1 Duplicate). The good news is that the above fix appears to be permanent and does not reoccur.

    Minor addition:
    I’m setting up a new Mac—how can I avoid this?
    Turn on iCloud in System Preferences (SP)
    When asked if you wish to set up Mail, Contacts, Calendar, Find my Mac, et al., uncheck all boxes, and click Next.
    Check the “Keychain” box first, then check all other boxes except Contacts and Notes.
    Within a few minutes, these boxes will check themselves.

  • Billing Comparison on quantities when two or more time slice in bill doc.

    I our project for commercial customer consumption history of past six years is normalized to create a monthly consumption base line (calendar months) this base line is maintained as installation fact and while billing execution this is used to calculate billing  base line
    E.g
    Jan consumption base line u2013 100000 KWH
    Feb Consumption base line u2013 90000 KWH
    Billing period is 15 Jan u2013 15 Feb
    Billing base line is calculated by prorating Jan and Feb consumption base line
    ((100000/31) X 17 ) + (( 90000/28) X 15) = 103053
    Periodic consumption is compared with billing base line and if
    A. Consumption is more than billing base line
          Excess consumption is billed to produce debit $ amount in bill doc
    E.g Billing base line 103053,     Periodic consumption 110000
    Excess consumption = 110000 u2013 103053 = 6947 KWH
    6947 X price = Debit $ amount
    B. Consumption is less than billing base line
    Difference between billing base line and consumption is billed to produce credit $ amount in bill doc
    E.g Billing base line 103053,     Periodic consumption 90000
    Difference = 103053 - 90000 = 13053 KWH  
    13053 X ( -Price) = Credit $ amount
    Comparison between Billing base line and Consumption is done using standard variant IF01
    The problem occurs when bill document has two or more time slice due to price change or change in facts like factor at rate category facts. If  for one time slice consumption is more than billing base line and for other time slice consumption is less than billing base line.
    Variant IF01 does not take into account time slice but it compares quantities considering whole billing period.
    E.G Billing period is 25 Jan u2013 25 Feb
    Price changes on 20 Feb
    Billing base line 25 Jan to 19 Feb u2013 50000
                                20 Feb to 25 Feb u2013 20000
    Billing base line for complete billing period 50000 + 20000 = 70000
    Consumption  (prorated by SAP)     25 Jan to 19 Feb u2013 56000
                                                              20 Feb to 25 Feb u2013 18000
    Total consumption for billing period 56000 + 18000 = 74000
    Consumption is more than billing base line for 25 Jan to 19 Feb time period and consumption is less than billing base line for 20 Feb to 25 Feb time period  but since for complete billing period consumption (74000)is more than billing base line (70000) and this comparison is done by IF01. Control in schema flows to rate which calculate the Debit $ amount for both the time slice which results incorrect calculation of bill amount
    Has anybody encountered similar scenario before. Is there a way out so that individual comparison is carried out for each time slice to pass control to correct rate in schema.
    Thanks
    Amit

    Hi,
    You can use variant quanti02 to determine the difference between the periodic consumption and base consuption.
    first, you calculate the positive difference only ( periodic consumption - base period) by selecting variant control  2  - Negative differences are not updated. You store this into a new QUANT operand called QPLUSDIFF
    then you do the same quanti02 to determine the negative difference, but first you detemine it as positive difference between base consumption and periodic consumption) and multiply the result with factor -1 with quanti09 and store it into a new QUANT operand called QNEGDIFF
    Then you have your negative and positive differences and you can bill them with the corresponding prices in subsequent steps.
    Hope this helps,
    Daniel Toba
    http://www.sap-isu.net

  • Is it possible to have an application open two or more times on a my Mac

    (ie MYOB)? My mac is Mac OS X ver 10.5.8. Its not possible to open more than one file at a time with MYOB unless you open the application again. This is possible with windows, but I am finding it a bit difficult with Mac. Any help with this matter would be deeply appreciated.
    Bec

    Perhaps,
    Install the application again, in a different location. This will give you two application icons to run. This used to work in older Mac OS's.

  • Can I print two ore more PDF files together (parallel)?

    Hello,
    I am receiving listings with a source code in PDF files. These source codes have errors and I must find and correct it. I need to print several source codes (PDF files) in one printer page /parallel/ for facilitation. Can somebody help me to do that?
    Regards,
    Hristo Markov
    Software development - http://www.markovandmarkov.com | http://www.cargofreightexchange.com

    Reader doesn't have any combining features.

  • Printing PDFs with more than one page size

    A large client sent me a PDF of mostly usLetter-sized pages, but with some in-line 11 x 17" pages he intended to Z-fold. I was able to vary the size of the bounding box within the Windows drivers by selecting "Choose Paper Source by PDF page size". That way I would eliminate the vast white spaces created by putting letter-sized images within an 11 x 17" bounding box, or alternatively, shrinking or masking 11 x 17" images to fit a letter-sized bounding box. With the advanced settings of our printer's drivers, I was able to program the two paper sizes into the print job.
    I can't seem to find a control like "Choose Paper Source by PDF page size" in my Mac OS X v. 10.4 (or 10.5) drivers. Are they absent or am I?

    Mike, it's a production run with lots of copies and lots of pages per copy, so it'd be too labor intensive to be cost effective if there's a high-tech way of doing it.
    That way is to put it on a Windows workstation to gain access to the "Choose Paper Source by PDF page size" control that the MS drivers offer. This sets the bounding box rather than the paper as the interface mistakenly indicates.
    Then use the PCL drivers because of the way Microsoft's PS drivers position the images.
    Make sure to set your letter-sized body pages to 2-sided and, if you can, your Ledger-sized pages to 2-sided, flip on short edge.
    Again, it's a shame that the Adobe/Apple interface doesn't offer the same ability that the Adobe/MS interface offers.

  • How to Print Html Document (more than one page)

    I've a problem with printing my html page. I can print one page of html file, But my document is longer than one page. and i can't print it.
    who know how to print . Please Reply

    A recent article in JavaPro has a nice solution for this problem. Check out
    http://www.fawcette.com/javapro/2002_12/online/print_kgauthier_12_10_02/
    It describes a way of using Views to break down the pages.

  • Printing two lines of text in Print Module

    Is it possible to print two, or more lines of text, say on a contact sheet, such as filename and caption. If so, how?

    Lightroom automatically wraps text under the thumbnail in contact sheets. The Text Template Editor does not allow you to enter line breaks. So, if your Filename is long enough to fill the first line, the caption will start with the second. If not, you can tweak the template somehow so that it looks the way you want.

  • Smartform - HCM - Print two paychecks/remuneration by page

    Hi.
    SAP ECC 6.0.
    I need to develop a Zsmartform to print two documents (front/back) per page (landscape). The client needs it in SAP because they already have the same functionality in legacy system and want it same way in SAP.
    I thought to solve it by creating a smartform with two pages (one to print front and other to print back) in landscape.
    To the first (front/landscape) page, creating two equal windows (side by side) with same size and structures type. To do this, I use a rotine/form (inside smartform windows) to read exact employee data to each window, but program calls smartform sending two employee data using the same mixed in the strutcture.
    E.g.:
    PAGE1: Employee1 and Employee2 front.
    PAGE2: Employee1 and Employee2 back (each back match with its correct employee).
    I guess it's quite complex, but is it possible ?
    thanks.
    Glauco
    Edited by: Glauco Kubrusly on May 6, 2011 4:47 PM

    Hi Glauco,
    Kindly set the print mode = d(duplex printing). the overflow data from 1st page will flow to next page, i.e. back page.
    Hope this info is sufficient to solve ur issue.
    BR,
    Vinit

  • Duplex printing of multiple copies of single page

    I really like that the settings for printing are retained so you can leave it set to duplex rather than having to select it each time. Although I do get caught with not resetting the number of copies on occasion. I do a lot of printing and like to conserve paper.
    The problem is when duplex is set and I print multiple copies of a single page, it prints on both sides of the paper. When printing two copies I get one page printed on two sides instead of two pages printed on one side.
    I know the easy answer is reset the duplex setting. But it should print correctly regardless. Has anyone had this problem and found how to deal with it other than resetting duplex?

    If these settings are in the printer driver (which they most likely are) then you'd have to contact the driver manufacturer. Perhaps there are multiple "double-sided" settings. For instance, if there is "duplex" as one option and "two-sided" as another option in the driver, then perhaps one indicates all copies will be printed double-sided even on the same page (as you're experiencing), whereas the other would print multiple two-sided copies. This, however, is very driver-dependent behavior. I'd recommend checking to see if there's an update available for your printer driver that might either clear the problem or provide a clearer option setting for the print jobs.

  • How can I print a booklet where each pdf page is vertically placed on each half page instead of one pdf on each booklet page?

    I've printed a booklet before but each pdf page had two powerpoint slides on each pdf file.  This binder has one powerpoint slide on each pdf page and if I try to print it as a binder, each pdf page takes up the whole half-page on the booklet.  I want to print two pdf slides on each page of the booklet so when I open the booklet, there are four powerpoint slides printed.  So I basically want to combine the ability to print multiple slides per page but in a booklet form.

    Why not reconstruct the pages in InDesign they way you want the double pages to appear. There may even be an imposition script available that will do the trick. You could then output to pdf all the pages you want the full spread on. Leave the original to create the pages you wanted left as is.
    You can ask in the ID forum about an imposition script. I know there was one with CS4, there may have been one with CS3.

  • What's a good app to use to put two photos on a single page like Windows Paint?

    I have a OSX Lion with an iPhoto app. I would like to put two photos on a single page like Windows Paint. What's a good app for this? Is there a Windows Paint app for Mac or something similar?

    You can print two photos on a single page with iPhoto, you can put two photos on a single page with Pages, Word or any word processor. Or are you trying to edit two photos together?
    In order of price here are some suggestions:
    Seashore (free)
    The Gimp (free)
    Graphic Coverter ($45 approx)
    Acorn ($50 approx)
    Pixelmator ($50 approx)
    Photoshop Elements ($75 approx)
    There are many, many other options. Search on MacUpdate. You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.

  • Printing a project with about 500 pages

    Hello,
    the company I'm working for is currently discussing using robohelp for the technical documentation. So now I'm trying to find out, if robohelp really suits our needs or not. Currently I'm testing robohelp 9 on a windows xp system with word 2010.
    In the documentation for robohelp it says, that one should not print documents with more than 100 pages. So I tried to print separate documents, but couldn't generate a suitable TOC - the result was simply a document, stating, that a TOC couldn't be generated, which won't be a acceptable output. My question is: how can I generate a TOC though printing several small chapters of the document?
    Or is it possible to print a project with about 500 pages without using those single documents?
    (Up till now, it was no problem for me, to generate a suitable printing documentation, but I'm not sure, if this will still work, when the project is complete and then contains about 500 pages.)

    Hi Feebeegeebee,
    thanks a lot for your answer!
    Well, I tried to generate individual documents by using the flag "individual documents" in the printing config... but then the TOC is printed separately and therefore doesn't contain anything at all...
    If you're generating those separate documents, then how do you get a suitable TOC? (Especially if you don't intend to make different books and therefore the pages should be numbered as if they would all belong to the same document). And what about the links... do they still work if one part of it is generated in a different document?
    Regards
    Gr33bo

  • PLD document is more than one page

    Hello
    When a document has many lines I want the recurring area for a PLD document to stop at a certain distance from the page footer but the end of report area must remain at the same distance.
    Meaning a documnet with 2 pages the recurring area always stops at the same place and restart on the second page when on the 1st page the area reserved for 'end of report' data will be empty and filed up on the second page...
    What shall I changed in the format of the recurring area to have it like this?
    Thank you....

    hi DELANOE,
    Go to Administration>System Intialization>
    Print Preferences-->Set Max. Rows per page(as per y'r requirement).
    In PLD normally End of Report will be empty if print documents
    goes more than a page,End of Report will be displayed in
    last page.
    Hope above answer will help you.
    Jeyakanthan.

  • Two same sections in one page

    Hello Gurus,
    I have a pre-printed stationary that has two same sections in one page with a space in between.
    I did develop a template having one section on it.
    On the pre-printed form the first section data appears fine but the second section starts immediately and so they shift above.
    If I use a little space on template before the group ends it works fine for the first page but the second page starts with that extra space i used.
    how to get this solved.
    Thanks,
    sgupta

    Hi Gupta,
    I have the same issue. I have a check template where I am printing two sections in the same page. AP check template where the invoice part and the check part are duplicated which means i will have the invoice-check(copy) and then invoice-check(original) in the same template. but the limiting lines per page doesnt work in this template. the copy part keeps on printing until it finishes since i did not mention page break after it, as there is original part below it.
    Any other workaround options. so we cannot have a duplicate and original of the invoice & check in the same template and control the no of lines printed for each section.
    Thanks

Maybe you are looking for