Convert HTML viewer content into PDF and share to another application.
Smart Code
Syntax
HTMLtoPDFShare(<<Control_Name>>)
Parameter
Control name(required)-Name of the control to be displayed.
comment(optional)-Description of the event
Directcode
Syntax
SharePDF = await Orefuncs.GetValue(“<<Control_Name>>”, this.state);
var options = {
html: SharePDF,
fileName: “temp”,
directory: “Documents”,
base64: true
};
var file = await RNHTMLtoPDF.convert(options);
options = { url: “file://” + file.filePath };
ShareSocial.open(options).then((res) => { }).catch((ex) => {
OreAlert.alert(ex.message);
Example
HTMLtoPDFShare(htmlviewer_1)