Loading a PDF file in Titanium may be sometimes our requirement for an application. For loading a PDF we need to have a webview inside a scrollview so that it is scrollable also. Take a look at this simple example.

/** creating a window **/
var window = Titanium.UI.createWindow{};
/** creating a webview **/
var my_webview = Titanium.UI.createWebView({     url :'my_pdf.pdf'      //specify the PDF path.....});
/** creating a scrollview **/var my_scrollView = Titanium.UI.createScrollableView({     views:[my_webview]   // placing the webview inside the scrollview...});

Please leave your valuable comments if this post was useful…..


Leave a Reply

Your email address will not be published. Required fields are marked *




Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.