Printing an iframe with pdf using javascript is not working in IE8 and above

I have a problem with printing and Iframe with PDF in IE 8 and above
Following is my javascript:
var urlValue="";//Path of the file to be printed
var div = document.getElementById("printerDiv");
div.innerHTML = '<iframe src="' + urlValue + '" id="frame" name="frame" style="width:100%;height:100%;"></iframe>';
frame.focus();
frame.print();
This same thing is working fine in other browser but for IE is just not invoking the print dialog.
Also I tried to get the frame.print(); on load of the frame but even that is not working exactly as that way it print the parent window in output.
Few things I tried like:
1) div.innerHTML = '<iframe src="' + urlValue + '"
onload="this.contentWindow.print();"></iframe>';
2) frame.contentWindow.focus();
frame.contentWindow.print();
3) window.document.getElementsByTagName('iframe')['frame'].onload = (function () {
frame.focus();
frame.print();
I need to get the print of only the content which is in Iframe which I am binding in "printerDiv" by javascript.
Any perfect/different solution from which I have tried then please post here?
Thanks.

PDF documents are hosted in an ActiveX or netscape plugin control which have their own printing functions.
Start>Adobe Reader>Edit>Preferences - to adjust what functionality the PDF document viewer addon displays (menus etc).
Tools>Manage Addons>Show all addons
make sure you have both the x86 and x64 versions of your PDF reader Active X control installed and enabled. I would recommend also that you update to the latest version of the vendors' (Adobe?) plugin.
Possibly you have disabled scripting of ActiveX controls in the IE security zone that your parent page maps to. Also there is an IE security zone feature that prevents navigation to a domain in a zone of lower integrity.
Tools>Internet Options>Security tab, click "Reset all zones to default".
when asking developer related questions it is helpful if you can include a link to your website.
Rob^_^

Similar Messages

  • How to get page number from the PDF using Javascript

    Hi,
    We are having list of Single page PDF. The pdf are named in the order,
    ISBN_Author_01.PDF  (with real page number as i)
    ISBN_Author_02.PDF  (with real page number as ii)
    ISBN_Author_03.PDF  (with real page number as iii)
    ISBN_Author_04.PDF  (with real page number as 1)
    ISBN_Author_05.PDF  (with real page number as 2)
    ISBN_Author_06.PDF  (with real page number as 3)
    ISBN_Author_nn.PDF  (with real page number as 500)
    Here each pdf has a page number and in sequential order.
    The task is to check whether all the pdfs are in sequential order (i.e i, ii, iii, 1, 2, 3). If any page is missing, the script should throw an error report.
    To do this task, I am writing a Javascript to get the real page number from the PDF.
    Can anybody help me how to get the page number from the PDF using Javascript.
    Thanks,
    Gopal

    The "real" page number within a PDF is the count of the physical page starting at 0, zero.
    pageNum numPages
    The number printed on each page is the page label.
    setPageLabels  getPageLabel
    You will have to open each PDF and your script would need to know the page label for that file. I would expect you would need to build a 2 dimensional  array of the file names and the page label for the page within that array.

  • How to hide a table row in pdf  using javascript?

    How to hide a table row in pdf  using javascript?

    This is only possible with LiveCycle Designer forms, not PDF forms created
    in Acrobat.

  • How to get image properties in PDF using javascript or plug ins

    Hi
    How to get the image(all the images) properties in PDF using javascript or suggest plug ins
    Thanks in Advance

    HI,
    In the PDF Edit API's ( as has already been suggested) there is the PDEImage and using this you should be able to find out everything you need to know about any image in a PDF file.
    I would recommend starting with PDEImageGetAttrs
    Hope this helps
    Malcolm

  • How to change the print page setup in IE using javascript

    dear all,
    I want to take print out envelope paper size, so i want to chnage the page setup in IE
    i want to change the print page setup in IE using javascript

    I think, you can do this using CSS.
    http://support.sas.com/rnd/base/ods/templateFAQ/Template_csstyle.html

  • How to print a string with out using main method??

    how to print a string with out using main method??
    if we can tell me with example?
    thanks in adavance
    raja

    Hi,
    actually there's none. The UITableView class needs to "know" the tableView's height so either it can calc <number of rows> times <row height> or it has to sum the height of each single row.
    If the row which needs to be of different size always is the first or the last row you can user a tableHeader or tableFoot view.
    Regards
    Dirk

  • How to get image properties in PDF using javascript

    Hi
    How to get the image(all the images) properties in PDF using javascript?
    Thanks in Advance

    Hi
    Thanks for your quick response. Any recommended plug ins
    Thanks in advance

  • I want to print form directly with out using spool request

    hi,
            i want to print form directly with out using output type screen (spool request or print preview ) , i want to supress the screen and get output directly to the printer. plz help me
    thanks&regards
    praveen

    Hi Praveen,
    In your program, where you are calling the OPEN_FORM function.. pass the name of the printer in the 'DEVICE' parameter of the function module..
    Also, there is a parameter OPTIONS of sturcture ITCPO in the same function module.. in this parameter you will find lot of options to set properties for the printing..
    There will be one field for immediate printing, set that field to 'X' and other settings for print in the same structure and pass to the function module..
    Thanks and Best Regards,
    Vikas Bittera.

  • Finding text in a PDF using preview has stopped working (correctly)

    Finding text in a PDF using preview has stopped working (correctly).
    When I search for certain words in a PDF using preview, it correctly finds all the pages in the document with that word.  However, it no longer highlights the word being searched for.  I have looked through the various settings and cannot figure out how to turn this back on.
    Thanks.

    4Shared worked, but having to register to retrieve files from there is a nuisance.
    The problem is that you use special graphic state operators inside text objects which is not allowed:
    BT
    /printmatic_F1 58.133398014634 Tf
    q
    /DeviceCMYK CS
    1 1 1 1 SCN
    /DeviceCMYK cs
    1 1 1 1 scn
    0.62060289801053 w
    0 J
    0 j
    2.189349112426 M
    0 Tr
    /printmatic_F1 58.133398014634 Tf
    1 0 0 1 86.448306387737 264.65046258267 cm
    (t) Tj
    Q
    q
    /DeviceCMYK CS
    1 1 1 1 SCN
    /DeviceCMYK cs
    1 1 1 1 scn
    0.62060289801053 w
    0 J
    0 j
    2.189349112426 M
    0 Tr
    /printmatic_F1 58.133398014634 Tf
    1 0 0 1 102.60939103581 264.65046258267 cm
    (e) Tj
    Q
    q
    /DeviceCMYK CS
    1 1 1 1 SCN
    /DeviceCMYK cs
    1 1 1 1 scn
    0.62060289801053 w
    0 J
    0 j
    2.189349112426 M
    0 Tr
    /printmatic_F1 58.133398014634 Tf
    1 0 0 1 134.93156033194 264.65046258267 cm
    (x) Tj
    Q
    q
    /DeviceCMYK CS
    1 1 1 1 SCN
    /DeviceCMYK cs
    1 1 1 1 scn
    0.62060289801053 w
    0 J
    0 j
    2.189349112426 M
    0 Tr
    /printmatic_F1 58.133398014634 Tf
    1 0 0 1 163.99825933926 264.65046258267 cm
    (t) Tj
    Q
    ET
    Have a look at the PDF specification ISO 32000-1:2008 (e.g. at http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf). Table 51 shows that q, Q, and cm are special graphics state operators, and Figure 9 illustrates that these operators, therefore, are not allowed in text objects, i.e. between BT and ET.

  • Windows Server 2012 - Printing using UNC path not working

    Hi,
    I have a problem printing using the printer's UNC path ("\\Server_Name\Printer_Hostname") to work with a web
    app hosted on IIS 8. With a windows forms application the UNC path is working fine and the app prints.
    With
    the web app I receive an error "The data area passed to a system call is tool small". 
    Also,
    in the event viewer under Applications and Services Logs -> Microsoft -> PrintService -> Operational, I receive the error "The print spooler failed to reopen an existing printer connection because it could not read the configuration information
    from the registry key S-1-5-82-1980832875-2702362896-1795126167-3622310632-1152289074\Printers\Connections. The print spooler could not open the registry key. This can occur if the registry key is corrupt or missing, or if the registry recently became unavailable."

    I have contacted IIS forum support.
    Please review the link: http://forums.iis.net/p/1213109/2079229.aspx?Re+Windows+Server+2012+Printing+using+UNC+path+not+working
    Their final response:
    Printing from ASP.NET using System.Drawing.Printing itself is a horrible approach, as this namespace was designed for Windows Forms only. The designers did not take everything about ASP.NET in mind, so any issue can happen. That can answer why the HP model
    works while the Samsung fails, as the HP one just "happens
    to work",
    http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx
    Similarly, System.Printing was designed just for WPF.
    About which printing API to use in ASP.NET/IIS, there is no clear answer so far. Thus, your only resource is Microsoft support, who can perform further analysis (with their dedicate utilities and of course Windows source code) and might come across a solution
    to help you out. This is not a trivial scenario.

  • I have trouble with hotmail because javascript does not respond! How do I fix

    Whenever I use hotmail on firefox, my e-mail get hung up because java script does not respond. How do I fix this.

    This is the situation with Snow Leopard and existing iCloud accounts:
    You will be able to access email and calendars on the iCloud website at http://icloud.com provided your browser is reasonably up-to-date.
    You will not be able to sync contacts or bookmarks from a pre-Lion Mac.
    You will be able to enter the server settings for email manually in the Mail application and access your email.
    You will not be able to sync your calendars directly.
    Some people have been able to set up calendar syncing by using the method detailed here - this is an unsupported hack and may not be reliable, and may stop working at some future point.
    Address Book won't sync: this page has a convoluted hack to make it sync which has been reported as working (and as not working by others). I've not tried it.
    There are a couple of alternative syncing services you might like to consider, though they're not particularly cheap:
    Soho Organizer can sync Calendars and Contacts with iCloud on Leopard, Snow Leopard and Lion. A single user licence (multiple machines allowed) is $99.99.
    Fruux syncs Calendars, Tasks and Contacts beetween a wide variety of devices (not using the iCloud server) including Snow Leopard and above, Windows Outlook and Thunderbird, Linux Thunderbird, and iOS and Android devices - see their compatibility chart (click the blue 'i' for a caveat about Snow Leopard). It's free for one user, two shares, two devices; above that pricing starts at €4 per month.
    (I have no connection with these firms and have not tried Soho Organizer, though both have had good reports and I've found Fruux to work well.)

  • Using osx javascript is not working in firefox, ebay

    I am using osx mac, javascript is not working, even though it is enabled in Firefox preferences.
    == URL of affected sites ==
    http://ebay

    Problem still exists in Firefox 5.0 and OSX 10.6.8
    It was a fresh install of Firefox 5.0 so no extensions. And Javascript IS enabled in preferences.
    Sites work fine in Safari.

  • System wide PDF presets location is not working in CC

    On both Mac and PC, the system wide location for PDF settings (.joboptions) does not work anymore.
    /Library/Application Support/Adobe/Adobe PDF/Settings (on a Mac)
    It is illogical to remove this feature. Even if that folder does not store the main default presets, which are now stored in each application, it still needs to be looked at and loaded from. It's actually illogical to store the same preset in multiple locations (i.e. each application). If there is a preset that is only for a certain application (e.g. Illustrator Default), this could be put in the application folder, but all others like High Quality, Prepress, PDF/X should be in a central location, i.e. where they used to be.
    I know that each user can manually load into their own PDF presets, which then do appear in all suite apps, but this has to be done every time a new user logs into a computer.
    The central location meant that all suite apps would see a custom set of presets automatically across the entire suite and across multiple versions of the suite. The other advantage to the central location is that the presets would appear in square brackets, in other words read only, so they cannot be changed by the user without saving as a new file.
    Having users manually load and be able to change the presets kind of defeats the purpose of having a preset, certainly in our environment, where we need these settings to be consistent across all apps, all computers and all users.
    Please put this feature back or at least honour the central location that used to be used.

    Hi,
    As per the description, I understand that your Office 2013 cannot open files through a network share directly.
    I would like to know that how many clients/users are affected by this in your environment. It could be some specific user account settings, that the Office applications are being affected by.
    I'd first suggest you try with a new Windows user profile, then verify result.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Adobe Reader XI and Adobe Reader X Pro (Editable PDF Combobox Search is not working properly.)

    I have created Editable PDF using itext(5.3.0) in java. I have used Adobe Reader XI and Adobe Reader X Pro.  But in editable PDF combobox search is  not working properly.
    It's only search first character.

    My (admittedly old and slow) system did this too the first time I opened Reader 11, but it "unfroze" after about fifteen seconds, (an eternity in computing time, I know, but it did eventually open all the way) What you're seeing on the right is the "Tools" panel initializing. That's exactly where mine would freeze up on starting. Once it did finally open fully, I clicked the "Tools" link at the top to close the panel, and I opened and viewed a document that way, then closed reader. Now when I open Reader, the Tools panel doesn't initialize and it opens immediately.
    Reboot and before you open anything else, open Reader. When you open it, DO NOT try to do anything with it until it fully opens, don't click anything, don't try to switch to another app. Give it time to open fully, and then click the Tools link to close it. Then, open and view a document, and close it. Close Reader and reopen it. the Tools panel should remain closed and Reader should open fully immediately.

  • PDF Preview Handler is not working

    I am using Windows 7 32-bit with MS Office 2010 Professional.
    In 'My Documents' I have files associated with .pdf but it is not showing me any previews.
    I can go to another PC and I don't have that issue. For example if I am in explorer and
    have my pdf files listed it wouldn't allow me to preview.

    Nope, using 32-bit. And I recently uninstalled Acrobat Pro completely and reinstalled it due to an issue with it not updating due to having the "Error Applying Transforms" issue. After I reinstalled, I updated it completely. I suppose I can try uninstalling and reinstalling again, but that seems like overkill.
    - Merg

Maybe you are looking for