webOS Nation Forums >  webOS Developers >  webOS Development > Mupdf port for webos Touchpad
Mupdf port for webos Touchpad
  Reply
Like Tree7Likes
  • 4 Post By getthegame
  • 1 Post By T-Pad
  • 1 Post By lunohod_oi
  • 1 Post By T-Pad

 
Thread Tools Display Modes
Old 11/03/2011, 07:35 PM   #1 (permalink)
Member
 
Posts: 2
Hi, I ported the mupdf to touchpad. It's a basic pdf viewer.

Just put pdf files in /media/internal/downloads(the default download directory), then you go.

support pan view and vertical pinch zoom(not well implemented)

o --------rotate
+ --------zoom in
- ---------zoom out
P ---------previous page
N ---------next page
354G -----go to page 354
D ---------display toggle

megaupload
A1CEUQC6
File name: com.guochan007.app.mupdf_0.3_all.ipk
File description: port from linux to touchpad. V0.3
File size: 3.76 MB
getthegame is offline   Reply With Quote
Liked by Rnp, T-Pad, lunohod_oi and 1 others like this.
Thanked by liujian1201, mivoligo, Rnp
Old 11/04/2011, 05:20 AM   #2 (permalink)
Member
 
Posts: 326
That's great - I have finished the first (internal) alpha release of my mupdf port yesterday, too. Maybe we should join our forces?

So far my port supports nearly all mupdf-keys and changing the page with tapping on the left/right edge of the TouchPad's screen. Tapping on the upper/lower edge scrolls the page. Accelerometer support for changing the screen orientation is half implemented. Right now I haven't implemented a file selection dialog - the file name is hard coded.

I have modified only two files (Makefile and Makerules) and added one new file sdl_main.c, which works with webOS (emulator and device) and on Windows. My goal is to contribute to the official mupdf project (if they accept my enhancements).

I will have a look at your port the evening (CET), right now I'm at work and shouldn't write this post
__________________
Preł (iPhone 4), TouchPad 32 GB (PlayBook 16 GB)

Last edited by T-Pad; 11/04/2011 at 05:28 AM.
T-Pad is offline   Reply With Quote
Liked by lunohod_oi likes this.
Old 11/04/2011, 05:29 AM   #3 (permalink)
Member
 
Posts: 22
lulz. I've ported mupdf too But I have not released it yet.
lunohod_oi is offline   Reply With Quote
Liked by T-Pad likes this.
Old 11/04/2011, 05:39 AM   #4 (permalink)
Member
 
ahsirg's Avatar
 
Posts: 598
will this work on phones with enyo?
__________________
Amigo Music Player Tractor - Archive Extractor
Sync Palm Pre with iTunes
ryhor.com - find cool apps for the Treo and Palm
ahsirg is offline   Reply With Quote
Old 11/04/2011, 05:54 AM   #5 (permalink)
Member
 
Posts: 22
Quote:
Originally Posted by T-Pad View Post
That's great - I have finished the first (internal) alpha release of my mupdf port yesterday, too. Maybe we should join our forces?
I'd like to join the efforts too.

Quote:
So far my port supports nearly all mupdf-keys and changing the page with tapping on the left/right edge of the TouchPad's screen. Tapping on the upper/lower edge scrolls the page. Accelerometer support for changing the screen orientation is half implemented.
My port is purely "native", no JS, no GUI, no keyboard control. I use OpenGLES to speedup panning and zooming. I use accelerometer to determine the initial screen orientation, but I haven't found a way to get accelerometer events without polling. I've implemented panning, pinch-to-zoom and rotation gesture.

I'd like to make my app "hybrid" and implement other things like TOC or goto dialog with Enyo.

Quote:
Right now I haven't implemented a file selection dialog - the file name is hard coded.
You can register your binary as a default file handler for pdf files and then open the files from Internalz or from browser.
lunohod_oi is offline   Reply With Quote
Old 11/04/2011, 06:03 AM   #6 (permalink)
Homebrew Developer
 
Posts: 221
Have you guys sources available somewhere? I'm also working on a PDF reader based on mupdf.
filmor_ is offline   Reply With Quote
Old 11/04/2011, 06:05 AM   #7 (permalink)
Member
 
