![]() |
#1 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19
Karma: 50126
Join Date: Apr 2013
Location: Minsk, Belarus
Device: Pocketbook 912 Pro
|
Yet another PDF viewer (muPDF based)
A simple muPDF-based viewer for PDF/XPS/CBZ documents. Features:
- excellent performance due to muPDF library - optional rendering of text/images/text+images. Useful for reading those bulky PDF magazines with redundant full-page background images - accurate margins cropping - extracts table of contents from PDF - read pages are cached and next page is preloaded in background when moving forward/backward - instant bookmarks - functional UI elements are visible all the time to reduce need for screen refresh - better text quality due to simple rendering tweak Source codes and Pocketbook 912 Pro build can be downloaded from http://files.mail.ru/0482A56F961B4FACA7D56FAAEDF022E4 Building directions: 1. Download MuPDF 1.2 2. Add pocketbook section to Makerules file: ifeq "$(OS)" "pocketbook" CC = arm-none-linux-gnueabi-gcc LD = arm-none-linux-gnueabi-gcc AR = arm-none-linux-gnueabi-ar CFLAGS += -s -fsigned-char -Wno-format-y2k -Wno-unused-parameter CROSSCOMPILE=yes NOX11=yes endif 3. Debug build for emulator: make - creates mupdf/build/debug folder 4. Release build: make OS=pocketbook build=release - creates mupdf/build/release 5. build-scripts makepc.sh and makearm.sh assume that pdfview folder contains symlinks fwlib, mupdf, mupdfd (->mupdf/build/debug), mupdfr (->mupdf/build/release), sdk (->FRSCSDK) 6. Some usage directions: - goto first/last page: "|<" and ">|" buttons - goto page N: dial a number, then press "V" (OK that is) - reset dialed page number - "X" - show TOC: "C" or usual TOC button - "M" - switch margins cropping on/off (there are cases algorithm is mislead by full-page bkg images) - "R" (or "Zoom in" hw btn) - rotate 90 degrees clockwise and back. When rotated, navigate using "left"/"right" buttons - "I"/"T"/"I+T" - switch between "images"/"text"/"images+text" modes. "OK" hardware button switches between "T"/"I+T" modes - "Zoomout" hw btn - refresh screen Book navigation is done using regular Next/Back buttons. If you press and hold the button, you can scroll several pages without multiple repainting. The number of pages scrolled is updated in the third cell on the top. Left-hand side is devoted to instant bookmarks. The idea is that you can instantly mark a page and get back to it using stylus or "up"/"down" buttons. Used bookmarks are marked with page number, current bookmark is highlighted. New bookmark is created by tapping on the clear bookmark. If you tap a current bookmark, it's cleared. You can clear arbitrary bookmark (not only current) by tapping "-" button and the unwanted bookmark. You can overwrite used bookmark by tapping "+" and then bookmark you want to overwrite. muPDF appears to be am excellent tool to deal with PDF. Extremely fast, very well designed and pleasure to work with. You can define handlers for any element and customize/extract/render it. This allows for handling interactive elements, text search, etc, etc... Last edited by melihron; 05-03-2013 at 04:27 AM. |
![]() |
![]() |
![]() |
#2 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 117
Karma: 37584
Join Date: Nov 2012
Location: Milan / Italy
Device: pocketbook touch 622
|
is there any gifted that can modify/compile it for the 622 touch?
![]() Last edited by paolog; 04-09-2013 at 05:39 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19
Karma: 50126
Join Date: Apr 2013
Location: Minsk, Belarus
Device: Pocketbook 912 Pro
|
Have you tried the attached one? According to developers, SDK I am using compiles code for all pocketbook models. However, SDK comes in 2 parts - FRSCSDK and PBSDK. I am using FRSCSDK, not sure what PBSDK is for. If you confirm that attached build does not work on your device, I can try building it with PBSDK
|
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 47
Karma: 12418
Join Date: Sep 2012
Device: kindle keyboard, PocketBook Pro 912 (black), T62D with Gonyx
|
I tried the zipped binary mupdfviewer by copying it to the Applications folder and modifying the extensions.cfg so that this viewer appears as the 3rd option for viewing PDF files. When selected though nothing happens (apart from the fact that the content of the Applications and other folders seems to disappear; I have to shut down the machine and restart it for these to appear).
Not the right binary? |
![]() |
![]() |
![]() |
#5 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19
Karma: 50126
Join Date: Apr 2013
Location: Minsk, Belarus
Device: Pocketbook 912 Pro
|
Sorry, neglected to provide installation info.
1. Unzip binary mupdfviewer.app to system/bin 2. Add pdf:@PDF_file:1:mupdfview.app,AdobeViewer.app,pdfv iewer.app:ICON_PDF xps:@PDF_file:1:mupdfview.app:ICON_PDF to system/config/extensions.cfg (created one if necessary) 3. Reboot to make sure config changes activated 4. App will be invoked by the system when you try to open PDF/XPS file. muPDF developers claim that CBZ files can be viewed as well - did not have a chance to get such file |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,007
Karma: 18401861
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
Quote:
You can't run FRSCSDK binaries on the old systems. You can't run PBSDK binaries on most of the new systems (but I think the 360+ has compatibility libraries that will handle them). PocketBook devices are rather well built, and there are still plenty of old 301, 302 and 360 devices in use out there. When I put something up for sharing, I find that about 1/3 of the downloads are for those old devices. So, it's worth providing a version for them if possible. |
|
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,007
Karma: 18401861
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
Thanks melihron, this looks promising. The reliance on touch screens is a problem for some of us (360, 611, 602, 902 devices), as there doesn't seem to be other ways of hitting those buttons at the top. The standard method is to pop up a menu with the OK button (or tap on screen), and then select the action. Is there any chance of such stuff being added to the app?
|
![]() |
![]() |
![]() |
#8 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19
Karma: 50126
Join Date: Apr 2013
Location: Minsk, Belarus
Device: Pocketbook 912 Pro
|
I tried to avoid any popups because those slow screen refreshes are driving me mad :-) I wish I could understand why dialogs/popup menus are not saving bitmap for the area they are covering to avoid full screen update...
I'd rather add escape button, smth like Alt in windows that brings you to the top strip so that user could navigate using left/right buttons and make selection with OK. I agree it's better w/o stylus even on touch models - it's slow, sometimes it doesn't respond (for example, the tool strip was originally at the page bottom, but guess what... after TOC is displayed, the bottom screen portion does not accept stylus taps anymore), and it can be lost or broken! So it's better to keep it at bay :-) |
![]() |
![]() |
![]() |
#9 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 47
Karma: 12418
Join Date: Sep 2012
Device: kindle keyboard, PocketBook Pro 912 (black), T62D with Gonyx
|
Thanks. It works. But how do I set the margins for cropping? Is there a manual setting for margins? Or if it only automatically crops a page, how do i zoom into it?
|
![]() |
![]() |
![]() |
#10 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19
Karma: 50126
Join Date: Apr 2013
Location: Minsk, Belarus
Device: Pocketbook 912 Pro
|
Margins are calculated automatically. You can only switch cropping on/off using button "M".
You can zoom in using "R" (or hardware "Zoom in") - page is rotated 90 clockwise and scaled to fit screen height. Clicking "R" (or hardware "Zoom in") again returns orientation to landscape. |
![]() |
![]() |
![]() |
#11 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,007
Karma: 18401861
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
Edit: Nevermind, I was wrong about EVT_SHOW and menus and deleted my wrong suggestion.
Last edited by rkomar; 04-09-2013 at 03:16 PM. |
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,388
Karma: 14190103
Join Date: Jun 2009
Location: Berlin
Device: Cybook, iRex, PB, Onyx
|
Works well and looks interesting, although my 902 doesn't have a touch screen. Thanks, mehliron!
|
![]() |
![]() |
![]() |
#13 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 117
Karma: 37584
Join Date: Nov 2012
Location: Milan / Italy
Device: pocketbook touch 622
|
Quote:
![]() ![]() works! many thanks! put on the sd card and made a link to it from /mnt/ext1/system/bin some first impression: I've some problems in selecting the buttons since on the 622 they are 3,5 mm wide. My fingers aren't particularly bold, but it still be a little difficult to catch the right button For me is expecially difficult to touch the first and last buttons, '+' and 'I', as they are in the edges (see also later). Touching 'I' doesn't toggles between the viewing modes. Or there should be also 'I+T' and 'T' buttons? In this case I can't see them What are the functions of the first three buttons '+' '-' '(blank)' ? on my 622 they don't do anything no exit button so I've to close it via task manager last, opening the book from pb 'recent events', doesn't works Last edited by paolog; 04-10-2013 at 05:47 AM. |
|
![]() |
![]() |
![]() |
#14 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19
Karma: 50126
Join Date: Apr 2013
Location: Minsk, Belarus
Device: Pocketbook 912 Pro
|
Sorry, I did not think about non-stylus based models owners as I own a stylus based one :-) As I said, I too find it more practical to go stylus-free, so I am planning to duplicate all functionality with buttons. I am thinking that short OK should bring the user to the middle button in the top strip, and then left/right/OK buttons can be used to navigate/select function, and up/down/OK can be used to access bookmarks.
Yes, there are three buttons I/T/I+T, but you can switch T<->I+T with OK button - this is the switch I use the most. Apparently, your screen width is insufficient. I guess I can add code to detect how to organize buttons to fit the screen. + and - are currently for operations with bookmarks (see the first post). Th blank space is activated when you press and hold the button - it shows how many repetitions are recorded. This way you can scroll multiple pages forward/backward without the need to see all pages in between. I am thinking that +/- button can be used for similar purpose - once pressed, dialed number will be interpreted as page number increment instead of absolute page number. You can use usual "Back" button to close the app. As to integration with pocketbook environment - it has not been implemented yet. There seems to be no useful functions in the API to that end - need to read pb app sources to find out how |
![]() |
![]() |
![]() |
#15 | |||||||
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 117
Karma: 37584
Join Date: Nov 2012
Location: Milan / Italy
Device: pocketbook touch 622
|
Quote:
Quote:
Quote:
Quote:
![]() ![]() Quote:
![]() Quote:
Quote:
overall, very good! I hope you solve the button layout issue for 6'' ![]() one more request. I converted some pdfs to djvus (mainly dictionaries) because the first has a very very very low speed search function (on dict usually I've to give up) where djvu is very fast. Could you plan to add a search function (hoping that it can be fast than adobe one... otherway the fast forward funcion is perfect!) last. when rotated I see the upper half page; next page button bring me to the next upper half page. How can I see the bottom half page while in landscape mode? Last edited by paolog; 04-10-2013 at 06:49 AM. |
|||||||
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
KPV: a PDF reader for Kindle, based on muPDF, GPLv3 | hawhill | Kindle Developer's Corner | 1056 | 11-11-2017 03:07 AM |
Magazine-like PDF viewer (like the flash magazine viewer on certain sites?)? | Huyggy | Reading and Management | 6 | 12-12-2013 04:35 AM |
[Kindle Touch] No Image viewer and pdf viewer with white margins | MaxPowerITA | Kindle Developer's Corner | 7 | 04-24-2012 05:27 AM |
RMSDK-based viewer for Linux | Nathanael | ePub | 6 | 09-28-2010 08:12 AM |
muPDF on Kindle DX!! | DairyKnight | Kindle Developer's Corner | 8 | 03-21-2010 03:39 AM |