Question
Bluevoir Inc.
IN
Last activity: 4 Jan 2021 5:50 EST
How to disable Webview in Pega Mobile app - Pega 8.3.2
We have a requirement in which we need to generate PDF from an HTML in Pega mobile offline mode. HTMLToPDF will not work as it is server-side functionality.
To achieve this functionality we have created a preview button and we are calling javascript below which will open HTML in a new window of a web browser. From the New window, we will use chrome browser functionality to print PDF from HTML
<script>
function preview() {
alert("Preview");
var w = window.open("","_blank", "width=auto,height=auto");
var content = $("#toNewWindow").html();
$(w.document.body).html(content);
}
</script>
<div id="toNewWindow">
<p>Your content here </p>
</div>
The above code will open HTML inside <Div> in web browser new window
In the Web browser code is working fine but in Mobile app the code is opening in the web view. We want to disable web view of the application so that code will open in the chrome browser of mobile. Please suggest.