Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting page number of pdf file Titanium Studio iPhone

I am creating an app to read PDF file. I'm using WebView to load the PDF file. Below is the code:

var wv = Ti.UI.createWebView({
           backgroundColor:"gray", 
           border:1,
           height:410,
           url : "file.pdf"
         });

win.add(wv);

I'm wondering if there is any way to get the page number of the PDF and to navigate page by page. I did not find any way to do this. Any help would be appreciated. Thanks in advance.

like image 855
senthil Avatar asked Nov 03 '22 00:11

senthil


1 Answers

I don't think that this is possible with Titanium WebView component as it is. There are several PDF Reader plugins available for Titanium which you could use.

You can also try to use pdf.js and include it in WebView and try to manage the things you want. But i never tried to use pdf.js before i in Titanium or mobile environments at all.

like image 101
mr.VVoo Avatar answered Nov 13 '22 23:11

mr.VVoo