Failed with Print Job Listener - SOS

I'm using java 1.5.0.
I'm trying to monitor status of print jobs while user prints a report (in Applet viewer).
The print job listener contains 6 events:
1) printDataTransferCompleted(PrintJobEvent e)
2) printJobCanceled(PrintJobEvent e)
3) printJobCompleted(PrintJobEvent e)
4) printJobFailed(PrintJobEvent e)
5) printJobNoMoreEvents(PrintJobEvent e)
6) printJobRequiresAttention(PrintJobEvent e)
After data is transferred to printer, i can only catch the event printJobNoMoreEvents although the print job is completed or failed, or other else. And it's always like that.
In the Java Guide, they mentionned about the limitation of printing system. But i don't know where the problem comes from. Is it caused of limitation of Printing System or of Applet limitation?
If the message is not clear or you need take a look at my code, please feel free to ask me.
Can anyone comment of this issue and offer a solution or a workaround? Please help me. Thanks in advance.

My printer is shared by Domain Controller. I'm wondering the way of sharing printer whether is the problem..?

Similar Messages

  • DS Job Fails with Print All Trace Logs turned on

    Hey all,
    I have a Realtime DS 12.2 job which uses a global address cleanse and a few query transforms. If I add a data cleanse transform to the job it fails but does not provide any errors in the log. it only has:
    16105     4008583808     VAL-030910     5/10/2011 8:08:11 AM     |Session RT_Job_DQ_CR_Address_Cleanse_Match
    16105     4008583808     VAL-030910     5/10/2011 8:08:11 AM     Transform <PEP_CUST_USARegulatoryNonCertified_AddressCleanse>:Option Error(Option:
    16105     4008583808     VAL-030910     5/10/2011 8:08:11 AM     NON_CERTIFIED_OPTIONS/DISABLE_CERTIFICATION): PSFORM 3553 will not be generated  because some Non-Certified options are enabled.
    16105     1100020032     DQX-058306     5/10/2011 8:08:14 AM     |Session RT_Job_DQ_CR_Address_Cleanse_Match|Data flow DF_CR_Address_Cleanse_Match|Transform PEP_Cust_EnglishNorthAmerica_DataCleanse
    16105     1100020032     DQX-058306     5/10/2011 8:08:14 AM     Transform <PEP_Cust_EnglishNorthAmerica_DataCleanse>: Synchronizing the entire performance dictionary due to an unexpected
    16105     1100020032     DQX-058306     5/10/2011 8:08:14 AM     environment; this can be a time-consuming process.
    Then if I Print All Trace Messages the error log looks like this:
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     |Session Copy_1_RT_Job_DQ_CR_Address_Cleanse_Match|Data flow Copy_1_DF_CR_Address_Cleanse_Match|Reader READ MESSAGE Input_Realtime_DQ_Adrs_Clean_Match_NS OUTPUT(Input_
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     XML parser failed: Error <An exception occurred! Type:TranscodingException, Message:Could not create a converter for encoding:
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     > at line <0>, char <0> in <<?xml version="1.0" encoding="utf-8"?>
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     <AddressCleanseMatchRequest xmlns="http://businessobjects.com/service/RT_Job_DQ_CR_Address_Cleanse_Match/input">
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     <Record>
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     <Name1>JEDD</Name1>
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     <Address1>1 CASCADE PLAZA</Address1>
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     <Address2></Address2>
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     <City>AKROn</City>
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     <State>OHIO</State>
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     <PostalCode></PostalCode>
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     <Country></Country>
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     <StoreNum>321</StoreNum>
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     <POBox></POBox>
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     <RequestSysID>CM</RequestSysID>
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     </Record>
    17487     1086335296     XML-240304     5/10/2011 8:13:50 AM     </AddressCleanseMatchRequest>>, file <>.
    17487     1086335296     XML-240307     5/10/2011 8:13:51 AM     |Session Copy_1_RT_Job_DQ_CR_Address_Cleanse_Match|Data flow Copy_1_DF_CR_Address_Cleanse_Match|Reader READ MESSAGE Input_Realtime_DQ_Adrs_Clean_Match_NS OUTPUT(Input_
    17487     1086335296     XML-240307     5/10/2011 8:13:51 AM     XML parser failed: See previously displayed error message.
    17487     1451250304     XML-240307     5/10/2011 8:14:01 AM     |Session Copy_1_RT_Job_DQ_CR_Address_Cleanse_Match|Data flow Copy_1_DF_CR_Address_Cleanse_Match|Reader READ MESSAGE Input_Realtime_DQ_Adrs_Clean_Match_NS OUTPUT(Input_
    17487     1451250304     XML-240307     5/10/2011 8:14:01 AM     XML parser failed: See previously displayed error message.
    Here is something that is really strange: If I drop the Datacleanse datastore, the job will finish. Except in cases where I leave the Print all trace messages turned on, then it will error with the same XML Parser error above.
    Thanks for all help.
    Ryan

    Turned out I had a global address engine with US engine enabled, and a US Addrss engine in the same job. It did not like that.
    I changed the global address engine to not handle US addresses, and it worked.

  • Unwanted cover page with print job

    When I print a document, a cover sheet prints first. It lists the filename, directory, template, title, subject, author, and more. This sheet prints with every document printed. When I wants to print more than one page, it prints before each page. How do I turn this off? It started suddenly.
    I have a HP photosmart 5520 printer
    wireless connection
    Macbook Air with OS 10.9.5
    Thanks,
    Kaki

    Hi @Kakikaki , and welcome to the HP Forums!
    I understand you're running into print issues.  I would like to help!
    I would suggest deleting the printer from your print system, using this document: Uninstalling the Printer Software.
    Once you have deleted it, I would suggest verifying and repairing the disk permissions: About Disk Utility's Repair Disk Permissions feature.
    I would also suggest running your Apple updates:  OS X: Updating OS X and Mac App Store apps
    After the updates, I would recommend reinstalling the HP Photosmart 5520 e-All-in-One Full Feature Software and Drivers.
    Good luck and please let me know the results of your troubleshooting steps. Thank you for posting on the HP Forums!
    Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

  • Background job failing with license check error

    Hi Experts
    In our ERP 6.0 system ,all the background jobs are failing with license check error.
    Have checked the license in SLICENSE and the license is fine.
    There is no warning while users are loggign in ,but when any background job is runing its failing with error
    Job started
    Logon not possible (error in license check)
    Job cancelled after system exception ERROR_MESSAGE
    Also performed the license test which is failing
    F:\usr\sap\XX1\SYS\exe\uc\NTAMD64>saplicense -test pf=F:\usr\sap\XX1\SYS\profile
    \XX1_DVEBMGS00_host_xx
    Protocol saplicense test:
    Read sapsytem name
           ok, sapsytem name = XX1
    Read message server host
           ok, host = hostname
    Read message server service port
           ok, service port = sapmsXX1
    Connect to message server
           ok, connect done
    Read hardware key from message server
           ok, got hardware key
    Detach from message server
           ok, detached
    Check hardware key
           ok, hardware key = T0343073854
    Connect to database
           ok, connected
    Check license
           ok, check done
    Disconnect database
           ok, database disconnected
    test result: license test failed
    LICENSE system: XX1 hardware key: T0343073854 expiration_date:
            installation no:  key:
            userlimit: 0 productid: R3_BASIS
            system-nr:
    license expired ***
    Please suggest how to troubleshoot.
    Regards
    Ajay

    @Michael
    In SLICENSe the Hardware key field is not BLUE or BLACK and its showing the exact hardware key which i can see at OS level with saplicense -get command.
    @Jagadish
    Note is good refrence, i reiinstalled the Digitally signed license with saplikey command and it was successful.
    But still the license test is failing at OS Level..below is the command prompt output.
    ===================================================================
    F:\usr\sap\XX1\SYS\exe\uc\NTAMD64>saplikey -install C:\license_script_XX.txt pf
    =F:\usr\sap\XX\SYS\profile\XX_DVEBMGS00_mngsez148079
    SAP License Key Administration  -  Copyright (C) 2003 SAP AG
    2 SAP license key(s) successfully installed.
    F:\usr\sap\XX\SYS\exe\uc\NTAMD64>saplicense -test pf=F:\usr\sap\XX1\SYS\profile
    \MD1_DVEBMGS00_mngsez148079
    Protocol saplicense test:
    Read sapsytem name
           ok, sapsytem name = XX1
    Read message server host
           ok, host = host
    Read message server service port
           ok, service port = sapmsXX1
    Connect to message server
           ok, connect done
    Read hardware key from message server
           ok, got hardware key
    Detach from message server
           ok, detached
    Check hardware key
           ok, hardware key = T0343073854
    Connect to database
           ok, connected
    Check license
           ok, check done
    Disconnect database
           ok, database disconnected
    test result: license test failed
    LICENSE system: XX1 hardware key: T0343073854 expiration_date:
            installation no:  key:
            userlimit: 0 productid: R3_BASIS
            system-nr:
    license expired ***
    ============================================================
    @Juan
    The hardware key was changed and we requested a new license with new hardware key,system was runing fine for couple of weeks with all background jiobs for SPAM./SAINT Ok .We performed EHP4 on this system.
    But now this issue is here,so i guess we should troubleshoot.
    Please let me know any other pointers.
    Regards
    Ajay
    PS In SLICENSE new installed license is fine and all users can login.

  • How to print to Canon irC5051 with Print Server?

    [edit] I am using 10.7.5 not 10.6.8 sorry [\edit]
    My company recently upgraded to Canon Image Runner C5051 units.
    They added print servers with authentication for follow me printing (print at any machine around the building by authenticating).
    I have read tons of discussions, forums and google articles on how to get image runners to print with os x - yet to no avail.
    I have downloaded both the recent drivers from canon (the PS and URII) updates.
    I can only seem to connect to the printer using the "Windows" domain feature in the add printer settings.
    The Windows URL is \\printARL\ARLC-Secure.
    I can ping the \\printARL and retrieve the IP address.  But I cannot do the same with the full path (\\printARL\ARLC-Secure)
    Trying to LDP print to the printARL ip does not work.  I have no way of figuring out the full path ip address of the print server.
    On my windows computer it shows "null" in the port/ip address on the PORTs tab.
    So with URII I cannot identify the LDP ip address to use so if I connect via the windows domain it keeps returning error -50.
    I guess this makes sense because its not LDP.
    Using the windows search to connect and applying the Canon 5051 PS driver it seems to function.
    It connects, allows to me authenticate, moves the file to the print server, and shows up at the printer.
    But when I print, it does nothing.  No output.  ...sometimes it even makes the sound like it is printing, but then no dice.
    If I try and Generic PS or PCL driver, it sends the document.
    But when I print, it seems to produce a paper format error (thinks it LGL)
    So if you force the printer to print to LTR, it spits out reems of giberish.
    There must be something I am missing.

    Sorry for missing your post. I don't check the 10.6 forums too often.
    Reading your post it sounds like your are using uniFLOW, which is the follow-me printing app. So if you want to continue using this with the Mac there are a few things to note.
    1. The Mac UFR2 driver wants to communicate directly with the copier. With print jobs being routed via the Windows print server (uniFLOW secure input queue) there is no chance of there being two-way communication and this often causes the -50 error you mention.
    The solution is to use the Canon PPD, but this would require the ADV C50xx to have the optional Postscript kit. And given the gibberish output you mention it would seem that this kit was not purchased. So I would be talking to the Canon rep. If they had scoped your business correctly and saw the Mac/s then the PS kit should have been ordered.
    2. You cannot ping the printer queue on the Windows server. So pinging \\printARL\ARLC-Secure won't work as you have found. But you can ping the Windows server, which you did and this worked. And, your issue is not due to an inability to connect to the Windows queue. It is a driver issue.
    3. Using the PS driver appears to work. Lets you authentice but does not print. This is due to the lack of the Postscript kit in the copier.
    4. Re the Generic PS, no PS kit means no printing. And the same goes for PCL.
    So, in summary. The UFR2 driver is not designed to print via a Windows server. For your setup, the Postscript kit in the copier would solve your issue.

  • SAP_COLLECTOR_FOR_PERFMONITOR failing with dump

    HI All,
    SAP standard job SAP_COLLECTOR_FOR_PERFMONITOR is failing with below job log
    31.05.2012 00:19:03 Job started
    31.05.2012 00:19:03 Step 001 started (program RSCOLL00, variant , user ID CP1SUP)
    31.05.2012 00:19:06 Clean_Plan:Cleanup of DB13 Plannings
    31.05.2012 00:19:06 Clean_Plan:started by RSDBPREV                       on server ttahmsv2050
    31.05.2012 00:19:06 Clean_Plan:Cleaning up jobs of system PRD
    31.05.2012 00:19:06 You are not authorized for DB access (S_DBCON: <LOCAL SYSTEM> PRD <Windows authentication> 03)
    31.05.2012 00:19:06 Function DB6_PLAN_STOP_BATCH_JOB failed with return code = Job error
    31.05.2012 00:19:06 Clean_Plan:terminated with error
    31.05.2012 00:19:06 REASON=Job error
    31.05.2012 00:19:06 ABAP/4 processor: COMPUTE_INT_TIMES_OVERFLOW
    31.05.2012 00:19:06 Job cancelled
    and its also getting finished with job log
    31.05.2012 01:19:03 Job started
    31.05.2012 01:19:03 Step 001 started (program RSCOLL00, variant , user ID CP1SUP)
    31.05.2012 01:19:06 Database system not supported
    31.05.2012 01:19:06 Database system not supported
    31.05.2012 01:19:11 Job finished
    i.e every alternate run it gets finsihed and gets cancelled
    Dump obtained is COMPUTE_INT_TIMES_OVERFLOW
    I have found this note 1027512 not sure if there is any other way

    Hi,
    thank you all for your help. I tried the solution provided in SAP Note 199586. Although, it does not talk about my specific issue, however, I tried solution 1 and after that job is running fine.
    Thanks again for all your help.
    Regards,
    Sudhir

  • Delta load failing with dump TSV_TNEW_PAGE_ALLOC_FAILED

    Hi,
    When we are loading BW statistics delta load, the load is failing with error "Job in source system terminated --> Request is set to red." and its giving short dump with "TSV_TNEW_PAGE_ALLOC_FAILED".
    I have already gone through Forum and changed package size also. But could not solve the problem.
    We are using 3.5 version, Could you please post your thought ASAP.
    Regards
    Satya

    Hi there,
    Yes that dump is lack of memory...
    So probably your package has too many records to be processed, especially if you have code in start routine or end routine or something like that, the process for each package might take too long and fails with out of memory.
    Try in fact change the package size to a smaller size, so fewer records are processed in each package.
    Diogo.

  • HP print jobs print multiples

    I am trying to troubleshoot this printing problem. Jobs sent to a shared HP 2200 laserjet (from an iMac running 10.4.x) print out in multiples of the user's requested number - e.g. if the user selects to print 2, the printer prints 4; if the use selects 3, the printer prints 9.
    What is causing the exponential increase in the print request number? (2x2=4, 3x3=9)
    I have deleted and reinstalled the HP drivers and associated ppds several times, with no improvement.
    Before I reinstall the OS on this machine, does anyone have an insight into how the math for the print job is getting scrambled?
    The Mac directly connected to the HP2200 (via USB) has no problems with print jobs.

    Hi,
    Please follow the link below :
    http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&taskId=110&prodSeriesId=...
    I work for HP but my posts and replies are my own.
    Make it easier for other people to find solutions, by marking my answer with \'Accept as Solution\' if it solves your problem.
    Click on the BLUE KUDOS button on the left to say "Thanks"

  • HP Laserjet 6MP fails to print with parallel-to-USB converter cable

    I have a LaserJet 6 MP parallel printer which I was using in 10.3.9 with a parallel-to-USB converter cable. The Printer Utility saw it natively as a USB device and it printed just fine most of the time, although it would occasionally fail to print, so I installed a different driver called usbtb 1.0.15, and after that it printed very reliably.
    Now I've upgraded to 10.4.9, and the Printer Utility still detects the HP printer natively as a USB device, and I also installed the formerly-reliable usbtb driver again, but the printer now fails to print with either driver. It acts like it's going to, but then it quits.
    When I choose Print, all the features of the printer are shown, and I can select which tray to take paper from etc., and the printer dialogue box says "Printing," the activity light on the printer flashes just as it always does when printing is in progress, but then, instead of printing, the activity light stops flashing and the print job disappears from the dialogue box.
    Can anyone tell my why this printer is failing to print now, and how I might be able to get it working again?
    Thanks,
    Tom

    Wait a minute! It's only certain Indesign documents that won't print.
    All TextEdit docs will print.
    I created a few scribbles in Photoshop and they print.
    But with InDesign, there is no predicting which documents will print or will not print. On some that will not print, if I remove all but one text box, then they will print. On other documents that do print, if I copy some text off of one that won't print and paste it in, then that one stops printing too.
    On some that won't print, if I erase everything on the page and create a new text box and type a few words into it, the page will print. If I revert to the previously saved version, once again the page won't print.
    What kind of craziness is this, anyway? It seems random. I can't figure it out.
    Even on the documents that won't print, when I try to print them the printer's activity light blinks as though it is just about to print, but then the light goes out without printing.
    Anybody got any ideas what this problem is and how to fix it?
    All I know is that EVERYTHING printed before I upgraded from 10.3.9 to 10.4.9.
    Tom

  • Errors when sending a print job via samba with CUPS 1.4.6-3

    Hello people, this is my last resource i made the things posted in the wiki for CUPS and CUPS via samba and CUPS specific problems and cant find the solution.
    When i send a print job using  HP LaserJet Professional p1102w with driver hpcups 3.11.5, requires proprietary plugin i recieve this message in localhost:631
    "/usr/lib/cups/filter/hpcups failed"
    if i change driver to hpijs, 3.11.5, requires proprietary plugin i recieve this message in localhost:631
    "Session setup failed: NT_STATUS_NO_SUCH_FILE"
    the hp-plugin is installed, in fact i have to change the link from python 3 to phyton 2.7 to work properly.
    the uri for the printer is the form smb://username:password@domain/hostname/printer_name also tried smb://username@hostname/printer_name and smb://username:password@hostname/printer_name
    i am in a Domain with Active Directory, all the share from server to my computer is working fine so i dont think its a problem from samba. All the data for the uri is correct in fact is my desktop pc at work with window$, i am trying to send a print job from my laptop with Arch.
    Any ideas? Thanks and sorry for my bad english.
    Last edited by engelus (2011-06-13 15:33:38)

    same problem, please advise.

  • 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

  • ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function

    Hello,
    I am calling a windows bat file using dbms_scheduler and getting the following error. I have searched the forum and the internet and tried different switches and options. None of them solved my problem.
    Oracle Version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    OracleJobScheduler is running as a service
    Error starting at line 1 in command:
    execute GET_RESULTS();
    Error report:
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    ORA-06512: at "SYS.DBMS_ISCHED", line 185
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 486
    ORA-06512: at "PS.GET_RESULTS", line 67
    ORA-06512: at line 1
    27369. 00000 - "job of type EXECUTABLE failed with exit code: %s"
    *Cause:    A problem was encountered while running a job of type EXECUTABLE.
    The cause of the actual problem is identified by the exit code.
    *Action:   Correct the cause of the exit code and reschedule the job.
    Here is the code for scheduler
          dbms_output.put_line(os_commandline || utlPath || fileSeparator || 'get.bat >nul')
          dbms_scheduler.create_job
          (   job_name          =>'PS_GET_RESULTS'
                , job_action        => os_commandline || utlPath || fileSeparator || 'get.bat >nul'
                , job_type          =>'executable'
                , enabled           =>false
                , auto_drop         =>false
                , start_date        =>systimestamp
          dbms_scheduler.run_job(job_name =>'PS_GET_RESULTS');The dbs_output prints a line which shows that the parameters os_commandline, utlPath and fileSeparator are set correctly.
         C:\windows\system32\cmd.exe /q /c E:\UTLDir\get.bat >nulThe windows file (get.bat) is:
         "C:\Program Files (x86)\WinSCP\Winscp.exe" /script=e:\utldir\get_resultsThis batch file passes a script file to the executable winscp.exe to get files from another server.
    The script file (get_results) is:
         option batch abort
         option confirm off
         open sftp://username:password@ipnumber:port -hostkey="ssh-rsa 1024 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
         cd /usr/dropbox/
         option transfer binary
         get *.results E:\UTLDir\Results\
         close
         exitI tested the batch file directly and works fine and "gets" the files from the server. But, invoking from Oracle dbms_scheduler fails with ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    Appreciate your help and time in suggesting additional guidelines or pointers.
    Thanks,
    Rose

    Here is an update, if somebody else is having a similar problem.
    The ftp command "cd" to change the directories should be an absolute path. I was given a path "/usr/dropbox/", but on the server it actually corresponds to "/usr/local/apps/dropbox/". After updating the directory path, the scheduler worked fine in invoking the batch file for transferring the files.
    Thanks,
    Rose

  • Printing Error - pstopdffilter/pstocupsraster failed with err number -31000

    Hi All,
    I'm hoping someone could assist me with this. After googling like crazy for a solution I thought I had to post here on the forums. I'm a new Mac user (only a few days now) so please bear with me. I will also post this on the Java Forums because I don't know if this is a problem with my code or with the Mac settings.
    Setup
    I've got a Java Applet running on the mac (written in Eclipse 64 bit) on a Mac with OS X 10.6.4 on. Also, Java 1.6.0_21 (both 32 bit and 64 bit) is installed on the machine. The printer installed is a ZPL Label Printer (Zebra Technologies ZTC GK420d).
    If I use another application such as TextEdit to print, it works fine.
    *Problem Description*
    Whenever I try print from the Applet nothing comes from the printer, my code does not break or catch any exception at all but the printer queue gives the error: *pstopdffilter/pstocupsraster failed with err number -31000.*
    Code
    The code I use with this Java Applet works absolutely fine on Windows XP 32 bit (IE 7.0, Google Chrome and Firefox) as well as on Windows 7 64 bit (I.E 8.0, Google Chrome and Firefox) but never on the Mac. For any developers who might be able to help, the code is below:
    import java.applet.Applet;
    import javax.print.Doc;
    import javax.print.DocFlavor;
    import javax.print.DocPrintJob;
    import javax.print.PrintException;
    import javax.print.PrintService;
    import javax.print.PrintServiceLookup;
    import javax.print.SimpleDoc;
    import javax.print.attribute.PrintServiceAttribute;
    import javax.print.attribute.standard.PrinterName;
    import javax.print.attribute.HashPrintRequestAttributeSet;
    import javax.print.attribute.PrintRequestAttributeSet;
    import javax.print.attribute.standard.Copies;
    public class UKMJavaPrintApplet extends Applet
    public void init()
    System.out.println("Initialising UK Mail Java Printing Applet...");
    public void start()
    System.out.println("Starting UK Mail Java Printing Applet...");
    PrintLabelZPL("^XA^FO100,40^BY3^B3,,30^FD123ABC^XZ","Zebra Technologies ZTC GK420d");
    public void stop()
    System.out.println("Stopping UK Mail Java Printing Applet...");
    public void destroy()
    System.out.println("Preparing unload of UK Mail Java Printing Applet...");
    public int GetPrinterCount()
    PrintService[] services = null;
    int serviceLength = 0;
    try
    services = PrintServiceLookup.lookupPrintServices(null, null);
    if(services != null && services.length > 0)
    serviceLength = services.length;
    catch(Exception z)
    System.out.println("Failed to get printer count: " + z.getMessage());
    z.printStackTrace();
    return serviceLength;
    public String GetPrinterName(int index)
    String sPrinterName = null;
    String printerName = "";
    PrintService[] services = null;
    try
    services = PrintServiceLookup.lookupPrintServices(null, null);
    for (int k=0; k < services.length; k++)
    PrintServiceAttribute attr = services[k].getAttribute(PrinterName.class);
    sPrinterName = ((PrinterName) attr).getValue();
    if(index == k)
    printerName = sPrinterName;
    break;
    catch(Exception r)
    System.out.println("Failed to get printer name: " + r.getMessage());
    r.printStackTrace();
    return printerName;
    public Boolean PrintLabelZPL(String zplString, String printerName)
    String errStr = "";
    Boolean boolSuccess = false;
    try
    if(printerName != null && printerName != "")
    PrintService psZebra = null;
    String sPrinterName = null;
    PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
    pras.add(new Copies(1));
    PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);
    for (int i = 0; i < services.length; i++)
    PrintServiceAttribute attr = services.getAttribute(PrinterName.class);
    sPrinterName = ((PrinterName) attr).getValue();
    if (printerName.equals(sPrinterName))
    psZebra = services;
    break;
    if (psZebra != null)
    DocPrintJob job = psZebra.createPrintJob();
    byte[] by = zplString.getBytes();
    DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
    Doc doc = new SimpleDoc(by, flavor, null);
    System.out.println("Printing to: " + printerName);
    job.print(doc, pras);
    boolSuccess = true;
    System.out.println("Printing Successful.");
    else
    errStr = "Zebra printer not found.";
    System.out.println(errStr);
    boolSuccess = false;
    else
    errStr = "No printer name was provided.";
    System.out.println(errStr);
    boolSuccess = false;
    catch (PrintException e)
    System.out.println("Print Failed with PrintException: " + e.getMessage());
    boolSuccess = false;
    e.printStackTrace();
    catch (Exception f)
    System.out.println("Print Failed: " + f.getMessage());
    boolSuccess = false;
    f.printStackTrace();
    return boolSuccess;
    Does anyone have any ideas on how I can resolve this and print to the ZPL printer from my Java Applet on the Mac?
    Any help would be much appreciated.
    Thanks!

    We managed to solve our own problem. This was not directly a Java Problem, but a problem with the setup of the Zebra printer on the Mac. Printing directly to the ZPL Printer never worked and always gave the error Printing Error - pstopdffilter/pstocupsraster failed with err number -31000.
    To solve this, we had to use the CUPS (Common Unix Printing System) interface. CUPS is apparently installed standard with every Mac. Being a new Mac user I didn't even know this a week ago. We had to use CUPS to add the printer, set it to be a "RAW" printer and then add something called a Class. Now when printing from the Java Applet, we DO NOT print to the actual Zebra printer, we print to the Class.
    Here are the steps on how to accomplish all this:
    1. As an Admin user, log onto Cups using the Safari browser by entering *http://localhost:631* into the Address Bar.
    2. Select the Administration tab and click, ‘Add Printer’
    3. Select the required local printer and then ‘Continue’
    4. Enter a Name, Description, Location and uncheck the ‘Share This Printer’ checkbox, where:
    a. Name = Queue Name (e.g. Zebra_RAW)
    b. Description = Human Readable Description (e.g. Zebra1)
    c. Location = Human Readable Location (e.g. My Mac mini)
    5. Click ‘Continue’
    6. Click ‘Select Another Make/Manufacturer’ and select ‘Raw’. Click ‘Continue’
    7. Click ‘Add Printer’
    8. Check that Banners are ‘none’ and Policies are ‘stop-printer’ (Error) and ‘default’ (Operation)
    9. Click ‘Set Default Options’
    10. Under the Administration tab, click Add Class.
    11. Enter a Name, Description, Location and select the Members:
    a. Name = Queue Name (e.g. ZebraRAWClass)
    b. Description = Human Readable Description (e.g. ZebraRaw)
    c. Location = Human Readable Location (e.g. My Mac mini)
    d. Members = the Queue Name of the new raw printer
    12. The only visible printers on the list then will be your non-raw printer/s and the printer class which you just created.
    13. Now when printing from Java Code, you must use the class as the printer in order to print raw ZPL.
    So in my example code in the previous post, I would print like this: PrintLabelZPL("^XA^FO100,40^BY3^B3,,30^FD123ABC^XZ","ZebraRaw");
    And it works! I hope this can help others with the same / similar problem.

  • What is causing my print jobs to fail?

    Having trouble printing  documents (which range from 12-50 pages) from InDesign CC. Whole job fails to print. Started with new documents based on template created in CC. Trouble fonts have been removed from styles. I can print some individual pages. On the problem pages I have had luck printing them without the images, but other pages with no problems have similar images on them in terms of size, file type, color space, etc. Tried exporting to IDML, still had trouble printing.

    HI, JonJamesDufort
    You might try to save a copy of the file to help troubleshoot the Indesign printing in case if you have to remove other images.
    Have you tried to export to pdf or Print to pdf if you have Acrobat installed? If you can export to PDF from Indesign, then I would look to see if you have linked images that could be causing the problem. Does the print job just fail? Also what kind of printer are you trying to print to? You might have a corrupt image or graphic that could be causing the print job to fail. Do you have any older eps graphics that you are including in your file? Look to see what files are linked and try to embed the files. Did you run a preflight on the file? You should do that first to give you an idea of what could be causing it.
    If you can export to PDF and then Print to your printer, then you have a work around to get your file printed.
    If you find that this resolves your issue or was helpful, could you please take a moment to come back to this discussion and mark the post as helpful. Doing so greatly benefits your fellow users
    Let me know if you have any questions
    Thanks
    Scott V

  • HP Laserjet utility starts and fails to go away after print job

    I have an HP Laserjet 1300 hooked to an Airport base station. After the Leopard install (a default, Upgrade install from 10.4.10), I had to re-ADD that printer in the Print & FAX Preferences panel -- it wasn't simply remembered. That went fine, and printing works as expected.
    EXCEPT: The HP Laserjet 1300 "utility" application (for managing the print queue) now activates with each print job -- not just when there is a problem such as "out of paper" as before. No problems are actually reported during or after the print job. And when the print job finishes, it doesn't go away. I have to manually Quit it.
    I can't find any option to have the "utility" activate only when it has some problem to report (i.e., the way it worked under Tiger), or to make it go away automatically when all print jobs are finished. Any suggestions?
    NOTE: When ADDing the printer in the Print & FAX utility, it did go looking for "new drivers", but didn't announce it found or installed anything new.

    Thank you. That's what I was looking for:
    Right click on the printer utility icon in the dock when you see it still sitting in there. Select "Auto Quit" from the pop up menu. Click on the utility to select it and open its queue window. Manually quit the utility.
    After those steps it appears the utility now activates in the dock and then goes away after each print job that finishes normally.
    Solved!

Maybe you are looking for

  • HELP! I have a dual monitor setup and can't use any of them for video??

    1)I have a GeForce4 MX 64MB VRAM card installed. 2) the back is dual monitor capable, meaning it has 2 vga (CRT) ports, one on the right and an another adapted plug with a vga port on the end. ( i have no idea which type it was originaly.) 3) I have

  • No start up & ugly tone sound & flickering front light!!

    hello, thanks for reading my topic question. I have a question about my iBook's recent problems; they seem solved but little signes show I am heading for the same "crash"?? Under OS X10.3.3 (original from first buy July 2004) my iBook developed probl

  • Flat-file Reconciliaiton

    I have used the following link to perform a flat-file reconciliation. I assumed this sample would handle adds, updates and deletions. However, that does not seem to be the case. If I modify or delete an existing record from the file and then re-run t

  • HI, i've got a big issue with my Ipod touch 2g...lot of my former apps unable after restore! please help

    Hello to all, last month i had to restore my Ipod touch 2G. 16 apps are unavailable now because of: need ios 4.3. But they were on my Ipod before!! And i want may apps back, think lot of them were payed!! What can i do? Thanks of your answers Dume1

  • WebDynpro - Adobe interactive pdf attachments

    I am creating an ABAP web dypro with a Adobe interactive form that also includes a workflow.  I am having an issue passing the attachments with the PDF source to the next workflow task. When I save the PDF source from the first web dynpro view and th