Posts: 315
Funny, the PDF viewer for the original Pre used mupdf. But I don't think it was ever updated.
greenoyster is offline   Reply With Quote
Old 11/04/2011, 07:03 AM   #8 (permalink)
Member
 
Posts: 326
So we have at least four people working on a MuPDF port (in alphabetical order):I assume all of them are purely "native" apps (like mine). Hybrid is something I am saving for later. I haven't used OpenGL because AFAIK it's either OpenGL or SDL graphics - I have chosen the latter for its truetype font support, but this is not needed with mupdf (as I have learned later, but should have known before ). Until now I haven't modified any of the original MuPDF source files (except the make files required for building the binaries) and added a single file (sdl_main.c) for doing all the webOS/SDL stuff.

What is the development environment and API (OpenGL/SDL) you are using?

I am working with ubuntu and vi - can you recommend a better (linux based) development environment, maybe one with step-by-step debugging support? I have started with Visual Studio but as most open source projects are using unix makefiles I quickly moved to ubuntu (running in VirtualBox).

Should we setup a project on an open source project hosting site or has anybody already done it? Or a wiki or something else? What would you suggest for communicating?

I have an (unused) sourceforge account only, but no experience in collaboration over the web.
__________________
Preł (iPhone 4), TouchPad 32 GB (PlayBook 16 GB)

Last edited by T-Pad; 11/04/2011 at 07:09 AM.
T-Pad is offline   Reply With Quote
Old 11/04/2011, 07:14 AM   #9 (permalink)
Homebrew Developer
 
Posts: 221
I'm doing my development using gvim, you can debug using gdb on the Touchpad. I'm doing my development on github: https://github.com/filmor/webos-pdf/

I use C++ and OpenGLES2, no other dependencies besides the SDK, mupdf and Boost headers for now. To build you need some version of python installed.

It would definitely be beneficial to work together, but I think I want to get to a usable (backend-)program first.
filmor_ is offline   Reply With Quote
Old 11/04/2011, 07:22 AM   #10 (permalink)
Member
 
Posts: 22
Here is my file: http://users.openinkpot.org/~lunohod/webos_main.c
It's a mess right now
lunohod_oi is offline   Reply With Quote
Old 11/04/2011, 07:22 AM   #11 (permalink)
Member
 
Posts: 326
Ok, so you and lunohod_oi are using OpenGL. I could switch the engine, too (because of my little experience in C I started to work with the emulator so I have at least an x86 cpu). For building I'm using the original makefiles.

Thank you for posting the link to your repository - I'll have a look at it and post my efforts (of course a mess^^) in the evening.
__________________
Preł (iPhone 4), TouchPad 32 GB (PlayBook 16 GB)
T-Pad is offline   Reply With Quote
Old 11/04/2011, 07:38 AM   #12 (permalink)
Member
 
Posts: 22
I'm using vim, git and C. I'm not sure that I will participate in a C++ project.

I've chosen OpenGL because software rendering was too jerky while zooming the page. I'm new to OpenGL programming and it was pretty hard to get zoom working properly.

Last edited by lunohod_oi; 11/04/2011 at 08:42 AM.
lunohod_oi is offline   Reply With Quote
Old 11/04/2011, 12:00 PM   #13 (permalink)
Member
 
Posts: 22
Here is my mupdf package: http://users.openinkpot.org/~lunohod..._0.0.1_all.ipk

Install it with Preware. Install also Internalz Pro to get file manager if you've not done it before.

Go to Launcher->Settings->Device Information->Device Info (top left corner drop-down menu)->Default Applicaions, find .pdf and change it from Acrobat Reader to mupdf.

Open a pdf file from Internalz file manager or from the browser. Do not try to run mupdf from Launcher.

Swipe right (direction from camera to central button) or left for next/prev page. Pinch-to-zoom and pan should work. Double-tap should restore the initial zoom. You can try to rotate the page with two-fingers-rotate gesture.

Disclaimer: it's not even an alpha-version, it's just a prototype.
lunohod_oi is offline   Reply With Quote
Old 11/04/2011, 12:06 PM   #14 (permalink)
Member
 
