chrox
b80dd1f966
add fulltext search for PDF documents
2014-11-17 17:58:44 +08:00
Hans-Werner Hilse
5af4ccb0c4
add support for GIF and PNG to picdocument provider
...
needs update to latest base
2014-11-17 10:23:06 +01:00
Andrey Golovizin
99eecde875
Use setStringProperty method to set hyphenation dictionary.
2014-11-15 12:22:47 +01:00
Tigran Aivazian
e5e50ed0f9
Fix 1169 by registering .txt.zip/.html.zip/.htm.zip formats
2014-11-14 12:25:02 +00:00
Hans-Werner Hilse
acf6641009
fix memory calculation for cache insert decision, simplify drawing/rendering
2014-11-12 15:53:08 +01:00
Hans-Werner Hilse
5a36e5427f
fixes for picdocument
...
picdocument didn't use the document API correctly
2014-11-11 22:32:57 +01:00
chrox
8f5691d586
fix #968 by check the nullity of text range
2014-11-06 11:18:04 +08:00
chrox
bd0975896d
add fulltext search for EPUB documents
2014-11-05 12:28:28 +08:00
Huang Xin
a300f1e981
Merge pull request #1076 from hwhw/hal
...
Hardware abstraction: refactoring
2014-11-05 08:36:16 +08:00
Andrey Golovizin
86c53f94e1
Make the suffix lowercase before comparing.
2014-11-04 19:56:11 +01:00
Andrey Golovizin
e66dbdda29
Add support for .fb2.zip files.
2014-11-04 19:11:29 +01:00
Andrey Golovizin
a08ac46e80
Move credocument before pdfdocument in the registry.
2014-11-04 18:57:09 +01:00
Andrey Golovizin
4eda3f5a17
Add support for files with multiple extensions (like .fb2.zip).
2014-11-04 18:56:19 +01:00
Hans-Werner Hilse
3066c86e38
Refactoring hardware abstraction
...
This is a major overhaul of the hardware abstraction layer.
A few notes:
General platform distinction happens in
frontend/device.lua
which will delegate everything else to
frontend/device/<platform_name>/device.lua
which should extend
frontend/device/generic/device.lua
Screen handling is implemented in
frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.
The same goes for input handling.
2014-11-02 21:19:04 +01:00
chrox
8c9751744e
fix #1064 by adding timestamp of document in cache key
...
so that when document is modified the persistent cache will
be invalidated automatically because the cache key will not
be matched. There is no perfermance overhead here at all. We
even don't need to check the modification time of the cache item
on disk, because the name of the on disk cache is a md5sum of the
cacheitem key, now the filename of the cache files contains the
modification time information.
If the document is modified since one rendered page is cached to disk,
the cache key won't match the cache file. And the cache file will
be discarded without the need to open the cache file or to check
the modification time of the cache file itself.
2014-10-30 11:05:26 +08:00
chrox
c2726a8f62
save two blitbuffer memory allocations for crengine on each page turn
...
One for drawbuffer at CreDocument:drawCurrentView and another for
resizing of drawBuf at cre.drawCurrentPage.
2014-10-27 22:05:24 +08:00
Hans-Werner Hilse
0a74dc6072
add needed ffi module when saving annotations
2014-10-26 23:16:27 +01:00
chrox
2ff12af50c
protected call of mupdf.renderImage
2014-10-23 13:49:35 +08:00
chrox
2050c0aa66
fix renderImage invocation
2014-10-21 17:22:20 +08:00
Hans-Werner Hilse
e0868826ad
use new FFI based mupdf API
...
This will use the new API where the Lua/C interface was used before
and also drop usage of mupdfimg wrapper which is now implemented
within the mupdf interface
2014-10-20 16:49:10 +02:00
chrox
d30709edb0
add djvu render mode options in readermenu
2014-10-15 20:31:24 +08:00
chrox
b422eb90cc
refactoring readerrolling
...
and fix lossing progress when switching screen mode
2014-10-10 18:14:33 +08:00
chrox
7142492e42
fix #959
2014-10-07 14:05:34 +08:00
chrox
2f2d9f1bf7
issue error directly when doc is malformated
...
This should popup a message saying "No reader engine for this file"
instead of a crash when document file is malformated.
This should fix #868 .
2014-08-29 17:17:12 +08:00
chrox
132adf8e1b
register opened document in documentregistry
...
so that when calling getCoverPageImage in screensaver mode
the document won't be opened again. This should avoid a lot of
problem such as messing up style and options described in #863 .
2014-08-28 21:03:26 +08:00
chrox
b912200951
don't share info field in document
...
We may have multiple documents opened simultaneously, such as in
screensaver mode the current document is opened twice, it's better
to keep seperate info table for each document.
This should fix #858 . When a credocument is opened for screensaver to
get the cover page, the total pages info is set to 1(strangely enough),
before this fix this total pages is shared with the reading document
so the progress bar will get a progress percentage well beyond 100% and
rendering the progress bar out of the boundering box as shown in #858 .
2014-08-28 13:30:27 +08:00
chrox
fd9e3d57f3
fix performance issue of screensaver on Kobo
...
now loadDocument will not render the document and getCoverPageImage will
be much faster.
2014-08-28 13:22:38 +08:00
chrox
0bc3eadcae
refactoring: use Document API getCoverPageImage to get cover image
2014-08-27 11:07:25 +08:00
chrox
092522b89d
promote user to save PDF document after highlighting
...
This is a wordaround for #791 .
2014-08-24 15:16:04 +08:00
chrox
7ce5c9c052
fix Droid Sans Fallback not registered to crengine
2014-08-23 22:46:41 +08:00
Qingping Hou
99f6298b28
Merge pull request #829 from chrox/master
...
markup annotation quadpoints should be defined in counterclockwise
2014-08-22 09:29:38 -07:00
chrox
7048ca971b
add getCoverPageImage api for CreDocument
2014-08-22 21:32:03 +08:00
chrox
0c29b041fe
markup annotation quadpoints should be defined in counterclockwise
2014-08-22 09:32:27 +08:00
chrox
507b989747
use pdfreader instead of crereader to handle zip files
...
Generally zip files are zipped pictures which should be
better handled in pdfreader.
2014-08-19 12:11:49 +08:00
chrox
b7c7287bab
remove more global variables
2014-08-14 19:52:30 +08:00
chrox
38c75f8359
fix the first file in a zip is a directory will raise error in zipContentExt
2014-08-11 20:40:27 +08:00
chrox
a7fb8811f3
add floating punctuation toggler for EPUBs
2014-07-22 21:55:31 +08:00
chrox
120f18737e
add advanced option forced_ocr to force ocring text
2014-07-17 22:32:20 +08:00
WS64
c1ecf23c2c
Update credocument.lua
2014-07-15 12:17:19 +02:00
NiLuJe
5ebed6655b
Use Noto instead of Droid, where appropriate.
2014-07-08 02:11:17 +02:00
chrox
bcd2c8e8f8
display 2 pages side-by-side in landscape for larger screen
2014-07-04 19:28:40 +08:00
chrox
9fc048ecfc
considering visible page count in readerrolling
...
This should fix #660 .
2014-07-03 17:54:35 +08:00
chrox
6cdfd322f1
update buildin font names
2014-07-02 22:47:24 +08:00
chrox
fd1bb86514
fix cannot get word box in last page of a chapter
2014-07-02 14:47:23 +08:00
chrox
53165e3c2a
fix init hyphenation dictionaries
2014-06-17 21:48:07 +08:00
chrox
241d67e0ec
revert zip file handler to crereader
...
It seems that fb2.zip is a conventional format for fb2 with compression
which cannot be handled properly by mupdf.
This should fix #642 .
2014-06-16 19:47:03 +08:00
Qingping Hou
7ac5b419b5
refactor(doc): use ffi binding in picdocument
2014-06-16 02:21:49 -04:00
Paulo Matias
f04951e5dc
Consider as corrupt a null-area bbox
...
Fixes crash with empty page_states
2014-06-11 00:17:16 -03:00
chrox
803e4e8600
font weight option should be persistent between launchings
...
This should fix #620 .
2014-06-04 21:55:01 +08:00
chrox
5aa8eb52da
add missing Blitbuffer since it's removed from global space
2014-06-02 23:49:00 +08:00
chrox
f507fd3709
various Android fix
...
now the android build has nearly the same features as the
Kindle/Kobo build. It's time for Android nightly build?
2014-05-29 16:07:40 +08:00
chrox
6fba40cc77
use mupdf to handle zipped image files
2014-05-25 22:28:17 +08:00
chrox
a8b7b2cdbd
add base document init method to create new configurable for each document
...
this should fix configurables pollution when opening multiple documents
at the same time, e.g. when clipping page images in Evernote plugin.
2014-05-16 14:02:08 +08:00
chrox
17741e292b
serialize cache when closing ReaderUI other than closing document
2014-05-15 19:41:10 +08:00
chrox
55734f6aaa
export highlighted rect in scanned page to Evernote
2014-05-15 16:11:26 +08:00
chrox
3b1e05bb7f
switch to setIntProperty api for setting page margins
2014-05-12 15:47:11 +08:00
chrox
6bf1a9d033
use setStringProperty method to set font face
...
This should fix #569 .
2014-05-11 20:57:23 +08:00
chrox
e1527611c5
show a box indicator when tapping on a link
...
only for PDF/DJVU docs for now since there is no easy way
to get link box from crengine
2014-05-02 16:50:52 +08:00
chrox
30e6b3529b
hide Nimbus fonts in font selecting dialog
2014-05-02 12:48:00 +08:00
chrox
775e5ea3b4
serialize the most recently used blitbuffer/koptcontext
...
to speedup koreader startup for PDF/DJVU documents
especially when reflowing
2014-04-30 23:24:47 +08:00
chrox
c6c4cbcab1
add dewatermark option for pdf/djvu documents
2014-04-07 00:22:47 +08:00
Qingping Hou
4b357c1466
move reader code into frontend/apps/reader
...
it makes more sense to completely separate the UI framework and
application code
also move frontend/ui/configurable.lua to frontend/configurable.lua
2014-04-02 17:02:01 -04:00
chrox
92219a1f1e
cleanup: expand tab to 4 spaces
2014-03-13 21:52:43 +08:00
chrox
560444c168
add fallback_font option in G_reader_settings
2014-03-10 22:06:17 +08:00
chrox
0eee130f5a
clipping page bbox
2014-02-16 19:49:18 +08:00
chrox
9f507e6447
add 'full/mini' options for progress bar of crereader
2014-02-12 15:43:52 +08:00
chrox
b42b4ed204
save highlight to pdf document
2014-02-09 17:51:40 +08:00
chrox
22c437c393
fix init koptcontext with all zero bbox
2014-01-23 19:35:45 +08:00
chrox
8abd8a8a1f
loading KoptInterface only in pdf and djvu reader
...
This will save 4MB RAM in crereader which otherwise will load
liblept.so.3 and libk2pdfopt.so.2 automatically for nothing.
2014-01-22 18:34:55 +08:00
chrox
bfff863861
fix cannot highlight hyphenated words in crereader
2014-01-22 17:25:03 +08:00
Paulo Matias
c55d5e025e
Avoid crash on backends which don't define getLinkFromPosition
2014-01-21 10:28:04 -02:00
chrox
d24d5e413e
add following page link in reflowed page
2014-01-21 11:59:17 +08:00
chrox
9e3e070522
check link on the fly when tapping
2014-01-20 20:41:15 +08:00
Paulo Matias
dacd3d2acb
Fix crash trying to select text in an empty page
2014-01-19 01:03:28 -02:00
chrox
e947f83548
fix dogear not shown properly in crereader
2014-01-18 19:18:12 +08:00
chrox
ce3b58538c
fix no getPageLinks method in djvudocument
2014-01-18 15:31:27 +08:00
chrox
34e28d28e6
page links for crereader and pdfreader
...
Swipe right will return to previous page or position.
2014-01-18 15:04:28 +08:00
chrox
637904a711
add text highlight for credocument
...
Three highlight drawers "lighten", "underscore" and "invert" are
available in reader menu.
This should implement #176 .
2014-01-18 03:11:04 +08:00
chrox
3275413366
add missing registry for fb2 document
2014-01-16 12:54:49 +08:00
chrox
1329f10fa5
add goto link function for CreDocument
2014-01-15 23:36:56 +08:00
chrox
a6e885e77d
show battery icon in crereader page header
2014-01-04 22:30:36 +08:00
chrox
865815b42b
set visible page count when loading document
2014-01-03 19:35:45 +08:00
chrox
23982b185e
add debug information in credocument api
2014-01-03 11:10:06 +08:00
chrox
210293b561
add floating punctuation option for crereader
...
Luckily after disabling floating punctuation left/right margin
are able to be same now (with large enough margins, should be
more than 1em). So I also changed the default page margins for
crereader and removed the dirty hack.
2014-01-03 02:07:32 +08:00
chrox
eaa9535133
move logMemoryUsage from koptinterface to document
2014-01-02 19:19:03 +08:00
chrox
14e94f39a4
explicitly call free method of Blitbuffer
2014-01-02 19:03:52 +08:00
chrox
8e4516b824
add regional zoom mode in pdf/djvu page
...
In regional zoom mode double tap will zoom to the tapped
region(paragraph or column, etc., detected optically via libk2pdfopt).
As the first demo, this feature is only turned on in flipping mode by
tapping the top-left corner of the screen. Eventually we may incorporate
this feature in "free" zoom mode.
2014-01-02 11:14:26 +08:00
chrox
62e12ddfba
import document module on-demand
2013-12-31 13:12:56 +08:00
chrox
f7387822aa
handle xps files in pdfdocument backend
2013-12-29 15:52:44 +08:00
chrox
3b9eaafadd
add dictionary lookup in crereader
2013-12-25 01:43:28 +08:00
chrox
7247a9e3a2
add writing direction option when reflowing
...
This probably will fix #195 .
2013-12-22 19:13:12 +08:00
chrox
2fd66e1fa3
typo fix
2013-12-04 22:17:05 +08:00
chrox
84ad0f2307
fix null export highlight in reflowed mode
2013-11-30 21:17:13 +08:00
chrox
71cb2d3f93
fix looking up wrong word in reflowed page
...
that has a text layer underneath.
For multi-column page reflowing usually fits individual column to
page width and no finner word boxes are available to map reflowed
word box onto native word box. Now the relative position of a reflowed
word center is calculated as portion of the width and height of a larger
block it belongs. This relative position is also considered in
reflow-to-native position transform so that dictionary lookup now works
on multi-column pages in reflowing mode.
This should fix #376 .
2013-11-30 18:18:16 +08:00
chrox
5bf56cbf4c
check position nullity in getTextFromBoxes
2013-10-28 21:49:54 +08:00
chrox
2590cc7ca5
highlight text from scratch instead of reusing rectmaps in reflowing mode
2013-10-25 13:22:49 +08:00
chrox
184a6f5d21
highlight word from scratch instead of reusing rectmaps in reflowing mode
...
Totally revert the OCR in reflowed page to build 545.
And this should fix #309 .
2013-10-24 23:45:09 +08:00
chrox
90d55cbde4
set auto detect word gap in reflowing by default
2013-10-24 23:45:09 +08:00
chrox
4cfdce6105
fix several local calls of Math.round
2013-10-23 22:37:55 +08:00
HW
09cd5c4104
Make DEBUG a require()d local
2013-10-22 20:51:29 +02:00