AIR and PDF showing/silent printing

Is there a way of showing PDF in an AIR application? What about PDF  silent printing?
Thanks for any ideas.

update: using the javascript injection method described in the links above works fine with dynamically created html elements, and will launch the print window for multiple pdfs ..  Below is my jquery code, it's quick and dirty but it works...  I've got a button with the ID #print_list in my html file and a div with the id #pdf_holder to hold the objects.  There is a dynamically created list of links in teh #pdf_target div.
The callPdfFromJavascript() function assumes that the pdf has the corresponding javascript already loaded.  I have modified this function slightly to include the increment variable allowing each object to have a unique ID.
See link posted by chris above for the function that goes in the pdf.
I still need to figure out how to do this without the objects appearing but getting this far makes me happy
$(document).ready(function() {
     if(air.HTMLLoader.pdfCapability == air.HTMLPDFCapability.STATUS_OK) 
          air.trace( "PDF content can be displayed" );
          //print button
          $('#print_list').click(function() {
               var i='1';
               $('#pdfdad_target a').each(function() {
                    var pdfLink = $(this).attr('href');
                    var pdfObjectHtml = '<object id="PDFObj'+ i + '" data="'
                         + pdfLink + '" type="application/pdf"></object>';
                    $('#pdf_holder').html();
                    $('#pdf_holder').append(pdfObjectHtml);
                    air.trace(i);
                    //send message to pdf to print
                    callPdfFunctionFromJavascript('Print', i);
                    i++;
     else 
          air.trace("PDF cannot be displayed. Error code:", HTMLLoader.pdfCapability);
//function that sends print command to pdf
function callPdfFunctionFromJavascript(arg, i){
     air.trace('got this far');
     var pdfObjectId = "PDFObj" + i;
     pdfObject = document.getElementById(pdfObjectId);
     air.trace(pdfObjectId);
     try {
          pdfObject.postMessage([arg]);
     catch (e) {
          alert("Error: \n name = " + e.name + "\n message = " + e.message);

Similar Messages

  • E Mail documents and PDF documents are printing incorrectly.

    Any document that I print directly from my email is printing off way too small.  I checked all of my printer settings and they are okay.  What next?  I feel this has to be directly related to the Email App.  Even PDF files are printing off incorrectly, no matter what adjustments you make in the PDF settings boxes.  How do I fix this?  I am so frustrated, and I have wasted a ton of paper trying to get this right. PLEASE HELP ME!

    Did you try either printing from the browser File menu, or downloading the items to your computer and then printing from there?

  • Imported documents (jpg and pdf) showing up negative photos

    I am putting together a newsletter in Pages '09 (v 4.3). From time-to-time, when I import a JPG or PDF that has a photo in the document, the photo reverses itself and becomes a negative image. Any ideas on how to fix this?
    Running OSX 10.8.4
    Thanks!

    I think I may have solved this.... I am not sure which of these steps did it or if it really requires all of them, but this worked for me (well pretty much...)
    My theory based on observations above was maybe the system photo library was still somehow set to the old iPhoto one and I needed to force it to update. So, I created a new photo library by starting up photos with 'option' held down. I added a couple of photos to it, and in photos preferences on my mac set it to be the system library. I then started iTunes and synced it to my iPhone - the photos in the new library appeared on the phone. I then quit photos and iTunes, restarted photos with 'option' held down and this time selected the 'proper' photos library. I set it to the system lib in photos preferences. For good measure I also cleared the iPod photo cache in this library (detailed instructions for all of these steps were just taken from online help).
    Now when I restart iTunes and resynced, all worked!!
    The only outstanding issue is for some reason a seemingly random collection of old photos from years ago are being synced too, despite the fact I told it to just do the last 12 months in iTunes. Still much better than before!

  • How do we download adobe air and pdf desktop app

    How do I save a Power Point document as a PDF?

    To convert a PowerPoint file to a PDF, you'll need either our CreatePDF service or our desktop application, Adobe Acrobat.

  • Silent print a PDF from a web page using Flex. We are targeting Windows and Mac with Arcobat reader installed

    We are planning to Silent print a PDF from a web page using Flex. We are targeting Windows and Mac with Arcobat reader installed. I have tried using the AIR appliaction and it worked, But our requirement is NO INSTALL to the user machine for the silent printing. It is just from web page and silent printing to the default printer to the desktop/Laptop. Can anyone share your thoughts and experience with us. It will be very helpful..
    For AIR : I tried the thread Re: AIR and PDF showing/silent printing

    Hey CodeMonkey & Ross,
    Did you either of you ever find a solution? I'm stuck too, it seems I can get remote printing on all these PDFs to work but it just prints a blank page since I've been using Javascript in the browser, not Adobe's (they are Engineering drawings that I do not have permission to edit so I can't just insert code into them but I need to make work instructions). I've been scouring the internet for hours now, it seems that this thread is the only relevant/useful one at this point. No one else was trying to achieve this for similar reasons to mine.
    Thanks guys,
    Lox

  • Can't make pdf and getting ready to print very slow

    I am using ID CS4 with Windows 7.  CS4 includes Acrobat 9.  I want to create a pdf file of a business card design.  When I chose Print and pdf as the printer, there is a very long pause.  Finally a windows says "Printing" and then a message "Downloading procset."  At this point the process is frozen.  I can go to Task Manager and it shows ID not responding.  No pdf file is produced.
    What's the solution?
    And while I mentioned the long pause above, that pause is very long if I want to print from my Officejet printer.  The document will print, but it seems like a much longer pause that should happen.
    Vaughn

    Good question.  That's the way I've done it before, but if export is the recommended way, I'll try that.

  • I have an IPad Air and a Lexmark Pro  P205 which is connected wireless to my HP Desktop. How can I get my Ipad to print from my Lexmark ?

    I have an Desk Tp HP. On necked wireless to a Lexmark Printer Pro P 205 .   Several months ago I also got an IPad Air and  would like to print from my Ipad .  Must  I buy an Air Print printer or is there a way I can use my Lexmark

    You may be able to install an AirPrint sharing application on your PC to enable printing.
    Google for "AirPrint for Windows" and you should get several hits.
    Alternatively you may be able to use Lexmarks Printing App if it supports your printer model.
    https://itunes.apple.com/us/app/lexmark-mobile-printing/id469415392?mt=8

  • PDFs won't print (Lion and HP laserjet 1300)

    I just upgraded to Lion and pdfs won't print. It doesn't appear to be the printer driver, because the printer works with others apps. Any suggestions? It's an HP Laserjet 1300. Yes, it's old, but still works, well, sometimes. just not with pdfs.

    Hi Andreais,
    I found some useful tips on the HP forum as well. Maybe it is helpful in your case as well: http://h30434.www3.hp.com/t5/Mac-Printing-and-Scanning/HPDesignjet-130NR-no-long er-prints-PDF-properly/m-p/768507/highlight/true#M18877
    Cheers
    Mandy

  • What is the best wireless printer to use with an IPad Air and IPhone?

    What is the best wireless printer to use with an IPad Air and IPhone that will print both text and photos?  Also, is the separate keyboard available for the IPad Air, yet?

    Best is relative. Different people like different things. I have an epson that I like. I'd look through a site like Best Buy and compare reviews for Air Print enabled printers.
    as to the keyboard, I know Zagg has one and I think there are other manufacturers that have keyboards for the Air. As far as I know, pretty much any bluetooth keyboard will work, but if you want a case then you'd need to get a specific one.

  • I got Snow leopard and now I cant print with Canon 4350d

    Canon 4350 printer problem?
    I get this message every time I try to print. I can scan and copy but not print. "Cannot communicate with the printer, or the printer is not supported, check the printer connection and add it again. Then, if the print dialog box has a printer info button, acquire the printer information: 10322"
    i tried to download the driver but it gives the same message.
    Please help.

    The XPS portion of the name is for Windows 7. It's not going to cause a problem, its just an identifier for Windows 7 as the driver is included with that OS.
    I have the MF4380dn on my desk and it shows the Printer Info button. So either your MF4350 model does not support this setting or the driver installation was not completed correctly. Since I don't have the same model to check I will suggest you look at removing the driver and installing the latest version, especially if you upgraded to Snow Leopard from Leopard with the UFR2 driver already installed.
    To remove the Canon UFR2 driver
    Open Print & Fax, select the MF4350 entry and press the minus button to remove the printer
    Open Finder and navigate to
    [Mac HD]/Library/Printers/Canon and delete the UFR2 folder
    Still in Finder, navigate to
    [Mac HD]/Library/LaunchAgents and delete the file jp.co.canon.UFR2.BG.plist
    Still in Finder, navigate to
    [Mac HD]/Library/Printers/PPDs/Contents/Resources and delete all the files showing CNTD***Z*2*.ppd.gz
    Where *** indicates a character string that represents the printer model, and *2* indicates a character string that represents the corresponding language, most likely US for your region.
    The last action is to open Activity Monitor and locate UFR2 Backgrounder. Select it and then select Force Quit.
    With all the above steps completed, restart your Mac and then download and install the UFR2 v2.24 driver.

  • OAM Access Manager SSO solution fails to open docs and pdfs

    Hi
    I have created a solusion for SSO like this.
    OAM against AD, running on windows (server A). Webpass is on IIS.
    The applikation I'm protecting is an Weblogic 10.0 application running on windows (server B)
    I have also installed the webgate on serverB running on Apache 2.0, and all the installation is done by following the documentation for Weblogic sso
    (This is to make the application runnable directly through port 80 and redirecting in Apache)
    The sso works fine.
    But i have a problem in IE6
    When the application is trying to open documents to view them in msword or pdf for printing, the document is not opened, I get an "file not found" exeption in the browser, and the url for getting the document seems very long. (The grey popup)
    When I open the application in IE8 it works fine, and the url for getting document seems short (just the docID)
    (The application is currently only compatible for IE6 so running it in IE8 will cause other problems)
    I cannot find any error messages in any logs.
    If I run the excact same application without sso its working fine in both IE8 and IE6
    Regards
    Tine

    Hi
    This is a followup to the question in this thread
    The system is now able to load pdf's and doc documents, and the reason it did not work before was due to the cache settings on the webgate. The system is now caching documents in the temporarInternetfolder created for the users and loads word and pdf files for printing without problems.
    Now.. my problem is that the application is also running a kind of "generate pdf, doc, html files" application which are saving some modified files on the local users area. (my computer)
    After that the application ask to load these documents into the applications database.
    When I use the Apache mod_weblogic.c to proxy the requests, large files (5 MB) are not able to be loaded into the application database. I get a "the connection with the server was terminated abnormally" exeption.
    Small files (94 KB) are working fine.
    Does anyone have any idea of what can cause this?
    I have upgraded Apache from 2.0.58 to Apache 2.0.63 and I use mod_wl128_20.so as the weblogic module.
    Regards
    Tine

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

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

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

  • Silent print in AIR application

    hi,
       I am struggling with the problem 2 days now. I created a touch screen app and as the final step, app should print a confirmation for user. Because it is standalon point-of-sale, I don't want any confirmation dialogs etc outside of my application. I have created a PDF file with FxPDF library from Tour de Flex. However, it cannot be printed using PrintJob. So I save the file and then use NativeProcess to call AcroRd32.exe with params to silently print it. The problem is, I cannot install Reader in folder of my choice and I don't want to update application each time new Reader is published. Second thing is, Reader window does not close after print, and I will finish with hundreds of open windows in the background after some time.
      My question is, is it possible to do silent printing in AIR in other ways? It does not have to be PDF, perhaps I could prepare layout of text to print another way. I really appreciate any tip, I've digged up internet for several hours, and haven't found any suitable answer.
    Regards,
    Akeen

    i wrote an article how to open and show and silent print pdfs in Windows and Mac OSX with examples (using native commands):
    http://www.onyrix.com/2012/04/adobe-air-pdf-silent-print-with-acrobat-reader/
    bye
    d
    even if is for Adobe Air you can you native commands examples for any other programming language

  • Print PDF document with printer's name and date/time of print

    Hi,
    I'm pretty new to this...
    I have a PDF document and when I print it, I want the printer's name and the date/time of print to be showed on the printer's output.
    I have several printers (some local and some on network) and don't necessarly use the default one. I would like the name of the printer used, to be printed on the document.
    With var h = this.getField("Printer"); h.value = app.printerNames; I'm able to get the list of all printers available but I just need the one used.
    For the date/time, using var f = this.getField("Today"); f.value = util.printd("mmm/d/yyyy", new Date()); gives me the date/time of when the document is open, not when the document is printed. (or maybe I'm missing something?)
    I guess the date/time issue is not the major one as there is usually not much difference between the time you open the document and the time you print it.
    I'm more interested in the printer's name.
    I use Acrobat Pro 9 to edit my PDF document.
    Can anyone help me please?
    Thanks!

    This project was left aside for a while... but it's now finished!
    Thank you for the answers. It was helpful.
    Here is a step-by-step of what I did (using Adobe Acrobat 9.5.1):
    Open PDF document in Acrobat
    Select Forms -> Add or Edit Fields
    Add two text fields: one called "Today" for the date and one called "Printer" for the printer name
    Close the form editing
    Select Advanced -> Document Processing -> Set Document Actions...
    Then select Document Will Print and Edit
    Paste the following code:
    var f = this.getField("Today"); f.value = util.printd("dd mmm yyyy - HH:MM", new Date());
    var pp = this.getPrintParams();
    this.getField("Printer").value = pp.printerName;
    Save your PDF
    Enjoy!
    The date and printer name field will be automatically updated when you print the document!

  • I have a canon mf5940dn, it is connected via USB to my macbook air, and yet, when i want to print smith, it says the printer is not connected. does anyone has any idea why? is there a guide to do it properly?

    I have a canon printer mf5940dn, it is connected via USB to my macbook air, and yet, when I want to print smth, it says the printer is not connected. does anyone has any idea why? is there a guide to do it properly?

    Hi,
    I am currently replying to this as it shows in the iChat Community.
    I have asked the Hosts to move it to Snow Leopard  (you should not lose contact with it through any email links you get)
    I also don't do Wirelss printing so I can't actaully help either.
    10:01 PM      Friday; July 29, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

Maybe you are looking for

  • I want to solely use the cloud for music & media...

    I noticed that many of my songs and movies are being stored both on my hard-drives AND in the cloud via iTunes Match. I realize that each file in the Match cloud has to reside either on a computer or via an iTunes Store purchase, but I have many file

  • EP integration with third party BI tools

    Hi, I was looking for information and pointers on EP integration with third party BI tools like Business Objects etc.  Would be grateful. Thanks, Madhu

  • Changes to Query not reflected in views

    We want to use various views off of a 'master' query to publish in our portal.  I was working on the assumption that an advantage of the views was that if a change needed to be made it could be made in the query and then all the views off of that que

  • Ios4 upgrade problem

    My ipod was working perfectly until I tried to update to ios4. during the "restore" process, it just stopped restoring. when I disconnect it, it asks me to connect to itunes and attempt to restore again. When i do that, it stops in the middle of rest

  • Unknown Oracle major version [11] null

    Hi , i am using cf9 , i generated ORM cfc service and whin i am calling any service call from flash builder or try to test the cfc from coldfusion buirlder i got this error unknown Oracle major version [11] null i am using the correct jdbc driver , a