Posts: 2
Happy to know your guys are working on the same thing.

I'm using SDL. So I only modified the sdl_main.c and other parts of mupdf were barely touched.

I'm working in Windows. The text editor is notepad++. I installed the GCC ARM Toolchain as HP official cite required in Windows. Also I downloaded windows version make.exe to run the makefile.

I'm a newbie for coding so my code is pretty mess right now. I even have no idea how to use gdb for debug.

Right now I'm using opendir,readdir to do simple pdf selection.

I'm going to find or write a simple file browser(only looking in /media/internal directory or subdirectory) using SDL for pdf file selection.

Seems PDL doesn't generate orientation event.
getthegame is offline   Reply With Quote
Old 11/04/2011, 01:08 PM   #15 (permalink)
Member
 
UncleVanya's Avatar
 
Posts: 1,501
I would love anything that works better than the built in PDF viewer in my phone - will this be supported on the phones?
UncleVanya is offline   Reply With Quote
Old 11/04/2011, 02:46 PM   #16 (permalink)
Member
 
Posts: 326
My plans have changed at short notice so I'll be offline over the weekend. I'll post my source on monday evening (CET).

have a nice weekend
__________________
Preł (iPhone 4), TouchPad 32 GB (PlayBook 16 GB)
T-Pad is offline   Reply With Quote
Old 11/04/2011, 10:12 PM   #17 (permalink)
Member
 
Posts: 51
This works great!

Has all the essential features:
- keeps zoom between pages
- sharp/clear fonts
- fast page next

some files have refused to open, but otherwise a great start!

Quote:
Originally Posted by lunohod_oi View Post
Here is my mupdf package: http://users.openinkpot.org/~lunohod..._0.0.1_all.ipk

Install it with Preware. Install also Internalz Pro to get file manager if you've not done it before.

Go to Launcher->Settings->Device Information->Device Info (top left corner drop-down menu)->Default Applicaions, find .pdf and change it from Acrobat Reader to mupdf.

Open a pdf file from Internalz file manager or from the browser. Do not try to run mupdf from Launcher.

Swipe right (direction from camera to central button) or left for next/prev page. Pinch-to-zoom and pan should work. Double-tap should restore the initial zoom. You can try to rotate the page with two-fingers-rotate gesture.

Disclaimer: it's not even an alpha-version, it's just a prototype.
bugelrex is offline   Reply With Quote
Old 11/25/2011, 03:15 AM   #18 (permalink)
Member
 
Posts: 22
no news, guys? what's up?
lunohod_oi is offline   Reply With Quote
Old 11/25/2011, 03:41 AM   #19 (permalink)
Member
 
Posts: 326
Unfortunately my full-time job doesn't leave enough time for working on my private projects. I have about 2-3 hours per week, so progress is not really fast. The last weeks I have been struggling with my out-dated c/c++ knowledge, but just yesterday I've made a successful build again.

I have switched my development environment to Visual Studio C++ 2010 Express because I'd like to test my work with the "desktop simulator" first before I build a version for the TouchPad.

I have some special ideas. My primary goal is to read PDFs efficiently, i.e. I don't want to pan'n zoom and drag'n move the pages - the reader should automatically show the pages in a way that I can concentrate on reading, i.e. how the PDF is shown depends on the PDF's page layout and the TouchPad's orientation. I'll know more after this weekend.
__________________
Preł (iPhone 4), TouchPad 32 GB (PlayBook 16 GB)
T-Pad is offline   Reply With Quote
Liked by Rnp likes this.
Thanked By: Rnp
Old 12/05/2011, 12:34 PM   #20 (permalink)
Member
 
Posts: 1
Hi all, I'm trying to do the same. I agree with lunohod_oi's idea of a hybrid application. I used to to be a C++ VC / Windows CE programmer but don't have any experience with webos or linux.

I was able to build a simple SDL based app off mupdf which runs well in Visual Studio. I'm still trying to learn makefiles for doing an actual compile for the device:

Here's the source file on skydrive:
cid=7151614FB1B4289B&id=7151614FB1B4289B%21111
kamransethi is offline   Reply With Quote
Reply

 

Tags
pdf reader touchpad

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0