How to create pdf file of the webview content in t

2019-08-29 04:12发布

I am new to Titanium. I have a webview. The content of the webview can be a pdf file, or a url. I want to save the webview content as a pdf file. I have created webview using the below code:

    var webViews = Ti.UI.createWebView({
    left : 0,
    top : 0,
    right : 0,
    bottom : 0, 

    url : 'http://www.appcelerator.com'
    });

Please anyone help me out...

1条回答
【Aperson】
2楼-- · 2019-08-29 04:38

You cant directly convert the webview data in pdf but you have to first parse html and then use the js pdf to create the pdf.Here is the code with example

https://github.com/Mindelusions/TiJSPDF

Thanks

查看更多
登录 后发表回答