Printing is closing program with some printers

I am dying here. For some reason the way I am printing is causing either a General Protection Fault or just closing my program. This doesn't happen all the time though. All of my printers (inkjet and laser) work fine, but with some other printers I am seeing the problems described above. Some Epsons work while others don't, same with HP. If anyone has run into these problems or if my code just sucks (I included a snippet) please let me know what I should do. I thank you all in advance for the wonderful advice I am sure to recieve.
Thanks
~Justin
DocPrintJob pjob = null;
Doc doc = null;
PrintServiceAttributeSet pjlSet = null;
book = null;
pageView = null;
PrintJobAttributeSet printJobSet = null;
PrintRequestAttributeSet printReqSet = null;
if(endPage > v.size()) {
endPage = v.size();
book = new Book();
for(int i = startPage; i <= endPage; i ++) {
pageView = new PrintablePageView((PageData)v.elementAt(i - 1));
book.append(pageView ,pf);
PageRanges pr = new PageRanges(1,book.getNumberOfPages());
aset.add(pr);
printerJob.setPageable(book);
pjob = printerJob.getPrintService().createPrintJob();
try {
doc = new SimpleDoc(book, flavor, null);
pjob.print(doc, aset);
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Error in PAAO " + e);
return false;
}

One of the JRE 1.3.1's has this problem, upgrade to a newer JRE and it should fix your problem.

Similar Messages

  • Problems selecting paper bin/source with some printers drivers

    Hi,
    I'm using CR2008 SP2 .NET SDK.
    With some printers drivers i'm unable to set the correct paper source in the print options.
    For example, if I use Toshiba e-series PLC driver (you can find it here:drivers and select, for example, the e-STUDIO281C printer).
    Even if i set the correct paper source on the report designer when i print it through code (without applying any changes to the report) the report is always printed by the default paper source defined at the printer preferences.
    The same thing happens when you do it through the designer.
    I already tried the following workaround but without any success: at the CR Designer, go to the File Menu, and choose Page Setup. Under Page Options, check the Dissociate Formatting Page Size and Printer Paper Size. This often helps with these issues. Resave the report, and see if that works any better.
    Is there any known issues with printer drivers and CR2008?
    (This thread was originally posted in [.NET Development forum|Re: Problems selecting paper bin/source with some printers drivers])

    Oops, sorry my mistake. I'll leave it here for now.
    How CR works is to get the Printer info from the DEVMODE structure, which is where the printer driver settings and configurations are saved for each printer installed.
    What I've seen plenty of times before is within the DEVMODE structure there is one area called DMExtra and in that structure it holds various custom options. Quite often the issue is we query that structure to get info but the problem lies in the driver returning an invalid structure size and therefore CR can't use any custom settings.
    Same type of issue if they use an uncommon (ENUM) value for the paper size. In code you can see this in debug mode. But if you simply pass the values as pointers and not attempt to alter them at all CR should not alter what the designer used and saved in the RPT file when the reprot was designed.
    What can happen when CR loads the printer info it fails due to problems with the printer itself. There are missing files from the install of the printer which cause Crystal to stop getting the info.
    Try this on a clean PC with no other printers installed, Install just that printer driver and then install Crystal Reports. If it still fails then we know it could be Crystal having problems with that driver. You may want to post your issue with the printer manufacturer also. They may be able to test also and determine if it is a CR or their driver issue. They can download a trial version of CR for testing.
    Trial lin is: Direct link to the Trial version: http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
    If that's not an option you could purchase a support case here for one of our Engineers to escalate to R&D. If it turns out to be a CR problem then you'll get a credit for the case, if it is a printer driver problem then no credit.
    Single Case Purcahse is: http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551
    Be sure to tell them it needs to go to the Report Designer team first.
    There is also a possibilty their driver has issue with Windows OS and the .NET framework. Crystal reports is also UNICODE compliant so the printer driver would have a better success rate if their driver was also unicode compliant.
    Bottom line is if it doesn't work in Crystal Designer it won't work in code either.
    Thanks again
    Don

  • Major Printing Problem - Can't Print in any App, with Any Printers

    I help my Aunt with her three Macs (2 eMacs, 1 MacBook, all running 10.4.8 right now) at her office, and she had me come to help recently because one of the eMacs stopped printing anything; here's what happens:
    In every app besides Word (e.g. Safari, TextEdit, AppleWorks, etc.): If I click File>Print... or press 'Command-P,' the cursor turns into the spinning rainbow for a few seconds, and nothing happens (meaning I can do anything I want in the application, as if nothing at all happened).
    In Word: If I click File>Print... or press 'Command-P,' Word sits for a minute with the spinning rainbow, then locks up and quits itself. BUT, if I click the little 'print' button in the toolbar (the one that bypasses the print dialog box), the file will print.
    I tried resetting the printing system, setting up different printers on the computer, printing over the network and over USB (directly connected to port 1 on the eMac), and re-downloading/installing the printer drivers for the Brother 5250DN laser printer AND the HP LaserJet 1200 laser printer, but all to no avail.
    I can run the Printer Setup Utility and recognize the printers (via Bonjour over the network and via USB), and the computer can run the printer setup utilities, so I know the printer communicates fine with the computer. I also can print to the printers (both the networked one and the Brother) from any of the other Macs (including my own laptop) over the network. But I can't get the print dialog box to show up for any printer on the one eMac.
    I'm determined that this problem lies within the OSX printing system, but reinstalling the whole OS is not an option, as I would have to re-setup all the software, user accounts, special network settings, etc. (even if I do an Archive and Install). Is there anything I can do??? (I seem to recall someone else having this problem, but I can't find that thread on the forum).

    There's another thread describing this same problem. I am having the issue too. As I posted in the other thread:
    "Well, I did a full Archive and Install, with restore user settings, and the thing still won't print! All apps crash when trying to print (except Mail.app, which is odd). So it appears all of the files required for printing are there since Mail.app works, but I still can't print from Safari, Firefox, Preview, TextEdit, etc etc. ARGH!!!!
    Next step is to downgrade to 10.4.8."
    If that doesn't work, I guess an Erase and Install would be th next step.

  • How to call a concurrent program with some parameters in a stored procedure

    Hi All,
    I have made two procedures, xx_nidhi_proc1 and xx_nidhi_proc2.
    xx_nidhi_proc1 takes four parameters from front end and is registered as concurrent program in oracle apps and running fine alone.
    xx_nidhi_proc2 calls the concurrent program of xx_nidhi_proc1 which is XX_NIDS_PROC1_PROG1.
    But the problem in my code is , It runs the second concurrent program for xx_nidhi_proc2 but shows the Inactive- No Manager status for my first concurrent program XX_NIDS_PROC1_PROG1,
    Please find out the error in my code...
    CREATE OR REPLACE PACKAGE BODY NIDHI IS
    procedure xx_nidhi_proc1 (errbuf OUT VARCHAR2,
    retcode OUT VARCHAR2,
    name_t varchar2,
    empno varchar2,
    doj date,
    desig varchar2) is
    begin
    fnd_file.PUT_LINE(Fnd_File.output,'/**************Start of the output **********/');
    fnd_file.PUT_LINE(Fnd_File.output, 'Name:'||name_t);
    fnd_file.PUT_LINE(Fnd_File.output, 'Number:'||empno);
    fnd_file.PUT_LINE(Fnd_File.output, 'DOJ:'|| to_char(doj, 'DD-MON-RRRR'));
    fnd_file.PUT_LINE(Fnd_File.output, 'Designation:'||desig);
    fnd_file.PUT_LINE(Fnd_File.output,'/**************End of the output **********/');
    errbuf:='SUCCESS';
    retcode:='SUCCESS';
    end xx_nidhi_proc1;
    --calls the xx_nidhi_proc1 as concurrent program.
    procedure xx_nidhi_proc21 (errbuf OUT VARCHAR2,
    retcode OUT VARCHAR2)
    is
    v_request_id number;
    begin
    fnd_file.PUT_LINE(Fnd_File.output,'/**************Start of the output **********/');
    fnd_file.PUT_LINE(Fnd_File.output, 'Deptartment Number:'||'Computer');
    fnd_file.PUT_LINE(Fnd_File.output, 'Location:'||'TCS Towers');
    fnd_file.PUT_LINE(fnd_file.output,'Starting XX_NIDS_PROC1_PROG1');
    fnd_global.apps_initialize(user_id => 1318 ,resp_id => 50578, resp_appl_id => 201);
    v_request_id := FND_REQUEST.SUBMIT_REQUEST('PO',
    'XX_NIDS_PROC1_PROG1',
    null,
    null,
    TRUE,
    'Nidhi gupta',
    138609,
    '12-Dec-2003',
    'ASE');
    commit;
    fnd_file.PUT_LINE(fnd_file.OUTPUT,'Request ID is '||to_char(v_request_id));
    fnd_file.PUT_LINE(fnd_file.OUTPUT,'End XX_NIDS_PROC1_PROG1');
    fnd_file.PUT_LINE(Fnd_File.output,'/**************End of the output **********/');
    errbuf:='SUCCESS';
    retcode:='SUCCESS';
    end xx_nidhi_proc21;
    Thanks
    Nidhi
    END NIDHI;

    Nidhi this might help u
    v_num_request_load_id :=
    fnd_request.submit_request (c_chr_application_short_name,
    c_chr_apl_short_name,
    NULL,
    NULL,
    FALSE,
    p_chr_allocation_view,
    p_chr_flow_type,     
    p_chr_operating_unit,
    p_dte_planned_from,          
    p_dte_planned_to,
    p_num_application_id,
    p_num_loc_seg1_id,
    p_num_loc_seg2_id,
    p_num_organization_id,
    p_num_responsibility_id,
    p_num_session_id,
    p_num_user_id,
    p_chr_arrival_status,
    p_chr_statuses,
    p_chr_locations,
    p_chr_transport_unit
    COMMIT;
    IF v_num_request_load_id = 0
    THEN
              o_num_stat := 2;
         o_chr_err_msg := 'Report could not be submitted';
    END IF;
              o_chr_err_msg := 'Request Id :' || v_num_request_load_id;
              v_boo_wait :=
         fnd_concurrent.wait_for_request (v_num_request_load_id,
    c_num_interval,
    c_num_max_wait,
    v_chr_phase,
    v_chr_status,
    v_chr_dev_phase,
    v_chr_dev_status,
    v_chr_err_buf
    IF v_chr_dev_phase = 'COMPLETE' /* 1.1 */
    THEN
    IF v_chr_dev_status = 'NORMAL' /* 1.2 */
    THEN
    BEGIN
    -- some your own logic
    EXCEPTION
    WHEN OTHERS THEN
         o_chr_err_msg := o_chr_err_msg||' Unable to determine Report File Path.';
                   o_num_stat := 2;
    END;
    ELSIF v_chr_dev_status = 'WARNING'                                             /* 1.2 */
    THEN
    o_chr_err_msg := o_chr_err_msg||' Report program completed with Warning.';
    ELSE                                                                                               /* 1.2 */
    o_chr_err_msg := o_chr_err_msg||' Report program completed with Error.';
    END IF; /* 1.2 */
    ELSE /* 1.1 */
    o_chr_err_msg := 'Report program Timed Out.';
    END IF; /* 1.1 */

  • Looking for a for an all-in-one printer that is compatible with greeting card programs..​.

    looking for a for an all-in-one printer that is compatible with greeting card programs...my original one was an HP PSC  1510...replaced it with a Deskjet 1050 & it does not work...any suggestions?

    I bought an epson xp650 a couple of months ago and cannot fault it. It does everything I require and it is the wifi model so I can print directly from my ipad/iphone. Not sure if you are asking about the colour of the unit or just to be able to print black and white, Obviously all printers will print black and white but just to give you a little more info the printer I bought is the white version and it looks really nice sat next to my imac 27''
    Hope this helps.

  • No printing :I can't print anymore, printing the same file with another programs is ok, printing form LR: Preparing  and Printing indicatorbar in the left hand upper corner are running, but no output at all rom my printer. I have been printing before. I u

    No printing :I can't print anymore, printing the same file with another program is ok, printing form LR (in the same system and printer of course :-) ): Preparing  and Printing indicatorbar in the left hand upper corner are running and completing, but no output at all to my printer. I have been printing before. Next I upgraded to LR5.7.1 but the problem stays. Perhaps some adjustment is changed by me unintentionally, but I have no idea. Does anybody know what to check? Printing to file is also strange,the canvas only seems to accept A4, and crops any image relative to that size, so a 10x15 cm print on 10 x 15 cm paper is cropped to 10x15/2. Anybody any idea? (system win 8.1 64, printer HP B8550)

    I accidentally solved my mystery.  For some reason it was set to "print to file".  I changed it to "printer" and now I am able to print.

  • I cant print with any printers at all...

    I try to print using my HP lazerjet 2200 and the computer recognizes the printer. However when i click print it sends the job to the printer and then it never prints. The Print icon shows up on the dock and then after 3 or 4 seconds dissappears. When i look at the printing queue its empty and in colpeted print jobs it shows that the document printed. Ive tried the reset printing system trick and that doesnt seem to work. Ive also tried the Printer Setup Repair program and that was no use either. Iv even deleted the printer from the computer several times and added it again and i still have no luck. How can i fix this problem?

    Ive even tried this with several other printers i have and none seem to work. However with my other mac and windows based pc's they work fine.

  • Photoshop Elements 12 no longer see's my scanner.  So I cannot scan my pictures, help.  Windows 8.1 with HP Officejet 6500A Plus printer.  Scanner works with other programs in my PC.  Problem is PS12

    So I cannot scan my pictures, help.  Windows 8.1 with HP Officejet 6500A Plus printer.  Scanner works with other programs in my PC.  Problem is PS12

    I bought the Officejet 6500A Plus about one month and have experienced the very same problem. I tried to remedy this problem following suggestions in a number of different posts (static IP, router, firewalls etc), all to no avail. Last week I called support. The support I received by the tech over several hours and different days for a week was very good. However none of his suggestions corrected the connection issue. After today's recommended fix failed, he advised HP is aware of this issue with the 6500 and other affected printers. He claimed HP was working on a firmware upgrade. He did not know when the update would be provided. The tech also claimed HP acknowledged this problem in a written announcement. He agreed to email the announcement to me. I haven't received it. This has been the only problem I've had with the 6500

  • Using Windows XP and Firefox 3.6.15 web pages print with some of the script as unintelligible weird looking script or maybe some kind of computer script. This doe not accure usingg IE 8.0 with the same printer.

    Using Windows XP and Firefox 3.6.15 web pages print with some of the script as unintelligible weird looking script or maybe some kind of computer script. This problem also occurs with the web page on which this question is submitted. This doe not occur using IE 8.0 with the same printer.

    These have nothing to do with Firefox.
    C:\ProgramData\FLEXnet\Connect
    \11\ISUSPM.exe
    and
    C:\Users\Vinegarhill-User Acc\Desktop\Malware Removal Programs\eXplorer.exe
    This one - C:\Users\Vinegarhill-User Acc\AppData\Roaming\Mozilla\Firefox\Profiles\ak4dv58c.default\extensions\ \components\afom.exe - is probably the '''AFOM - Memory Recovery & Retention For Firefox Only''' extension.
    https://addons.mozilla.org/en-US/firefox/addon/11922/
    My advice is to uninstall that extension. IMO, you have too many extensions installed, and are asking for problems with Firefox. I am not against using a lot of extensions in Firefox ''(I typically have 45 to 50 extensions installed, but the mix of extensions you have scares me as potentially problematic.)''

  • I  used to have an OLD Photoshop cd but it has been lost and my program is no longer on cd. I talked with some photographer friends and this is what one of them told me to get: Adobe Photoshop Lightroom and CS CC... HELP please?

    I  used to have an OLD Photoshop cd but it has been lost and my program is no longer on cd. I talked with some photographer friends and this is what one of them told me to get: Adobe Photoshop Lightroom and CS CC... HELP please?

    If you still have your serial number, look at OLDER previous versions http://www.adobe.com/downloads/other-downloads.html
    Otherwise, the US$ 9.99 plan is what is current at Cloud Plans https://creative.adobe.com/plans

  • Printing problem with some pdf files

    This problem is with Windows 7 and XP.
    When trying to print I receive the following error:
    "The Document could not be printed.
    There were no pages selected to print."
    I tried the print image button and same error. 
    This is Adobe Reader 10
    I have also tried saving to different files and still same problem.
    Thanks

    Hi!
    I've tested the issue again with Adobe Reader 10.1.4 on MS Windows XP Pro. SP3, MS Windows 7 Pro. SP1 32-bit and 64-bit with the following drivers:
    - HP Universal Printing PS package ver. 5.5.0.12834 (driver ver. 61.130.04.12834) for printing to HP LaserJet 4100 DTN (224 MiB of RAM) and HP Color LaserJet 4700dn (288 MiB of RAM)
    - Samsung Universal Print Driver PS ver. 2.03.09.00_41 for printing to Samsung ML-3051DN printer with 64 MiB of RAM
    Printing of the sample 6-page PDF file (https://workspaces.acrobat.com/?d=ojv64pOBncq6XxtSiRqSkw) is still slow because the document stays long in the Windows print queue. Here are the test results:
    - printing with the HP UPD PS driver - 120 sec.
    - printing with the Samsung UPD PS driver - 220 sec.
    When the same PDF file is printed in FoxitReader 5.4.4 the document stays in the print queue for only 15 sec.
    Enabling the Print As Image option in the Reader's Advanced Print Setup can help to some degree (it gives better kB/sec. ratio but it increases the size of the print job).
    I'd really appreciate it if developers at Adobe improved the Reader in order to solve the issue with the PS drivers.
    -- rpr.

  • Is there a plugin for CS6 that I need to download to get my HP Officejet 7612 Wide Format Printer to be compatible with my MacBook Pro that is running my CS6 program?

    Is there a plugin for CS6 that I need to download to get my HP Officejet 7612 Wide Format Printer to be compatible with my MacBook Pro that is running my CS6 program?

    HP Officejet 7612 mac updated drivers. You can download link.

  • Preview displays blank page with some pdf files but prints what is hidden

    Some of my pdf files have started coming up as blank in Preview. There still is data underneath, which selecting areas will disclose as though you are scraping white out off the print.  Printing is unaffected, and only some files are affected.  Tried repairing permissions, but no luck.  I recently did the OS update, and didn't notice the problem before that.  I have restarted the computer a couple times,.  a few odd artifacts have shown up on the screen as well, though box selecting over these causes them to disappear.  I haven't been able to find any consistent difference in the pdfs that will display properly and the ones that won't.  doesn't appear to be associated with when they were created or  which version of software they were created with.  Saving them under a different name doesn't help.  Adobe reader works fine, so it is specific to Preview ( which I would rather keep as my default reader )
    Any ideas what went wrong?  How to fix it?

    I have no trouble viewing the file you posted in the same version of Preview that you have.
    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Please take this step regardless of the results of Step 1.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • Is it possible UPLOAD a single printer from an LDT with a lot of printers?

    is it possible UPLOAD a single printer from an LDT with a lot of printers? by using FNDLOAD
    here we can
    download a specific printer definition, we need to follow the below syntax
    FNDLOAD apps/ 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcppinf.lct
    source_printer_def.ldt FND_PRINTER PRINTER_NAME=[printer name]

    Duplicate post -- migrate  printers, types, styles and drivers from an 11i to R12 instance us

  • My MG8120 won't print wirelessly from my MacBook running OS 10.9.5. Works fine with HP printers.

    My MG8120 won't print wirelessly from my MacBook running OS 10.9.5 (Mavericks).  It works fine with all of the other HP printers in the office.  Another user has the same problem with her PC running Windows 7.  And she, too, has no problems printing on the other HPs.  I or she cannot print to any of three Canon printers in the office. 

    Hi,
    Please try the following steps,
    Download every updates from Apple and HP
    Reset or Delete the printer from your mac (it may work trhough USB)
    Reset all settings into default settings on your printer
    Turn off or unplug mac, printer, modem, router
    Plug everything and reboot all
    Reconnect the printer to home wifi network and mac also reconnect to the correct network
    I work for HP. I am speaking for myself and not for HP.
    Say thanks by clicking the Kudos Thumbs Up in the post.
    If my post resolved your problem, please mark it as an Accepted Solution

Maybe you are looking for

  • WRT54G2 internet setup is not saved

    Trying to modify internet connection type using the basic setup, but changes are not saved: 1. On basic setup page - switch from DHCP to L2TP - page refreshes 2. Fill in L2TP account info and click "Save Changes" 3. Page waits for refresh, in the mea

  • Can we only year value from "0FISCPER" (Fiscal Year/Period) at BEx level

    Hi all, I have two time characteristics "0FISCYEAR" (Fiscal Year) and "0FISCPER" (Fiscal Year/Period). In DSO initially "0FISCPER" was there and later request came to add "0FISCYEAR". Now data in char. "0FISCPER" is since beginning (from 2000) and fo

  • Regarding SECATT Tool

    Hi, I have a issue related to <b>SECATT</b> Transaction. Actual issue here is i need call <b>SECATT</b> TCODE From my program to execute my test scripts. <b>SECATT's</b> program is <b>SAPLECATT_MAIN</b> which is of type <b>function pool</b> how can i

  • Authority check in MI10

    Hello, I need a object of authority in order to check the transaction MI10 for store location. I check the standard objects of this transaction, don't check for store location, only for plant. Is there any way to check transaction MI10 for store loca

  • Deployed, and wanted contract terminated.

    I called Verizon about a month ago to terminate my contract because I'm deploying, i provided all the necessary information they required to process the request, but when i checked to make sure it was I noticed they just suspended it and didn't termi