Print dialog not displaying when trying to print PDF document

Hello All,
I am using below code to print a pdf file. And the same code working fine when i am using with simple java class. and if i am using the same code with my jsf backing bean action method it was not working.
Code here:
Document document = new Document();
FileOutputStream combinedOutput = new FileOutputStream(bulkBarcodes);
PdfWriter.getInstance(document, combinedOutput);
document.open();
String barCodeNum = filetrakcode.getBarCodeID().toString();
Barcode bc = new Barcode(barCodeNum, DEFAULT_CONFIG_FILE);
document.add(new Paragraph("\n"));
document.add(new Paragraph("\n"));
Image image = Image.getInstance(bc.generateBarcodeBytes(bc.getBarcode()));
document.add(image);
combinedOutput.flush();
document.close();
combinedOutput.close();
File f = new File(bulkBarcodes.getAbsolutePath());
FileInputStream fis = new FileInputStream(f);
FileChannel fc = fis.getChannel();
ByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
PDFFile pdfFile = new PDFFile(bb); // Create PDF Print Page
PDFPrintPage pages = new PDFPrintPage(pdfFile);
PrinterJob printJob = PrinterJob.getPrinterJob();
PageFormat pf = PrinterJob.getPrinterJob().defaultPage();
printJob.setJobName(f.getName());
Book book = new Book();
book.append(pages, pf, pdfFile.getNumPages());
printJob.setPageable(book);
//Send print job to default printer
if(printJob.printDialog())
printJob.print();
When i am calling my action method (method contains above code) it was creating pdf file and writing the data init success fully but when i have not used "if(printJob.printDialog())" it was printing document directely successfully but when i am calling "if(printJob.printDialog())" it was not opening print dialog box and it was showing me like process is going on and it was not proceeding further
what's the problem
Please help me.
Thanks In advance,
Indira.

Hi Kavi,
just have a look into the driver-program. I'm pretty sure someone has programmed a loop.
IF it is a NAST-driver program, check if your specific user has a printer SU03. That sounds a lot like this mistake
~Florian

