Open a PDF url in InAppBrowser plugin ionic 3

Hi, i have a url that open a pdf in browser but when i try to open that url through In App Browser plugin in ionic 3 blank page is showing. It also didnot gave any error.

let options: InAppBrowserOptions = {
  location: 'yes',
  hideurlbar: 'yes',
  hidenavigationbuttons: 'yes',
  clearcache: 'yes',
  clearsessioncache: 'yes',
  closebuttoncaption: 'Close',
  zoom: 'no',
  closebuttoncolor: '#888888'
};
const RESULT_BROWSER = this.iab.create(urlForPdf, '_blank', options);
RESULT_BROWSER.show();

This is the code i am using

Hi pksquare don’t worry I am here to help you, just follow the below blog the author have worked great on this topic

cheers!!

i want it to open inside inAppBrowser only

InAppBrowswser prompt unconditional response while opening pdf so you should make it first as a file then open it in any pdf viewer it is a easiest way

can you please provide me some piece of code ??

Todo like thisl

fetch(‘data:application/pdf;base64,’ + this.downloadPDFStream, { method: “GET” }).then(res => res.blob()).then(blob => {
this.file.writeFile(this.file.externalApplicationStorageDirectory, this.fileName, blob, { replace: true }).then(res => {
this.FileResponse = res;
/this.fileOpener.open(res.toInternalURL(), ‘application/pdf’).then((resFileOpener) => {
//this.prepareToPrint(“data”);
}).catch(err => { console.log(‘open error’) });
/
loading.dismiss();
this.socialsharing.share(“test”, null, this.FileResponse.toInternalURL().replace(“cdvfile”, “file”), null);
}).catch(err => {
console.log(‘save error’);
loading.dismiss();
});
}).catch(err => {
console.log(‘error’);
loading.dismiss();
});