View Single Post
Old 04-10-2013, 08:35 AM   #18
paola
Wizard
paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.
 
paola's Avatar
 
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
Quote:
Originally Posted by melihron View Post
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...
Many thanks and Karma to you: can't wait to try it, though I am travelling and will have to wait a week!
paola is offline   Reply With Quote