Similar Messages

  • Why is there suddenly an error message when trying to download pdf documents online: "cannot export document"

    Why am I recently receiving an error message when trying to download pdf documents from the web? The message reads: "cannot export document" I've updated Adobe and all software updates are current. The first indication of a problem was when I opened a pdf that I thought downloaded, but the file is blank. Now that doesn't even happen. Any help would be tremendously appreciated! Thank you, KB

    I know man what your saying. I should have written it down when it happened last night. I figured if anyone had had the same issue they might know the reason. I'll try doing a test recording today and see if the same issue arises. Meanwhile, if anyone has this happen to them please let me know. Thanks

  • Hello, the "sign" feature does not show when i open a pdf document with reader (MAC)

    Hello, the "sign" feature does not show when i open a pdf document with reader (MAC)

    Hi mentane,
    Thank you for posting on the Adobe forums, what is the version of Adobe Reader you are working with.
    Open Adobe Reader>Adobe Reader>about Adobe Reader.
    Thanks,
    Vikrantt Singh

  • Oracle Table Values are not displayed when tried to display with Essbase

    Hi,
    I was trying to create a report with Oracle RDB Table and Essbase by following the steps given in "Federating Essbase and Relational Data Sources in Oracle Business Intelligence Suite Enterprise Edition Plus" document at the location http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/fed_data/fed_data.html.
    I am able to see the members from the Essbase cubes and I can also see the Oracle Table values, if they are displayed individually (i.e. different reports) but when I try to get one report with Essbase values with Oracle table records then Oracle table records are not displayed and when see the query log I don't see the query for Oracle table but I see obviously MDX queries for the essbase.
    Please help.
    Regards,
    Paresh

    Hi,
    Smitha, you can defnetly use dynamic table in interactive form. I had similar problem and I acheived like follwing:Basically you have to bind the table .
    If you want to have fixed number of rows in the interactive form, then in wddoinit method bind the internal table to ur table node. for exmaple: if u want 2 rows in the form loop times . So by default when you open the form you will get two rows for the table.
    **************BIND THE ITAB ****************************
    DO 2 TIMES.
    APPEND LW_LFBK TO LT_LFBK.
    CLEAR LW_LFBK.
    ENDDO.
    CALL METHOD lo_nd_t_lfbk->bind_table
    EXPORTING
    new_items = LT_LFBK.
    If you want to have dynmic table then take a submit button in the form instead of normal button,
    in onaction submit write a loop every time you click that new submit button it should add a new row.
    use above coding in onactionsubmit instead of doinit.
    Thats it.
    Regards,
    Ravi

  • About Webhelp  - Dialog not displaying when clicked in IE11

    Hi,
    Using RH10 with latest patches installed to fix IE10/11 issues.
    Genereated our merged webhelp and tested it using IE11. Noticed that the 'About Webhelp' dialog does not appear when I click it. It works correctly in IE10.
    Has anyone else seen this?
    Dominic.

    Hi Dominic
    This would be the first report I've seen of it. Unfortunately, this probably means that you are likely in the minority of folks that actually use this functionality. As a result, if IE 11 broke it (and it would appear it has) it probably hasn't yet found its way onto Adobe's radar to fix.
    I would heartily encourage you to report this as a bug to Adobe via the link below:
    http://www,adobe.com/go/wish
    Cheers... Rick

  • 1014:1014: error I keep getting when trying to open PDF document from online source.

    need help trying to resolve 1014:1014 error when I open online PDF documents

    Hi Christoph,
    The problem is elsewhere, I asked the user to log in at a different workstation and she is able to display documents from SAP at another PC. So the problem is not in SAP but either with the SAPGUI or in Windows...
    I requested a SAPGUI reinstall, we'll see whether that solves the problem.
    But it is certainly not related to DMS.
    Thanks,
    Krisz

  • Smartform does not display when trying to suppress print dialog

    this is related to my other thread. But that was solved and this is another problem.
    When I provide values for control_parameters and output_options to suppress the print dialog (no_dialog = 'X', tddest = 'LOCL'), the print preview does appear at all.
    When I try to remove them, the print preview is ok. (I have device LOCL)
    Has this ever happened to you?
    Kyle

    Hi  ,
    This will be happen when the LOCL printer(Default) is configured  in SAP 
    Check your user settings   in su01  Defaults Settings - uotput device
    Let me know if any concerns......

  • Printer not present when trying to connect even though drivers have been installed

    printer not present when trying to connect even though drivers have been installed

    Hi Marc,
    If you are having issues with printing from your iMac I would suggest that you troubleshoot using the steps in this article -
    Mac 101: Printing (Mac OS X v10.6)
    http://support.apple.com/kb/HT3771
    Specifically -
    Troubleshooting steps you can use if there is an issue
    Ensure the printer is connected, has power, has ink / toner, paper, and no alerts on its built-in display.
    Network based printers should be on the same subnet; you shouldn't have to worry about this if your printer is on your home network.
    Use Software Update for the latest available updates.
    Delete the affected printer from Printer & Fax System Preferences, then re-add the printer.
    If the issue persists, try these additional steps:
    Reset the printing system (see below). Then, add the printer again.
    If the issue persists, reset the printing system again.  Download and install your printer's drivers from here. Then, add the printer again.
    If the issue still persists, contact the printer vendor or visit their website for further assistance.
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • Newest Adobe Reader not working with 8.1 IOS...Adobe icon does not show when pdf docs are saved...also printing pdf documents take forever.  I uninstallled and reinstalled...issues continue

    Latest AdobeReader not working properly with 8.1 IOS...Adobe icon does not show on saved PDF's and printing from PDFs takes forever. I uninstalled and reinstalled latest Reader

    zoer1,
    Adobe icon does not show on saved PDF's
    Would you provide more details about the problem?  A screenshot would be helpful.
    The following FAQ document describes the steps to add a screenshot to your forum message.
    How to add a screenshot to a forum message from iPad/iPhone
    Regarding printing PDF documents...It depends on the PDF document that you are trying to print.  In general, it will take longer to print more complex and larger PDF documents.
    If you are willing to share your PDF document (that takes forever to print) with us at [email protected], we can test it with the same version (11.6.3) of Adobe Reader on different iOS versions (iOS 7.x vs. iOS 8.x).  Please include the link to this forum (https://forums.adobe.com/thread/1616231) in your email message for reference.
    Actual printing is handled by iOS (not by Adobe Reader) via AirPrint over Wi-Fi connection.  We've heard from other users about iOS 8 Wi-Fi connectivity problems.
    You may also want to search for similar issues on Apple Support Communities.

  • HT5364 I installed OX X Moutain Lion and now I have trouble printing pdf documents--get messages like "plug in failed" or "no pages selected on printer" when clearly pages are selected

    I installed OS X Mountain Lion on my desktop MAC and since then I cannot print pdf documents---I get messages like "plug in failed" or sometimes "no pages selected on printer" when clearly pages are selected

    DO NOT USE PREVIEW TO FILL OUT PDF FORMS, IT WILL DESTROY PDF FILES. Sorry, but I had to shout here to prevent damage to your PDF files.
    Here is one of the symptoms when you fill out a PDF form with Preview: If you save it and return it to the author, they will not be able to see the text that you've added to form fields - unless they click on a field, which will reveal the contents of just that field. You can recover from this problem, but Preview will also remove other field types, and will actually rewrite your complete PDF while ignoring what it does not understand. Take a look at this blog post for more information about the damage that Preview will cause: Preview.app - Killer of PDF Files

  • Help topics are not displaying when using Windows 7 / IE 9 / RH10

    We recently upgraded our library from RH8 to RH10.  Also used a trial version of  RH9 in this process. Now when we compile several of the projects have issues where help topics do not display when selected in the TOC or when a link to the topic is clicked within another internal topic. It is in a continous loop in the browser (like it is trying to load).  If you right-click on the topic it displays (we are currently using this as the work-around).  Anyone else having this problem?? I saw something similiar for Windows8/IE10, but the fix does not apply here (http://forums.adobe.com/message/5138909#5138909#5138909).

    Hi,
    I (April) apologize I have been OOO and have not been able to respond to your replies.  
    Let’s start over. 
    We have an issue where help topics do not display when selected in the TOC or when a link to the topic is clicked within another internal topic. It is in a continous loop in the browser (flickering like it is trying to load). If you right-click on the topic it displays (we are currently using this as the work-around).
    We use Windows 7, IE9 and RH10 for all our projects. (Recently upgraded from RH8 to RH10)
    Turns out the problem is not isolated. I have run across it in at least one other project, which leads me to think it also occurs in others.
    "Does this only occur when the help is called from your software? Is it OK if you double click the start page?"
              No. I it ALSO occurs when launched from the start page. 
    Have you tried deleting the CPD file and reopening Rh and the project?
              Yes, without success.
    Are you using any redirects?    
              Per (Adrienne), “I am not using any redirects. I encounter this issue only in IE. If I paste the .htm into a Firefox browser, the help displays as it should.” 
              I will add that the project also displays incorrectly in Google Chrome.
    Thanks  April

  • When I open a PDF document and select print, Adobe stops working and closes.  How do I correct this?

    When I open a PDF document and select print, Adobe stops working and closes.  How do I correct this?

    Hi tbytrzll,
    In order to help you better please let me know below mentioned information:
    - Operating system version and name.
    - Version of Adobe reader.
    - Have you tried to update the Reader and if you are trying to print using any other application what is the result.
    Have you tried any steps to resolve the issue.
    Regards,
    Ajlan Huda.

  • Keep getting Disc Burner or software not found when trying to burn a CD

    I am not able to burn a playlist to a CD and get an error at the top of Itunes window "Disc Burner or Software Not Found". I have been able to burn CDs in the past with this same computer but had some issues with songs in itunes. Support had me uninstall Itunes and reinstall. I have also uninstalled the device in the device manager and re-installed it. I really don't know what to try except to ask for help here. I would appreciate any direction I can get. I have a Dell desktop XPS running on Windows 8.

    Hi daurel, 
    Thanks for participating in the Apple Support Communities. 
    It sounds like you receive the error "Disc Burner or Software Not Found" when trying to burn CDs. You mention that you've already tried removing and reinstalling iTunes, and other drivers, and these are good steps. 
    If the situation continues, be sure to try the tips in this article:
    iTunes for Windows: Optical drive is no longer recognized, or "Disc burner or software not found" alert after install - Apple Support
    Sincerely,
    Jeremy 

  • Not able to open PDF or do any changes even if the PDF opens. Run Time Error is shown every time when trying to open PDF. Please help

    Hi,
    Not able to open PDF or do any changes even if the PDF opens. Run Time Error is shown every time when trying to open PDF. Please help

    Hi Shilpa ,
    Please refer to the following link and see if that helps you out.
    https://helpx.adobe.com/acrobat/kb/runtime-error-roaming-profile-workflows.html
    Are you trying to access the PDF with Acrobat or Adobe Reader?
    Regards
    Sukrit Dhingra

  • Why is it when I add photos from iPhoto onto an iMovie project, it is not displayed when I play the movie from beginning to end, although I can see it in the (edit) format?

    Hi everyone,
    I'm just wondering why is it that when I place an image from iPhoto to an iMovie project, it is not displayed when I play it from beginning to end in fullscreen playback mode? However, when I exit it on the timeline, it is shown. All I did as drag it from the iPhoto column and place on at the beginning. I would really appreciate someones help because I really need to be able to place images onto my projects. Thanks!

    Sounds like your talking about iMovie for Mac?
    This is the iOS version, repost here:
                                                      iMovie

Maybe you are looking for

  • Can home share music from my iTunes on the computer with my iPad?

    How can I share my iTunes library on my windows xp computer with my windows 7 computer and my iPad (first generation)?

  • Executing  bapi function module in simulation mode....

    I wanted to create 5000+ users in the system. I am using bapi_user_create1 to create user.Before actually creating all the users i need to simulate and see how many users will be actually created when i supply the set . Also please let me know if the

  • Query in export on vms

    greetings: could any1 help me with the syntax for using a query in an oracle817 export sitting on openVMS operating system?

  • Weblogic Portal Server interrupted abruptly error

    hi, i have an issue with weblogic portal server 9.2, At times my workshops get hang and i have to kill the weblogic portal server instance, the next time i start the workshop and try to start the weblogic portal server it gives error either that ther

  • Starting DB

    Hi I have been trying to install  SAP NetWeaver 2004s - TestDrive on Fedora C10 and the kernel version is 2.6.27.9-159.fc10.x86_64 I installed the s/w but could not start the DB. My xuser list is n4shost:n4sadm 6> xuser list     XUSER Entry  1