PDFTron Android Sample PDF instead of XOD

36 views
Skip to first unread message

Bradley Gough

unread,
Jan 20, 2017, 3:08:36 PM1/20/17
to PDFTron WebViewer

Using the Android sample in the WebViewer folder I have an application in Android Studio which when run on my device works and displays the xod file given as expected. However I've tried to change the lines:


String documentPath = getFilesDir().getPath() + "/GettingStarted.xod";
InputStream in = getAssets().open("xod/GettingStarted.xod");


to


String documentPath = getFilesDir().getPath() + "/sample.pdf";
InputStream in = getAssets().open("xod/sample.pdf");


And have also changed the endsWith(".xod") to endsWith(".pdf") but I only get a grey screen. For this to work does the file have to be a .xod? As it works for xod files but not pdf files.


Thanks for your time.

Justin Jung

unread,
Jan 23, 2017, 1:59:08 PM1/23/17
to PDFTron WebViewer
Hello Bradley,

Yes, currently WebViewer for Android only supports XOD files due to performance limitations of mobile devices.

Justin Jung
Software Developer
PDFTron System Inc.
Reply all
Reply to author
Forward
0 new messages