Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. iOS printing to a printer on the network
Forum Updated to NodeBB v4.3 + New Features

iOS printing to a printer on the network

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
iosprinting
1 Posts 2 Posters 855 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shikamu
    wrote on 27 Jul 2017, 19:03 last edited by
    #1

    Hello,

    I'm trying to make an iOS application that can "automatically" print pictures to a printer that's on the network. I'm fairly new to iOS and Qt but so far I've not been able to find out how to do the printing. I found some examples that show me how I can use bonjour (https://doc.qt.io/archives/qq/qq23-bonjour.html), I think I can more or less find my printer like this but I couldn't find any help so far on how to use QPrinter to automatically connect to that printer.
    Basically my code so far is essentially:

    QPrinter printer;
    printer.setOutputFormat(QPrinter::NativeFormat);
    printer.setPrinterName("Canon SELPHY CP1200");
    QPainter painter;
    if(!painter.begin(&printer))
    {
      //failed, we actually hit this at the moment
      return 1;
    }
    painter.drawText(10, 10, "Test !");
    painter.end();
    

    I think the problem is that I need to somehow connect the device to my Canon printer somehow but I don't know how to do that. Any insight would be greatly appreciated :)

    Cheers!

    1 Reply Last reply
    0

    1/1

    27 Jul 2017, 19:03

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved