Large Print Job Size with Alpha Blending

A while ago, I wrote some java code to print portions of a graph (from JGraph). In the original design, I painted directly to the Graphics object in the Printable.print method. However, the resulting print job size was around 50MBs per page (which is unacceptable when tens of pages are spooled). Nevertheless, the results were perfect. A second attempt to reduce the print size rendered the output to a BufferedImage before drawing to the Graphics object. The print jobs were now ~500KBs per page, but were pixelated. Because of time constraints we used the latter method.
Recently, I revisited this problem and discovered the large print size is due to a color using alpha blending. Having transparent pieces is important, but I'd like to improve the print quality. Does anyone know how to "flatten" or otherwise reduce the print size?
Thanks in advance.

I've run into this same problem and I can't figure a way around it. I mocked up a simple class to test the difference in sizes of print jobs that are printing a display with translucent colors and those that don't and the difference seems a little extreme. Here's my code:
import java.awt.*;
import java.awt.print.*;
public class SimpleTest implements Printable {
  public static void main(String[] args) {
    PrinterJob job = PrinterJob.getPrinterJob();
    job.setPrintable(new SimpleTest());
    if(job.printDialog()) {
      try {
        job.print();
      catch(Exception e) {
        e.printStackTrace();
  public int print(Graphics g, PageFormat pf, int pageIndex)
      throws PrinterException {
    if(pageIndex >= 10) {
      return Printable.NO_SUCH_PAGE;
    g.setColor(new Color(0f, 1f, 0f, 0.5f));
    g.drawRect(25, 25, 300, 300);
    return Printable.PAGE_EXISTS;
}On the call to g.setColor, if I set the alpha argument to 1f, the print job size is 64 KB. However, if I set the alpha argument to 0.5f, the print job size bumps up to 239 MB. That's close to 3000x larger!
So, is there a way around this? I tried changing the PrintQuality and PrinterResolution attributes but neither seemed to have any effect. Maybe I did something wrong? I used the following to change the PrintQuality:
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(PrintQuality.DRAFT);
if(job.printDialog(aset)) {Is that the right way to do it? If so, what other options do I have?
Thanks,
David

Similar Messages

  • I'd like to select print paper size with using AxAcroPDFLib method depend on user

    I'd like to select print paper size with using AxAcroPDFLib method depend on user
    request. Is it possible? in AxAcroPDFLib?
    Is there any method to select print paper size in the C# programming.
    Or if you know another method, please introduce how to use.
    Thank you for your cooperation always.

    I am pretty sure that you can only do this from JavaScript or from C/C++ APIs.

  • PSC 1350 all-in-one not completing print jobs wirelessly with windows 7 64 bit

    I have a acer 5542 running windows 7 (64bit), connected wirelessly to an Orange Livebox hub, to which my HP PSC 1350 printer is connected (via USB cable) therefore using the Livebox as a USB printer server. This configuration has worked very well for my 2 XP laptops for the past year or two. I set up the printer on the windows 7 laptop by connecting it directly, via the USB cable, letting windows install it, and download the latest drivers, (although HP say they have no specific 64bit drivers for this printer, but the drivers they have, and that windows downloaded, work fine!) then i changed the port to the livebox ip address.
    All this worked fine (as on the xp machines), I printed out a spreadsheet, which worked fine untill it approached the end of the page, then just stopped. I troubleshot the printer which didnt return any sprcifics, Just that the print job had failed, and that it had rectified the problem, then the printer starts reprinting the same document, to the same point, (about 95% complete) and again stalls, and so the cycle continues. I have tried it with various different documents and photos, to the same ends. But if i connect the laptop directly to the printer, via USB, it completes the jobs fine
    I have posted on microsoft answers forums, but the one answer i have recieved (re installing everything) did not solve the problem. Although i am not too savvy on computers, i kind of get the feeling it is a spooling issue. (not processing or holding onto the last part of a print file! But its only a feeling!)
    any help would be very much appreciated

    Hi there,
    I understand you're looking for drivers for your PSC 1210 on Windows 7. I will certainly do my best to guide you in this issue.
    At this time there are no HP drivers available for this printer for Windows 7. You can still use the printer with Windows 7, you will just have to use the drivers available within Windows 7. That document will walk you through what you need to do in order to get printing again, and will also show you how to scan with this Windows driver.
    Hope this helps, have a great day!!
    Please click “Accept as Solution ” if you feel my post resolved your issue, as it will help others find the solution faster
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    **MissTeriLynn**
    I work on behalf of HP

  • Print jobs disappearing with APEBS

    I have a Windows Vista 64 bit machine with a AEBS gigabit running 7.2.1 firmware. Connected to the USB port on the AEBS is a Konica Minolta magicolor 2500w. This printer works fine connected directly to the computer but when connected to the AEBS the print jobs go into the spool and then disappear. BonJour (1.04 for 64 bit Vista) finds the printer fine and I am using the 64 bit Vista drivers from Konica but cannot get this to work.
    Also I have a dell 924 that exhibits the same problem. I have tried manually adding the port with the same results. Anyone have any ideas?
    Thanks.

    I can find no reference that the HP P1006 uses PCL5e. Do you have a citation you can share that indicates this? I believe that you will find that this printer only uses the XQX stream protocol. For network printing you will need a driver such as the open source driver found at http://foo2xqx.rkkda.com/
    Matt

  • Print job problems with AEBS - jobs don't print until another job is sent

    I have been experiencing an anomaly with my printer not printing the last page of multipage documents since getting our AEBS with Gigabit Ethernet. Before getting the AEBSs, I had two Linksys routers that were performing well, but would crash regularly. I recently purchased two AEBS router to replace my two Linksys routers. I have the latest AEBS, and an older AEBS M8799LL/A sometimes referred to as the UFO or Crow’s Nest. My printer is a networkable HP Color LaserJet 2550n.
    When the Apple Tech Support person could not get this printer to work when attached to an Ethernet port, they suggested that I attach it to the USB port. I finally got it to work with our Macs, and Windows XP running in Parallels using Bonjour. What we noticed right away was that the printer was taking longer to respond than when we were using it as a network printer under our previous Linksys network. Another thing that happened was that frequently a print job would not appear to have been sent (spooled?) to the printer so we would issue the print command after waiting a couple of minutes and end up with two copies of what we were printing. Yesterday I was printing a basic 5 page text document from Pages and the last page did not print. So I created a document with just a ‘.’ and sent it to the printer. Out came the last page of my five page Pages document and the document with just a ‘.’. The AEBS does appear to be somewhat more stable than our Linksys equipment, but getting printer to work properly has been very frustrating.
    Is anyone aware of what might be causing this problem. At first I was blaming Windows, but it is happening very frequently when printing basic documents in Mac OS X 10.4-Tiger. Any help would be very much appreciated.

    Ah the self healing properties of OSX. This problem appears to have fixed itself.

  • Print Jobs send with no error

    I have an HP 3600n Laser Jet Color printer hooked up to our network. All of the PCs that use the printer are Windows 7. I've seen other posts reporting tons of issues with said printer on Windows 7. However, we've been able to use it previously so I know it's possible to print from a Windows 7 PC to this printer. Unfortunately, the person who orriginaly set it up has since left the company and we have no way to contact him. Additionally we're using the Vista driver because there is no 7 driver.
    When I try to print the documents never make it to the print que. We've tried the simple resets of the printer and print server hosting the driver. I can ping the printer. 
    it used to spit this error out when you would try to print to it before the print server reboot: 
    PCL XL error
    Subsystem: Kernel
    Error: Illegal Tag
    Operator: OpenDataSource
    Position: 2
    Any trouble shooting tips and or possible fixes are greatly appreciated
    Thanks,
    -Billy

    Another new symptom: Rebooted computer for a non related cause, and loaded FF (using Session Manager like always) and tried to print something and got the dreaded "ding". Restarted FF with the restart button, and print now works again. Too bad the event viewer doesn't show anything.
    Oh, I have disabled the other two addons you suggested.
    I could just use the restart button as a temp fix, but one of the PayPal shipping labels is where I first ran on to this problem, and I don't know if restarting FF would kick me out of the label print page. I guess I'll find out if it happens that way again.
    I just love erratic problems. Kind of like troubleshooting an engine problem that won't happen everytime.

  • Print Job Jammed with Samsung Printer

    MACHINES:
    Computer: MacBook
    Printer: Samsung ML-1630 (http://www.samsung.com/hken/consumer/detail/features.do?group=printersmultifunction&type=printersmultifun ction&subtype=monochromelaserprinters&modelcd=ML-1630/XEU)
    Wireless Router: Belkin 'N' Wireless Router (http://catalog.belkin.com/IWCatProductPage.process?Product_Id=372043)
    Wireless USB Hub: Belkin USB Hub (http://www.belkin.com/networkusbhub/)
    The printer is connected to the wireless usb hub, so my MacBook can be print out the documents via wireless, however, the printer is only able to print out one file and the next file will be hold until I restart the printer or reload the wireless usb hub software under Mac OS. It doesn't has any problems under Windows OS.
    I have reinstalled the driver and application for Mac already.
    Do you know how can I solve this problem?

    Does the printer work properly when hooked up directly to the computer. If so, then I strongly suspect some incompatibility with your wireless network.

  • How can I/Is it possible to silently print a PDF with specific print settings and obtaining the resulting job id (in windows at least)?

    Greetings,
    I have a specific application for Windows I'm developing where I need to silently print a PDF to a real printer.  The trick is I need to set specific printing preferences ... such as color/monochrome, # of copies, page size / source tray, etc.   The printer is always set to spool documents, and it is key that I know the job id (even if its already done printing) of the resulting print job.
    With windows APIs mixed in, I would imagine something like ...
    OpenPrinter(printername)
    StartDocPrinter(...)
    -----> some SDK call to print the document based on the handles I pass it...or perhaps one page at a time after I call StartPagePrinter()
    EndDocPrinter(...)
    ClosePrinter()
    I've been searching for something for days that would give me this sort of control, but I've been finding the documentation very difficult to find on silently printing a PDF through any means other than a command line which doesn't appear to give me the information or control I need.
    Is this possible with the Adobe SDK? 
    I've seen other posts accomplish this by changing the printing defaults for the printer, and then sending the job silently with a commandline.  This has two problems for me: 1) I still don't know the Job ID of the print job, and 2) I can't rely on the idea that other unrelated print jobs will not be sent while I'm processing the PDF ... making it difficult to use defaults as a means of controlling the settings without causing a lot of side effects.
    Even just a point in the right direction would be a huge help for how I could accomplish this.  
    Thanks a lot,
    Wayne

    You cannot uninstall Kit Kat from your phone. BTW what kind of phone do you have??

  • A user is having trouble printing. Print jobs take FOREVER when they used to speed through

    A user is having trouble printing. Print jobs take FOREVER when they used to speed through (despite linked images, etc)
    These are just some notes from our troubleshooting:
    User was trying to print out InDesign document however during the flattening phase, the computer would stall and would not print out the document.
    The document does not print out using double sided or single sided.
    The first time I went out, all I did was a system restore and uninstalled mcafee security plus because we're on a university network and sometimes the firewall blocks network printing, and that worked. She tried to print again later and it went back to taking 30 minutes for a print job of about 19 pages. These print jobs used to take about 5 minutes at the most to print entirely, but they queued up immediately, versus now, it takes about 5 minutes just to get to the printer.
    Further troubleshooting that I did on a separate day:
    Printer was printing fine in November - problem started at some point this month (December)
    Printing is fine elsewhere, including in Adobe Acrobat
    I was able to print one page just fine - it had no images (tried to print the same page later, took forever)
    Some of the images are very large (100MB+) photoshop files (again, they were there before and it printed fine) - these images are linked (with no link errors)
    She prints to a network printer, but there's no firewall on (again, printing is fine elsewhere)
    She's essentially printing with the default settings, she just centers her print, instead of the default layout.
    Now even printing with the default print set (not changing any print settings at all) doesn't work. Jobs take 30 minutes. I can't figure out if it's file specific or where the problem is. Since she has no custom settings, my next option is to just do an uninstall and reinstall, but I'm worried that the problem will still be there. I was starting to think that maybe the file is just so corrupted from all the force quits that that's causing the problem, but... I'm running out of solutions.
    Any help? 

    I have only worked doing layout for one business in my past. In that job our department would sometimes experience slowdown in printing from time to time. However, we began to see extreme slowdowns over a month period. It was finally tracked down to two things. One was something about the RAID array going bonkers. The other was some of the CAT cabling going bad. It only affected large print jobs and copying large files through the network. Even so, it was not 100% of the time. Sometimes things went along smoothly.
    Point is, have your IT people been invited in to experience the issue and see if anything in the network is causing at least latency issues?
    Take care, Mike

  • Page Count Missing From Print Job Status Window

    When I print a multi-page document from TextEdit or AppleWorks, the Print Status window does not show the page count. Instead it always shows "Sheet 1 of 1".
    Both TextEdit and AppleWorks show the document as having four pages. A print preview from AppleWorks confirms the document does have four pages. Yet when the document is printed the Print Status window continues to show only "Sheet 1 of 1" with no indication that the document actually has a total of four pages. Nor does it show which pages is currently printing.
    I am running Mac OS X 10.5.8. If I recall correctly, previous versions of Mac OS X showed both the total page count and the currently printing page number, which incremented as the job printed. As it is, there is no way to know the progress of a large print job.
    Any idea what is wrong?
    Thanks.

    Could some check their print status window while a job is printing? Does it always show "Sheet 1 of 1" or does it show the page count that increments as the job prints?
    Thanks.

  • Print file deletes before print job is finished

    I have been trying to print a file about 119 pages it has some color graphics and some photos within the text from adobe it printed about 25 pages good then it stopped and deleted the file I have tried to print 1 page at a time some print and some just print the first few lines of text then a blank page comes out and then it prints the same text on another page and the file is deleted no error messages of any kind I have tried shutting down the printer and restarting it . I have also done the print and scan dr from HP and it found nothing the text page printed fine. If I open the printer box I can see it spool the file it starts to print and the above happens and then I see it deleting the file. I am also printing wireless from my home network. I hope this give you enough information. Thanks in advance for your help.

    Hi @ssward4, 
    Do large print jobs from other programs produce the same result? What happens when you print a smaller job from Adobe? I understand you have already run the HP Print and Scan Doctor but the issue remains, and you have checked the spooler.
    Please complete the solutions presented in the following document and let me know the outcome of your efforts; Acrobat Help / Troubleshoot PDF printing | Acrobat, Reader.
    Please use the thumbs up below if you happy with my efforts to help. If the issue persists, I will do all I can to help works towards a solution.
    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

  • Hp 8600 quits in the middle of a print job

    I have an HP 8600 that when I send a large print job stops printing in the middle when I print from mail merge.  I get no error message on the computer, it just stops printing.  When I check the print job status it gives me an "error - sent to printer" message, but there is no error message on the printer.  I restart the print job from where it left off and it will print a few more and give me the same error message.  So I restart again from where it left off and it will print for a little bit more and stop with another error message.  Each time I restart the printer prints less and less of the job.  Say I have 100 entries to print, I'll get 50 the first time, then 25, then 15, then 5 then...well you get the idea.  Its more than a little frustrating.
    I forgot to mention I am working on a 32bit Windows 7 premium system loaded on a Toshiba Satellite
    I also forgot to mention that when it stops, the last page it prints is blank.

    Hi hp_issed & TXGabe,
    I understand that both of your HP Officejet Pro 8600 printers are not able to print correctly and quit in the middle of jobs.
    What is the firmware version of the printer? click here to find out how to retrieve it.
    Which Windows operating system are you running?
    Is the printer connected via USB, ethernet or wireless?
    Is the power to the printer connected directly into a wall outlet or a surge protector?
    Thank you,
    I worked on behalf of HP.

  • Print job starts, stops on last page of job, then finally restarts.

    Hello, I have an HP Office Jet Pro 8500 (A909), connected via router (ethernet cable). Windows 8, HP Pavillion machine, i5 processor, 64 bit, 6gigs ram
    The print job starts, stops on last page of job, then finally restarts, then starts whole print job over with same results; pausing for about a minute, restarting and finishing job but the driver must detect that the job - still in the queue - is not done and starts again.
    I've swapped ethernet cables with the same results. I can print over the wireless network with other computers and do not have this issue.
    I thought it was a driver issue so I uninstalled/reinstalled HP software, with all available updates, same results.
    The only work around at my disposal now, other than printing from another machine, is to wait for the last page to print and manually clear the queue so the job doesn't print again. Suggestions?
    Thanks

    Hey @DavidWW ,
    Thank you for joining us on the HP Forums today, hope you enjoy your time with us! Also thank you for taking the time to thoroughly explain the issue, much appreciated. 
    I understand you are having an issue with the last page printing late, the computer not recognizing it, re-printing and so on. You need to print, wait for stall and then last page and then clear queue to stop the printer. That is truly annoying, however; I might have a fix for you in 1 simple post... maybe not, but maybe at least.
    Try the tool I have posted below and run the print fix option.
    Click here to download and run the Print and Scan Doctor >>> www.hp.com/go/tools
    If that doesn't fix your issue make sure you let me know and we can continue.
    I worked for HP.

  • P3005 prints two letters top left before print job- Help Pls.

    It just started doing it and it doesn't happen all the time either. It's very frustrating when I am printing cheques and the first cheque gets used with just two letters in the top left and then the actual print job starts with the second cheque.
    I've tried uninstalling the printer and re-installing it but that doesn't help. It's not consistant either.
    It also has started happening on another co-workers printer a HP 4250. These printers are not networked and are hooked up to our PC's (Windows XP).
    I am the tech guy for our hotel but not a professional and I can't figure it out. No settings have been changed.

    You can have the msgsend calss as an utility class
    with out a main method. Change the main method to
    some other name like sendMessage.
    import that class in your servlet email2.
    If msgsend is in a package, you can do import somepackage.msgsend
    msgsend emailMes =new msgsend(filename);
    then,
    emailMes.sendMessage();
    Hope this helps.

  • Hi all! What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    Buying more hard drive space is a very valid option, here.  Editing takes up lots of room, you should never discount the idea of adding more when you need it.
    Another possibility is exporting to MXF OP1a using the AVC-I codec.  It's not lossless, but it is Master quality.  Plus the file size is a LOT smaller, so it may suit your needs.

Maybe you are looking for

  • Alphabetically ordering a Linked List

    Would anyone please be able to give me help in ordering a linked list alphabetically. I'm new to java so please be gentle. Many thanks in advance.

  • Exchange 2003 Calendar Template Issue

    Users are getting "This message has been rejected by the Exchange organization to which it was sent, because the message contains either a large number of attachments or because there are too many nested attachments. To solve this problem, reduce the

  • Inventory Management Scenario

    Hi BW Experts, I was working on the Inventory Management screnario as in How to Handle Inventory Management Scenarios in BW with cumulative KFs. I read many of the forum postings but I am still little bit confused about the sequence of the loading. A

  • Changing Security Settings to WEP

    I have an Airport Express. I want to change the Security to WEP so I can use it with my Nintendo DS. How do I do this? Neither of my parents know how. I need Help ?   Windows XP   ?

  • Cisco ASA Anconnect VPN Deployment

    Hi, I have an enquiry regarding the deployment for ASA that need to support more than 10000 clients. I understand that multiple ASA would be required for it however I was wondering what may be the typical design for it? Should the multiple ASA be set