View Single Post
Old 04-09-2013, 03:54 AM   #1
melihron
Member
melihron is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!melihron is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!melihron is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!melihron is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!melihron is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!melihron is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!melihron is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!melihron is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!melihron is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!melihron is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!melihron is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
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...
Attached Files
File Type: zip app_1_0.zip (3.89 MB, 1066 views)
File Type: zip src_1_0.zip (25.9 KB, 886 views)
File Type: txt Readme.txt (6.7 KB, 1043 views)

Last edited by melihron; 05-03-2013 at 04:27 AM.
melihron is offline   Reply With Quote