1
votes

I am trying to print external link into ionic app using ionic printer plugin https://ionicframework.com/docs/native/printer/

 printticket(){
      let printurl = "http://www.gmail.com";

          let options: PrintOptions = {
              name: 'Waridi Events',
              duplex: true,
              landscape: false,
              grayscale: false
          };


           this.printer.print(printurl, options).then(onSuccess=>{
               console.log("Done =>" + onSuccess);
           }, onError=>{
             console.log("Error=>"+onError);
           });
  }

This is working on android but not working on ios. Please give me some better way to print.

sometimes it is working

enter image description here

And sometimes failed to load data enter image description here

1

1 Answers

0
votes

Finally I got the solution using api call.

Before call the print call the api from the link and get the html codes and save all into a variable and print it.