Unable to use Print API on iPad, works on iPhone


#1

I am trying to use the New Print Api here is code not sure why its not working( update by not working i mean nothing happens, this problem seems specific to the iPad as I have just tested it on my iPhone and a few sims and to works as expected)? the console log which i commented out worked so I know I imported it correctly.

async selectPrinter() {
    //console.log(DangerZone.Print.selectPrinterAsync);
    let printer = await DangerZone.Print.selectPrinterAsync();
    this.setState({ printer });
  } 

Print API not working on iPad
#2

Hey @waltershub,

Can you expand on the “it’s not working” part? What exactly is (or isn’t) happening?

Cheers,

Adam


#3

@adamjnav Ya sorry wasn’t very descriptive. Nothing happens when I run the select Printer, I’ve tried the same app on my iPhone and it works fine, I’ve also tried it in the simulator and its the same thing works on the phone but not the iPad (the line of code brings up the select printer modal on the iPhone but not the iPad)

  DangerZone.Print.selectPrinterAsync().then(printer => console.log(printer));

#4

@waltershub it’s working on both ipad or iphone , just in ipad case send printerUrl with null as Ipad modal for print contain the print object (Pdf or print) and select printer.

Hope this help


#5

the select printer is not working, and thats the thing I need, I can’t have the printer dialog come up every time I want to print a label. I need that url


closed #6

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.