Printing from IPad?

Discussion in 'iPhone/iPad Programming' started by trey5498, Jan 12, 2011.

  1. macrumors regular

    Joined:
    Jun 16, 2008
    #1
    I work for a major university and in the past, I have successfully created a printer installer for Macs that will install our 4 types of printers. Now, our students are starting to carry IPhones and IPads around with great frequencies and want to print their documents.

    I have downloaded the source code from the apple site for PrintPhoto and am using it for reference. I will want it to open photos, pdfs, and Microsoft formatted documents.

    The main question I have is, how do I add the printers I want to use hard coded in? These are network Print Queues that use LPD protocol (or LPR and some people know it). I know you usually have to have printer drivers, but I wouldn't even begin to know where the driver is.


    Below is what I use for mac printer installer
    Code:
    lpadmin -p PrinterName -v lpd://Server/printqueue-bwq -P /Library/Printers/PPDs/Contents/Resources/HP\\ LaserJet\\ 4250.gz
    cupsenable printqueue-bwq 
    accept printqueue-bwq 
    
    can anyone help?
     
  2. macrumors 6502

    Joined:
    Feb 7, 2008
    #2
    You don't. There are a few HP printers that the iPad supports. If one of those HP printers is on the same network as the iPad, the iPad will see it and print to it. There are no drivers to install on the iPad.

    http://www.apple.com/ipad/features/airprint.html

    Another option is to use the unofficial "Airprint Activator" which you can install on a Mac computer, and then share any printers attached to it to an iPad.

    http://netputing.com/airprintactivator
     
  3. thread starter macrumors regular

    Joined:
    Jun 16, 2008
    #3
    I have tracked down the code a bit to see what I can do and here is what I got, but obviously does not work


    Code:
    UIPrintInfo *printInfo = "lpd://server/printer-bwq"
    
    Is there not a way that I can point it directly? We have the printers locked down so that we can control who can print (so students dont get free printing) so the airprint is out.
     
  4. macrumors 6502

    Joined:
    Feb 7, 2008
    #4
    Where are you trying to put that? In any case, no it won't work. UIPrintInfo is a class you can use if you were developing an application in Objective-C on the iPad that will be able to print. It has nothing to do with connecting an iPad to a specific printer. It is not similar in any way to the script you posted for the Mac.

    iPads print through airprint. If you can't support airprint, you can't print. There may be a way to enable some sort of permissions with airprint, I don't know.
     
  5. thread starter macrumors regular

    Joined:
    Jun 16, 2008
    #5
    I am actually staring at the code as we speak. I am trying to develop a custom print app that will allow our students to print to our print queues. I was going to hard code the printers into the custom app (which I am in the process of making) then when the students wants to print he/she can open the menu and select one of the printers.

    Is this possible with a correct form of the code I posted?
     
  6. macrumors 6502

    Joined:
    Feb 7, 2008
    #6
    No.
     

Share This Page