Commit Graph

47 Commits (0eaf2671fd42e2e79cbd089ed0b335e3da468244)

Author SHA1 Message Date
Tigran Aivazian b7a763cefe Comment out debug printf() in pdf.c
The printf() about the number of links on a page is very useful, but
only for debugging. As other instances of debugging printf() in djvu.c
and pdf.c are commented out, it seemed consistent to do the same with
this one.
12 years ago
Dobrica Pavlinusic 0230ccfb59 add LF to end of debug message 12 years ago
Dobrica Pavlinusic 05e0647b9c getPageLinks implementation for mupdf #72
This is rough first draft, and provides just dump of all links
available on pdf page. Binding to Shift+L is temporary and just for
debugging!

Conflicts:
	pdfreader.lua
	unireader.lua
12 years ago
Dobrica Pavlinusic db7e3770ad fix indenting to tabs 12 years ago
Tigran Aivazian 7894b15511 Tidy up debug support.
1. Make "-d" switch passed to reader.lua enable all debugging
2. Enable debugging for now (development stage) to preserve the current
behaviour. But for the production release I advise to: a) disable it by
not passing "-d" and b) redirect standard output (not just standard
error) of reader.lua to crash.log in kpdf.sh
3. Comment out debug printf()s in pdf.c

Conflicts:

	reader.lua
12 years ago
Kefu Chai e39bbd7077 fixes for mac
* per http://luajit.org/install.html, otherwise LuaJIT always fails
  to get desired memory chunk from mmap(2)
* kill a warning of clang
12 years ago
HW 30458c3662 fixed changed text extraction 12 years ago
HW ec905a5a13 fixed various bugs in pointer handling 12 years ago
traycold 429f572827 modification to take into account new version of mupdf 12 years ago
traycold 02dd9b023f Merge remote branch 'hwhw/master'
* hwhw/master: (183 commits)
  show infomessage on document open
  use InfoMessage for empty TOC, jump history and highlights
  copy resources dir on customupdate
  add resource: info icon
  display document open error message
  added infomessage dialog implementation
  bugfix, removed old test constant
  Added widget abstraction framework
  added interface to get blitbuffers from JPEG/PNG files
  fix typo
  added reading of pan_margin settings
  fix full screen refresh command, close #99
  add: sleep and usleep in util module
  fix: add back KEY_FW{LEFT,RIGHT} commands to NumInputBox
  reverted removal of last-doc shortcut, introduced framework restart
  kill our own child process. not quite finished.
  added line spacing setting for crereader
  remove page:getPageText debug dump to improve performance on device
  remove page:getPageText debug dump to improve performance on device
  display crash.log on error
  ...

Conflicts:
	ft.c
	helppage.lua
	inputbox.lua
	rendertext.lua
	rendertext_example.lua
	unireader.lua
12 years ago
HW b11c5f414a highlighting: fixed segfault when there's no text on a PDF page
also, add a few more whitespace characters from the Unicode standard.
12 years ago
HW e772d9f0d7 turn back coordinates to be just in pt, not 0,01pt 12 years ago
HW 80a6e0210b add PDF text extraction (for pages)
this will return data in the way that djvu.c does already.
hopefully, this will permit us to re-use the highlighting code
(and factor it out into unireader.lua)
12 years ago
Qingping Hou 9e4b2675f0 Merge branch 'master' into epub
Conflicts:
	unireader.lua
12 years ago
Dobrica Pavlinusic 661c7be893 use @traycold code from #74 to show current mupdf cache usage 12 years ago
Dobrica Pavlinusic b8941eee41 cleanup cache_size based on coding guidelines 12 years ago
Dobrica Pavlinusic 3e83dcc2a4 pass cache_document_size to document open
This is how mupdf API is structured
12 years ago
Qingping Hou 9b500189f2 Merge branch 'master' into epub 12 years ago
Qingping Hou ad9d13a947 mod: rename TOC to Toc, adapt showMenu to CREReader 12 years ago
traycold 96894ec1a5 update mupdf submodule to commit bdb6b688a238df56b2cf47fa17a08a4dd4b7a122 and small modification to source code to adapt to mupdf modifications 12 years ago
traycold e2e5af1c61 added some debug code to better understand memory usage by muPdf 12 years ago
HW b037208fb1 factored pages count out, better error and password handling 12 years ago
HW 14b26a4aeb make muPDF cache size configurable from Lua 12 years ago
HW 2fcfe4a329 fixed bug for odd rendering widths 12 years ago
HW ee51fe7e6d refactored muPDF integration to use strictly the fitz.h API
This will allow for reading XPS and CBZ documents, since those are
supported by muPDF (not tested yet)
12 years ago
HW 8869c52c31 fix a Lua 5.0 syntax that was deprecated in 5.1
luaL_reg is now renamed to luaL_Reg. Lua 5.2 does not know about
the old name anymore, Lua 5.1.x had backward compatibility.
12 years ago
HW 9ee7afa86d separate DC out of pdf.c and djvu.c (cleanup) 12 years ago
HW 929ea1e703 removed obsolete page rotation handling, closes #70 12 years ago
Qingping Hou c8f87d5661 fix: remove page number checking in displaying TOC
Former showTOC() method checks the page number in each
entry and only display entry whose page number is greater
than the previous one. However, I think this is too
"clever", we should better leave the TOC untouched to keep
consistent with other pdf readers.
12 years ago
Dobrica Pavlinusic 4a5b12aaa4 fix closeDocument return #34
If we don't return 0 lua just exits on us, breaking return to file
chooser
12 years ago
HW 3c56f50cae switched TOC entry sanitizing to Lua code 12 years ago
Qingping Hou e42f4ae38e mod: bug fix in reading TOC
change misplaced carriage ret characters (0x0d) in toc entry
to white space (0x20) to avoid displaying empty boxes.
12 years ago
Qingping Hou e8fa2d50ea mod:update comment in pdf.c 12 years ago
Qingping Hou ea498e7a5a add: toc menu 12 years ago
Qingping Hou e60242d3f6 initial demo, only one level support 12 years ago
HW 225fa725db Adapted to latest muPDF changes (xref -> document, memory context) 12 years ago
HW fbbdc8dfc0 Adapted to latest muPDF code. Makes code a bit slicker. 13 years ago
HW ac010ea325 reworked freeing pdf document resources 13 years ago
HW 0bfdb9c44a added freeing of document resources 13 years ago
HW a466be9834 fixed blitting bug 13 years ago
HW dfbdad5cbf Added support for odd render area width 13 years ago
HW 04772ea3ee enable garbage collection for pdfpage and ft_face 13 years ago
HW be1327e302 prepare zoom-to-content 13 years ago
HW c2dd2d9897 switched blitbuffer to 4bpp (from 8bpp alpha + 8bpp gray)
this should allow to cache more, bigger pixmaps. We'll need this for
zoomed-in pages.
13 years ago
HW d10b73d81a fixed non-initialization bug for dc->gamma 13 years ago
HW 447b9fe2b5 added gamma setting to drawcontext
usage in Lua:
dc:setGamma(1.5)
print(dc:getGamma())

set it to a negative value to disable gamma correction
(since gamma correction will always imply calculations
over the full buffer data).
13 years ago
HW 0c24e3c7e0 initial project, basic reader working 13 years ago